try{
Object service = context.getSystemService("statusbar");
Class<?> statusBarManager = Class.forName("android.app.StatusBarManager");
Method expand = statusBarManager.getMethod("expand");
expand.invoke(service);
Log.d("click", "-------------2");
}catch(NoSuchMethodException e)
{
try{
Object obj = context.getSystemService("statusbar");
Class.forName("android.app.StatusBarManager")
.getMethod("expandNotificationsPanel", new Class[0])
.invoke(obj, (Object[]) null);
Log.d("click", "-------------3");
}catch(Exception e2){
}
}catch(Exception e){
}
Android 打开状态栏 EXPAND_STATUS_BAR
最新推荐文章于 2023-10-04 14:50:30 发布