[分享] 搞了一個禮拜的擴展狀態列..消失

看板AndroidDev作者時間14年前 (2011/04/30 09:15), 編輯推噓1(102)
留言3則, 2人參與, 最新討論串1/1
經過一個禮拜的到處詢問 大概從SDK寫出來的APP都不能達到效果 程式碼:http://pastebin.com/3MArMjN6 一開始的問題是 中間那段if根本沒有跑進去 到處問之後發現我沒有宣告使用權限 加入之後,反而又出現ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.tteesstt/.tteesstt } from null (pid=-1, uid=-1) requires android.permission.STATUS_BAR 又跑到美國網站問之後,得到的答案是:: You are trying to use a permission that applications aren't allowed to. You are then saying that launching your activity requires that the caller hold this permission, which no app (including the launcher) is going to. 和 SDK applications cannot hold that permission, AFAIK, and I don't know why you have an activity that requires that permission. 所以大概是除了launcher那種脫離(?)SDK的app才能吧.. -- ※ 發信站: 批踢踢實業坊(ptt.cc)

05/01 16:04, , 1F
丟到/system/app下應該就可以了
05/01 16:04, 1F

05/04 19:00, , 2F
那基本上要root, 大多數的launcher都需要root權限
05/04 19:00, 2F

05/04 19:01, , 3F
包含"丟到/system/app這件事情"在內
05/04 19:01, 3F
文章代碼(AID): #1DksB7-N (AndroidDev)