我是靠谱客的博主 曾经舞蹈,这篇文章主要介绍Android 打开状态栏 EXPAND_STATUS_BAR,现在分享给大家,希望可以做个参考。


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的全部内容,更多相关Android内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(111)

评论列表共有 0 条评论

立即
投稿
返回
顶部