Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added changes to open application detail page under settings #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
* Created by Darshan on 4/14/2015.
*/
public class AlbumSelectActivity extends AppCompatActivity {

private final String TAG = AlbumSelectActivity.class.getName();
private static final String APP_PACKAGE_NAME_SUFFIX = "package:";

private ArrayList<Album> albums;

Expand Down Expand Up @@ -94,7 +96,13 @@ protected void onCreate(Bundle savedInstanceState) {
grantPermission.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
requestPermission();
if(!ActivityCompat.shouldShowRequestPermissionRationale(AlbumSelectActivity.this,Manifest.permission.READ_EXTERNAL_STORAGE)){
Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.setData(Uri.parse( APP_PACKAGE_NAME_SUFFIX + getPackageName()));
startActivity(intent);
} else {
requestPermission();
}
}
});
hidePermissionHelperUI();
Expand Down