Android Permission denial in Widget RemoteViewsFactory for Content

后端 未结 3 2069
太阳男子
太阳男子 2020-12-15 08:09

I have a widget which I am trying to use to display information from my app\'s local database inside of a listview.

I\'m using the RemoteViewsService.RemoteViewsFact

3条回答
  •  再見小時候
    2020-12-15 08:36

    If this only happens for 4.2 and not the rest, you need to set the android:exported="true", because the default is changed: http://developer.android.com/about/versions/android-4.2.html

    Content providers are no longer exported by default. That is, the default value for the android:exported attribute is now “false". If it’s important that other apps be able to access your content provider, you must now explicitly set android:exported="true".

提交回复
热议问题