その intent を BroadcastReceiver で受け取ってゴニョゴニョするんですが。
今まで発行されていた Intent が Gmail 4.2.1 から発行されなくなっていました。
今までは
android.intent.action.PROVIDER_CHANGED
での Intent でした。
Gmail 4.2.1 からは
com.android.mail.action.update_notification
のようです。
スキーマもなくなり mimetype がつくようになりました。
変更後の intent-filter は以下のようになります。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<intent-filter> | |
<action android:name="android.intent.action.PROVIDER_CHANGED" /> | |
<data | |
android:host="gmail-ls" | |
android:path="/unread/^i" | |
android:scheme="content" /> | |
</intent-filter> | |
<!-- 4.2.1 から下の action で通知されるようになった。 --> | |
<intent-filter> | |
<action android:name="com.android.mail.action.update_notification" /> | |
<data android:mimeType="application/gmail-ls" /> | |
</intent-filter> |
Gmail でメール受信した時の logcat は以下のとおり。
12-04 22:18:54.421: I/Gmail(13718): Sending notification intent: Intent { act=com.android.mail.action.update_notification typ=application/gmail-ls (has extras) }
急な変更やめて・・・・・・。
そして typ=application/gmail-ls って type じゃないの?googleさん?
そして typ=application/gmail-ls って type じゃないの?googleさん?