【发布时间】:2011-08-10 03:55:42
【问题描述】:
如果它在/sdcard上,有没有办法在启动后自动启动android应用程序?
好的,可能是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)
谢谢
一月
【问题讨论】:
-
你解决过这个问题吗?我现在也遇到了类似的问题。
-
您的问题帮助我找到了答案,谢谢。 :D
-
如果你觉得有帮助,你应该接受答案。
-
恐怕这个问题唯一正确的答案是:不,没有办法。
-
这个问题stackoverflow.com/questions/8248617/… 正确回答了这个问题,即为
BOOT_COMPLETED和MEDIA_MOUNTED创建一个接收器
标签: android broadcastreceiver sd-card boot