开发者

Android: Status Bar Notifications

Is there any way to catch/detect the start or instance of the system notifications on the status bar? I am planning to redirect the notif开发者_如何学JAVAications appearing on the status bar into a simple toast or the likes.


AFAIK, there isn't any way of doing that.

EDIT : Adding example to handle the sdcard events

IntentFilter f = new IntentFilter();
f.addAction(Intent.ACTION_MEDIA_EJECT);
f.addAction(Intent.ACTION_MEDIA_MOUNTED);
f.addAction(Intent.ACTION_MEDIA_UNMOUNTED);
f.addAction(Intent.ACTION_MEDIA_BAD_REMOVAL);
f.addAction(Intent.ACTION_MEDIA_SCANNER_FINISHED);
f.addAction(Intent.ACTION_MEDIA_SCANNER_STARTED);
f.addDataScheme("file");
registerReceiver(mScanListener, f);

private BroadcastReceiver mScanListener = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { ... } }

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜