作者magic704226 (magic)
看板AndroidDev
标题[问题] Android 安装完後,触发本身的Event
时间Thu Dec 11 15:58:42 2014
目前做一个Ap
要在被Install完毕後
收到一个Broadcast
如果单安装完AP
尤其他AP收一般是用
android.intent.action.PACKAGE_ADDED
android.intent.action.PACKAGE_INSTALL
但要让自己起来
目前Survey到是
android.intent.action.USER_PRESENT
但这要在萤幕解锁
有没有其他更好的方法?
p.s.
AP是一个System Service 只有init一个BroadcastReceiver
补充 目前找到 FLAG_INCLUDE_STOPPED_PACKAGES flag
可是要怎麽加在System Intent
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 39.9.31.252
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/AndroidDev/M.1418284725.A.89B.html
※ 编辑: magic704226 (39.9.31.252), 12/11/2014 16:12:07
1F:→ freesamael: 没办法,要有ui的trigger point 12/11 23:02
2F:→ freesamael: android刻意让刚装好的app是stopped收不到一般的broad 12/11 23:03
3F:→ freesamael: cast 12/11 23:03