Right now, I am dealing with a problem of the device taking too long to boot up (I have narrowed the problem to many many applications who are listening to the boot-complete broadcast just so they schedule a job). So that means 100s of apps are starting up just so they can schedule a job which ultimately does not need to scheduled during boot complete (only listen boot complete since it's a guarantee).
My solution was to create one service which parses all the applications manifests (which had custom metadata in them) and schedule the jobs from that. Instead of have 100s of apps start up just to schedule a job, I have one service which handles it. However, I shortly realized that I can't because it gives me an error:
java.lang.IllegalArgumentException: uid 103 cannot schedule job to "com.test.service"
So my question is, how would you guys approach this? Is this even possible or do I have to take a completely different approach?
from Android Jobscheduler Optimization
No comments:
Post a Comment