Android Question [Solve] Intent in ServicestartAtExact

astronald

Active Member
Licensed User
Longtime User
Hello
i am trying this code
Start Intent:
      Dim i As Intent
       i.Initialize("", "")
       i.SetComponent(package & "/.pushservice")
       i.PutExtra("MyRequest", "Register")
       StartServiceAtExact(i,Datetime.now + X ,True)

But app crash with this error
(NullPointerException) java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Class.getName()' on a null object reference


StartServiceAtExact not support intent
How else can I send information in StartServiceAtExact ?

Thanks!
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
StartServiceAtExact not support intent
correct. You need to reference a service.

It is up to YOU to send an Intent in your Service which is started by StartServiceAtExact...
 
Upvote 0

astronald

Active Member
Licensed User
Longtime User
Thanks.
Don't works for me, Service start in foregroud,

StartServiceAtExact start service i need set StartingIntent

Start Intent:
Sub Service_Start (StartingIntent As Intent)
 
Upvote 0

astronald

Active Member
Licensed User
Longtime User
Thanks Erel sorry for my question,
I change my project to B4Xpages,
Init SQL in Main Activiy, but this is not launch in StartService
Change to init in Starter and solve problem thanks very much.
 
Upvote 0
Top