oxoooo / earth

https://play.google.com/store/apps/details?id=ooo.oxo.apps.earth
GNU General Public License v3.0
280 stars 37 forks source link

The app doesn't work on MIUI with default setting #6

Closed helloqiu closed 8 years ago

helloqiu commented 8 years ago

I try this app this morning and I find the earth doesn't change during the day. So I run logcat and that's what I get:

05-26 21:08:00.481  2233  2374 I AutoStartManagerService:   
MIUILOG- Reject service :Intent { act=android.content.SyncAdapter cmp=ooo.oxo.apps.earth/.sync.EarthsSyncService (has extras) } userId : 0 uid : 10118 
05-26 21:18:24.096  2233  2374 I AutoStartManagerService: 
MIUILOG- Reject service :Intent { act=android.content.SyncAdapter cmp=ooo.oxo.apps.earth/.sync.EarthsSyncService (has extras) } userId : 0 uid : 10118 
05-26 21:28:24.098  2233  2374 I AutoStartManagerService: 
MIUILOG- Reject service :Intent { act=android.content.SyncAdapter cmp=ooo.oxo.apps.earth/.sync.EarthsSyncService (has extras) } userId : 0 uid : 10118

MIUI just reject the service! I finally solve this problem.I change the permission of visit user's account from ask to always allow. But I think most users don't know how to deal with this kind of problems.So why not add another way to sync data when the account sync is down.

xingrz commented 8 years ago

Hi @helloqiu, thank you for your feedback.

As you see the sync service is rejected by a so-called AutoStartManagerService of MIUI.

MIUI believes that any auto-starting service is "evil". We have no idea how to by-pass this "protection" without taking any truly EVIL measure.

But luckily and sadly, we decided to add an EVIL MODE switch to keep the sync service lives as long as we can (and consume battery as more as it is expected) in the next release. I hope that would make things work properly and make MI company happy.

helloqiu commented 8 years ago

Thank you for your quick response. @xingrz Looking forward to the new version. :)