Android Question startup/services differences in os v6

sorex

Expert
Licensed User
Longtime User
Hello,

I have written a sound monitoring system that's hanging in the halway where kids with mental handicap are sleeping.

This worked fine for years and now we had 2 phone batteries that had like exploded (not leaked but twice as think) so we decided to replace all 4 phones.

This are cheap Wiko Sunny phones with OS v6 on it.

I have the impression that the service that brings up the app to the front every minute doesn't kick in.
The app also doesn't auto start at phone reboot.

Is there anything different that I need to do to make this working? the other phones where still v2.3.6 and might be less secure on that topic.
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
My 50 cts : with Wiko, if I recall correctly, you could try to disable their power saver app. In the past, I had threads constantly failing when it was activated.
And for the auto start, if I recall correctly too, I had to put the app on the internal memory instead of the SD Card (even if the SD card was set as the internal memory).
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
The simplest solution is to create a foreground service that runs all the time.

it's a service that sends info to my server every minute. I'm not using startAt. So that's good I guess?

@lemonisdead : thanks, I'll have a look at that.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
I turned off that power management.
The app is on internal memory according to the apps tool.
In that Wiko phone assistent it shows my app under boot uptimze as boot app

but the app still doesn't boot
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
Could it be that it is the launcher that's not executing that bootatstart apps?
 
Upvote 0

lemonisdead

Well-Known Member
Licensed User
Longtime User
I don't think so but more the power management app.
Why not trying to register the intent receiver from the manifest for a try ?
B4X:
AddReceiverText(YourServiceName, <intent-filter>
 <action android:name="android.intent.action.BOOT_COMPLETED"/>
 </intent-filter>)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Could it be that it is the launcher that's not executing that bootatstart apps?
Make sure not to use the starter service for the #StartAtBoot flag. Use another service and set this services #StartAtBoot to true.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
Make sure not to use the starter service for the #StartAtBoot flag. Use another service and set this services #StartAtBoot to true.

I don't know what you mean with starter service but this is a regular service. there are 3 of them. network (autoboot), broadcast and receiver.
The last 2 is the streaming stuff started depending if the app is used as broadcaster or receiver.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
since the app simply doesn't start it doesn't even get to the service part.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

sorex

Expert
Licensed User
Longtime User
I added a log line but I don't see it appear in the B4A logs either. so it appears to me that the system or launcher simply doesn't start boot apps.

Sub Service_Create
Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
wifi.Initialize
EnableWifi_tick
StartActivity(Main)
End Sub
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
Alright! got it working... :)

You need to mark your app as protected app or it won't boot at startup.

On this model it's...

Settings > Protected Apps > Enable "User defined" switch > enable it for your app

protected apps.png
 
Upvote 0
Top