Android Question Open certain activity on notification click

Facilauto Juan

Member
Licensed User
Longtime User
Hello there!

I have an application that pops up notifications in the notification bar. The problem is that I want the notification to open certain activity, not the main.

I have tried using custom notification library, but I can't manage to make it work (it force closes my app). I think that it's because I'm using v17 android.jar, but I want to have the latest one, so... here is my question:

How can I make a notification to open a custom activity without external libraries?

Thanks for your answers and your time.
 

barx

Well-Known Member
Licensed User
Longtime User
If you wish to use the default Notification object that is with the b4a ide then you set the activity to be called when you call
B4X:
n.SetInfo("Some title", "Some text", Main)  'Change Main to the required activity.

As a side note, the custom notification library has now been deprecates and the Notification Builder library should be used instead.
 
Upvote 0
Top