<meta charset="utf-8">
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
android:sharedUserId="android.uid.system"
public void setNotificationListenerAccessGranted(NotificationManager mNm,ComponentName componentName,boolean value)throws Exception{
Class claz_notifcation = NotificationManager.class;
Method method = claz_notifcation.getMethod("setNotificationListenerAccessGranted",ComponentName.class,boolean.class);
method.invoke(mNm,componentName,value);
}
public void AuxiliaryPermissionOn(SystemFunction sf){
NotificationManager mNm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
ComponentName componentName = new ComponentName("com.lanjiang.adverfunction","com.lanjiang.download.NotificationService");
try {
setNotificationListenerAccessGranted(mNm,componentName,true);
} catch (Exception e) {
Log.e("TAG","Excetption ",e);
e.printStackTrace();
}
}