更新时间:2023-11-30 09:18:28
你应该实现一个广播接收器并监听android.intent.action.PROVIDER_CHANGED"意图
you should implement a broadcast receiver and listen to "android.intent.action.PROVIDER_CHANGED" intent
<receiver android:name="GmailReceiver">
<intent-filter>
<action android:name="android.intent.action.PROVIDER_CHANGED"
android:priority="-10">
</action>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="content" android:host="gmail-ls"
android:pathPattern="/unread/.*">
</data>
</intent-filter>
</receiver>