سؤال

Using this method

http://www.androidsnippets.com/autostart-an-application-at-bootup

to autoboot my application. However, there is a several second delay AFTER my device boots, when the lock screen is visible BEFORE my application starts.

Can anyone tell me why this is?

How do I remove this delay?

هل كانت مفيدة؟

المحلول

You can't.

Android needs to start a lot of services, and your app is just one of them. I believe system apps are started first(Google Play Services, for example) and after that all 'normal' apps will start. This'll take a few seconds after the device shows it's lockscreen. But when Android shows a lockscreen, it doesn't mean that it completely finished booting. It finished it system boot, but app services(like your app) still need to start. Most of the time, it's just for setting a scheduled Alarm or se, and there's no need to let the user wait an additional couple of seconds before he is able to use his device.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top