Thanks for your comment, androh. But there is a specific task for when the user initializes the App by clicking on the icon. "Case else" will also be executed every time the sub Service_Start is called internally and not only when the App is initialized by the user. Any idea or suggestion?
See my routine in Service Module:
#Region Service Attributes
#StartAtBoot: True
#End Region
Sub Process_Globals
Dim Notification1 As Notification
End Sub
Sub Service_Create
Notification1.Initialize
Notification1.Icon = "icon"
Notification1.Vibrate = True
Notification1.Sound = True
End Sub
Sub Service_Start (StartingIntent As Intent)
Select Case StartingIntent.Action
Case "android.intent.action.BOOT_COMPLETED"
SendMsg
StartServiceAt("",DateTime.Now+(30000),True)
Case <Initialized by User>????
<Not send msg>
Case Else
SendMsg
StartServiceAt("",DateTime.Now+(60000),True)
End Select
End Sub
Sub SendMsg
Notification1.OnGoingEvent = False
Notification1.SetInfo("Mensage for User", DateTime.Now, Main)
Notification1.AutoCancel = True
Notification1.Notify(1)
End Sub