You should use the permission android.permission.RECEIVE_BOOT_COMPLETED
and register a BroadcastReceiver
for android.intent.action.BOOT_COMPLETED
.
Update:
I can't find a source, but I'm pretty sure, before an app is able to receive android.intent.action.BOOT_COMPLETED
it should at least have been started once since it's installation.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…