开发者

Android Notification, do stuff on click

开发者 https://www.devze.com 2023-03-11 08:51 出处:网络
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);

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

精彩评论

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