Android Question how to send an event before the stand-by device

Roberto P.

Well-Known Member
Licensed User
Longtime User
HI
someone but say if I can launch an event before the device goes into Stand-by, so I can record the GPS position in which the device is located

thank you
 

Roberto P.

Well-Known Member
Licensed User
Longtime User
Hi Erel
when the device goes into sleep mode.

I tried to create a featured service, but I can not keep the app active. You can give me some indication. Although I fear that it consumes too much battery.

So, I was thinking about managing event when the app is going to go into sleep mode.

thank you
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I tried to create a featured service, but I can not keep the app active. You can give me some indication.
You need to create a foreground service. This will allow you to do something when the screen turns off (with PhoneEvents).

So, I was thinking about managing event when the app is going to go into sleep mode.
Not possible unless your app is currently running.
 
Upvote 0

Roberto P.

Well-Known Member
Licensed User
Longtime User

ok.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…