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.
精彩评论