Android Question Notification not showing however service running?

juve021

Member
Licensed User
Can someone tell me why a notification is not showing up however the service does run?

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
   
    Dim notif As Notification
   
End Sub
B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("latitude_t")
    Activity.Title="Latitude"
        notif.Initialize
        notif.Light = False
        notif.Vibrate = False
        notif.OnGoingEvent = True
        notif.Sound = False
        notif.Icon = "icon"
        notif.SetInfo("Lat", "Sending GPS coords every 30 seconds", "")
        notif.Notify(1)
    StartService("lat_service")
    Activity.Finish
  
End Sub
 

juve021

Member
Licensed User
Thanks Erel. So are you saying that I'm not correctly starting the service? I guess how do I have my app start but then immediately place a notification in the notification area with the main activity being "hidden"?
 
Top