Hi.
Is it possible to pass values to a service using an Intent?
I see the Service_Start Sub receives an Intent StartingIntent and wondered if i could add values as extras to that Intent from my calling code.
The general recommended advice seems to be to use globals to pass values to a service but i thought i'd ask anyway.
Activity code:
Service code:
Any ideas?
Martin.
Is it possible to pass values to a service using an Intent?
I see the Service_Start Sub receives an Intent StartingIntent and wondered if i could add values as extras to that Intent from my calling code.
The general recommended advice seems to be to use globals to pass values to a service but i thought i'd ask anyway.
Activity code:
B4X:
' i have some values to pass to MyService
StartService(MyService)
Service code:
B4X:
Sub Service_Start (StartingIntent As Intent)
' I want StartingIntent to contain those values
End Sub
Any ideas?
Martin.