Link to settings on Android 8

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
Andrea Maria Piana 2018-03-29 15:48:20 +01:00 committed by Julien Eluard
parent 8bbb2f8760
commit e6623516e9
No known key found for this signature in database
GPG Key ID: 6FD7DB5437FCBEF6
1 changed files with 1 additions and 2 deletions

View File

@ -82,8 +82,7 @@ public class MainActivity extends ReactActivity
final Intent intent = new Intent(); final Intent intent = new Intent();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
intent.setAction(Settings.ACTION_APP_NOTIFICATION_SETTINGS); intent.setAction(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
intent.putExtra("app_package", getPackageName()); intent.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());
intent.putExtra("app_uid", getApplicationInfo().uid);
} else { } else {
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.addCategory(Intent.CATEGORY_DEFAULT); intent.addCategory(Intent.CATEGORY_DEFAULT);