简体   繁体   中英

Permission Denial: not allowed to send broadcast android.intent.action.HEADSET_PLUG

Google obviously are introducing more and more protection for their internal broadcasts on JB or 4.1 and above. This was working fine on 4.0? Do you know if there is a way to send a new broadcast, maybe using sendOrderedBroadcast with a permission?

Which one?

This is now a protected broadcast only system uid can send.

See: android/frameworks/base/core/res/AndroidManifest.xml :

<protected-broadcast android:name="android.intent.action.HEADSET_PLUG" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM