Android Question Service.startForeground shows "touch for more information or to stop the..."

Azam Memon

Member
Licensed User
I am getting notification as "App is running - touch for more information or to stop the app" when i am running service on foreground.

And when I am selecting the notification, it opens my app's settings.

I want to change subText of notification and when i select the notification, it should open my app instead of android's settings for my app.

the test code that i am executing from Starter service is:

B4X:
Sub Process_Globals
    Dim n As Notification
End Sub

Sub Service_Create
    n.Initialize
    n.AutoCancel = False
    n.OnGoingEvent = True
   
    n.SetInfo("Title", "Body", Main)
End Sub

Sub Service_Start (StartingIntent As Intent)
    Service.StartForeground(1, n)
End Sub

In attachment, check two apps named "Web Alert" and "Slide" these are also working in foreground but they have set specific title and subText and selecting any of these notifications, opens that app not settings.

I have also tried notification buider and tried to set subText, contentInfo and contentText but nothing works.
 

Attachments

  • Screenshot_2016-10-08-11-21-21[1].png
    Screenshot_2016-10-08-11-21-21[1].png
    126.5 KB · Views: 432
  • Screenshot_2016-10-08-11-20-50[1].png
    Screenshot_2016-10-08-11-20-50[1].png
    94.7 KB · Views: 343
  • Screenshot_2016-10-08-11-21-27.png
    Screenshot_2016-10-08-11-21-27.png
    130.2 KB · Views: 389
  • Screenshot_2016-10-08-11-21-21.png
    Screenshot_2016-10-08-11-21-21.png
    126.5 KB · Views: 460
  • Screenshot_2016-10-08-11-20-50.png
    Screenshot_2016-10-08-11-20-50.png
    94.7 KB · Views: 449
Top