C Cody04l Member Licensed User Longtime User Feb 23, 2012 #1 Hello, EDIT: I realized I may have put this in the wrong forum section. Please move as needed... So far I'm loving B4A, I have a question regarding a notification activity. I'm trying to call an activity outside my application when the notification is clicked. It appears the notification will only allow an activity inside my app to run. Is this correct? Is there a way around it? My code to create the notification Code: n.Initialize n.Icon = "nook" n.SetInfo("Title", "Description", "com.bn.ereader.app.ui.DashboardActivity") n.Notify(1) Adb error E/B4A (11136): java.lang.ClassNotFoundException: com.blah.com.bn/com.bn.ereader.app.ui.dashboardactivity Appreciate any help. Thanks, Cody Last edited: Feb 23, 2012
Hello, EDIT: I realized I may have put this in the wrong forum section. Please move as needed... So far I'm loving B4A, I have a question regarding a notification activity. I'm trying to call an activity outside my application when the notification is clicked. It appears the notification will only allow an activity inside my app to run. Is this correct? Is there a way around it? My code to create the notification Code: n.Initialize n.Icon = "nook" n.SetInfo("Title", "Description", "com.bn.ereader.app.ui.DashboardActivity") n.Notify(1) Adb error E/B4A (11136): java.lang.ClassNotFoundException: com.blah.com.bn/com.bn.ereader.app.ui.dashboardactivity Appreciate any help. Thanks, Cody
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2012 #2 Actually this is the correct forum section... You can pass an intent instead of an activity. For example the following code will start Gmail app: Code: Dim n As Notification n.Initialize n.Icon = "icon" Dim i As Intent i.Initialize("", "") i.SetComponent("com.google.android.gm/com.google.android.gm.ConversationListActivity") n.SetInfo("Title", "Description", i) n.Notify(1) Note that you should write the full component name (package name / activity). Upvote 0
Actually this is the correct forum section... You can pass an intent instead of an activity. For example the following code will start Gmail app: Code: Dim n As Notification n.Initialize n.Icon = "icon" Dim i As Intent i.Initialize("", "") i.SetComponent("com.google.android.gm/com.google.android.gm.ConversationListActivity") n.SetInfo("Title", "Description", i) n.Notify(1) Note that you should write the full component name (package name / activity).
C Cody04l Member Licensed User Longtime User Feb 23, 2012 #3 Erel, Thanks for the quick response. That totally makes sense. I'll give that a shot and report back. Thanks, Cody Sent from my SGH-T989 using Tapatalk Upvote 0
Erel, Thanks for the quick response. That totally makes sense. I'll give that a shot and report back. Thanks, Cody Sent from my SGH-T989 using Tapatalk
C Cody04l Member Licensed User Longtime User Feb 25, 2012 #4 That did the trick Erel. Thanks for the help. Cody Sent from my SGH-T989 using Tapatalk Upvote 0