开发者

android.intent.action.NOTIFICATION_REMOVE not available on all devices?

I've got a receiver set up in my android application to catch android.intent.action.NOTIFICATION_REMOVE intents. On my Evo, it works fine - when a notification is cleared from the notification bar, I catch that event and can run some code. I tried running this on a Samsu开发者_高级运维ng Moment though, and it is never caught. So now I'm trying to figure out why, and I can't seem to find anything on Google about this intent action - and I set this code up a few months ago, so I don't remember where I even found this action, it doesn't seem to be in the API.

The evo is running 2.2, and the moment is running 2.1-update1, so I'm guessing that it's undocumented, and only available in 2.2. Is there any other way to catch an event that a notification has been cleared? Note that I'm not trying to cancel a notification that I put up, or trying to cancel another app's notification, just catch an event when a notification has been cleared.

Here's my receiver in AndroidManafest.xml:

<receiver android:name=".NotificationClearedReciever"> 
    <intent-filter> 
        <action android:name="android.intent.action.NOTIFICATION_REMOVE" /> 
    </intent-filter> 
</receiver> 


I asked on the Android mailing list, and the answer was that android.intent.action.NOTIFICATION_REMOVE is non standard, and therefore can't be relied upon.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜