开发者

Android Notification, do stuff on click

I've read documentation. But i found only a way to call my activity on click with Intent

PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, MyMain.class), 0);

But how do i make some action, e.g switching 开发者_C百科view in wievflipper and only then opening activity?


You need to add extras to your Intent, and then retrieve those in your activity.

See the putExtra(...) method.

Also, refer to the Lars Vogel's tutorial for a full working code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜