通知URI Android TV不调用Onchange方法

问题描述

我试图在Android TV应用程序中为URI NotificationsContract.NOTIFICATION_CONTENT_URI放置一个contentObserver,但未调用它的onchanged()方法

    private fun registerObserver() {
    try {
        L.i("notification : registerObserver")
        getContext().contentResolver.registerContentObserver( // observable 
       uri
                NotificationsContract.NOTIFICATION_CONTENT_URI,true,notificationObserver)
    } catch (e: Exception) {
        L.e("notification : $e")
    }
}

有人在Android TV中遇到过类似的问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)