I have set startOnBoot: true, in the configuration. It works perfectly on Motorola phone however on Xiaomi phones one has to manually set the app to autostart in the security app of MI Phones.
thats mi issue actually. check this Mi Link i even have post on that thread. Instead try searching how google apps and whatsapp are being able to keep their app enabled in the list.
Oh boy I really hate this Android fragmentation, where anybody can bend Android at will.
There is another issue with Xiaomi. It kills the geolocation background service too on 2 conditions mentioned below:
I wonder if there is something I can do? Probably not.
If anyone gets a auto-startup solution , please do share. It will help alot. Its getting annoying now . unfortunately , client has a MI device.
@mauron85 @uzumakinaruto123 I have created this bug report in MIUI thread.
Here is the link: http://en.miui.com/thread-305663-1-1.html
Do confirm the bug, so that MI developers would pay more attention.
This is mainly regarding tracking app being killed by MIUI. However, one more bug has to be created about app auto-start too.
good ! I will give a +1 there but you should have created a thread for auto-startup instead. by solving that auto-startup issue would solve the above too. since miui will try restarting even if it was killed.
@uzumakinaruto123 Do create another thread for autostart, will comment 聽and +1 聽
Actually, I added the app to autostart from security app > permissions > autostart > app to autostart
After this the app does start on startup however, it seems that locations stop updating after some amount of time. However, when you check in running app you will find location service in the app is still running.
I am assuming that MIUI is some how preventing http post from location service or is stalling the location service completely. We will know more once @mauron85 includes logging for debugging purpose.
In meanwhile try adding your app to autostart as mentioned above and do share your results. Will help us get more insights.
Notice: this issue has been closed because it has been reported for branch 2.x or later. It could be already fixed in v3 or is not relevant anymore. You may reopen this issue if it has been closed in error.
As said. There is no way how I can override those settings.