I have searched online for answer, but all I got was how to start an activity inside application A when clicking on A’s notification. The problem is, to start activities of B, I will need the Context of B to pass it to the PendingIntent for the notification of A, but I cannot get the Context of B in A.
Is there any way to do so, or am I supposed to do something else to start app B other than use PendingIntent.getActivity() method?
You do not need the context of B to pass to the pending intent, just an intent pointing to the second activity.
If for some odd reason this is not working(though it should), you could just have your notification fire to a
BraodcastReceiverand start the activity there, but like i said this should NOT be required.