Skip to content

Instantly share code, notes, and snippets.

@crapthings
Last active August 26, 2020 02:11
Show Gist options
  • Save crapthings/59e3d0cc415c02d7afede490b160c2b6 to your computer and use it in GitHub Desktop.
Save crapthings/59e3d0cc415c02d7afede490b160c2b6 to your computer and use it in GitHub Desktop.
android oppo 推送相关

https://blog.csdn.net/zhongshanyishi/article/details/80619101

if (action.equals("openNotificationSettings")) {
            cordova.getActivity().runOnUiThread(new Runnable() {
                @Override
                public void run () {
                    Context context = cordova.getActivity().getApplicationContext();
                    Intent intent = new Intent();
                    intent.setAction(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
                    intent.putExtra("android.provider.extra.APP_PACKAGE", context.getApplicationContext().getPackageName());
                    cordova.getActivity().startActivity(intent);
                }
            });

            return true;
        }
        ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment