Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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