如何在Android系统启动时自动启动位于/sdcard
的应用程序?
可以通过BroadcastReceiver
实现。但是,应该使用哪个操作呢?
ACTION_BOOT_COMPLETED - does not work if it is on the /sdcard (documented)
ACTION_MEDIA_MOUNTED - does not work if it is on the /sdcard (which is undocumented)
ACTION_EXTERNAL_APPLICATIONS_AVAILABLE - does not work, I do not know why
ACTION_USER_PRESENT - does not work if the BroadcastReceiver is registered in AndroidManifest (which is undocumented, but documentation bug has been reported)
谢谢
Jan
BOOT_COMPLETED
和MEDIA_MOUNTED
事件。 - Bron Davies