如何获取android中可发送通知的已安装应用程序列表?
我正在开发一个应用程序,在这个程序中,我必须获得一个在android中发送通知的应用程序列表。我找了很多,但没有找到任何解决办法。因此,请告诉我如何获取发送通知的应用程序列表。要获取应用程序列表,您可以这样做如何获取android中可发送通知的已安装应用程序列表?,android,push-notification,notifications,Android,Push Notification,Notifications,我正在开发一个应用程序,在这个程序中,我必须获得一个在android中发送通知的应用程序列表。我找了很多,但没有找到任何解决办法。因此,请告诉我如何获取发送通知的应用程序列表。要获取应用程序列表,您可以这样做 Intent intent = new Intent(Intent.ACTION_MAIN, null); intent .addCategory(Intent.CATEGORY_LAUNCHER); List<ResolveInfo> appList = context.ge
Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent .addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> appList = context.getPackageManager().queryIntentActivities( intent , 0);
NotificationManagerCompat.from(context).areNotificationsEnabled();