Hi,
I want to send an email from a service. Normally it should work like this:
But "you should usually not call StartActivity from Service".
Here Erel said one should use CallSubDelayed... that would work for one Activities.
What's the right way for starting Intents from a Service?
I want to send an email from a service. Normally it should work like this:
B4X:
Private Sub sendMail(to as string)
dim myEmail as Email
myEmail.to.add(to)
myEmail.body = "some text"
StartActivity(myEmail.GetIntent)
end sub
But "you should usually not call StartActivity from Service".
Here Erel said one should use CallSubDelayed... that would work for one Activities.
What's the right way for starting Intents from a Service?