Reputation: 14392
If I am compiling AOSP 4.2.2 from source, what private APIs in NotificationManager can I use to display system notifications?
Upvotes: 1
Views: 322
Reputation: 24820
You can use the below api.
private INotificationManager mNoMan;
mNoMan = INotificationManager.Stub.asInterface(
ServiceManager.getService(Context.NOTIFICATION_SERVICE));
StatusBarNotification[] notis = mNoMan.getActiveNotifications(mContext.getPackageName());
You need this permission
android.permission.ACCESS_NOTIFICATIONS
Upvotes: 2