-
在WebView自身打开链接 – 关于 WebViewClient 类 shouldOverrideUrlLoading 的错误用法
-
Android 24之后(即 Android N),可以很方便的查看自己 app 是否打开了消息通知开关
详情:
Now you can check it, as said in this Google I/O 2016 video
怎么使用呢?看下我的代码:
1 |
boolean isOpen = NotificationManagerCompat.from(this).areNotificationsEnabled(); |
这里需要注意的是,在 API 19 以下方法 areNotificationsEnabled 默认都返回 true,在 API 19+ (包括19)是有效果的。
近期评论