How do I get a pending intent?

How do I get a pending intent?
Answer
Build and issue the notification:
  1. Create an Intent that starts the Activity .
  2. Set the Activity to start in a new, empty task by calling setFlags() with the flags FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_CLEAR_TASK .
  3. Create a PendingIntent by calling getActivity() .
27 окт. 2020 г.
 

Tìm kiếm

Back
Top