0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Android - permission vs uses-permission

0
Last updated at Posted at 2017-10-25

In App A, you will be a sender. And it need declare your custom permission.

<permission
  android:name="AAA.BBB.CCC"
  android:label="APP_A"
  android:protectionLevel="signature"
 />

In App B, you will be a receiver.

<uses-permission android:name="AAA.BBB.CCC" />
...
<receiver 
  android:name="my.app.BroadcastReceiver"
  android:permission="AAA.BBB.CCC">
  <intent-filter>
    <action android:name="my.app.Action" />
  </intent-filter>
</receiver>

https://stackoverflow.com/questions/8816623/how-to-use-custom-permissions-in-android/8817231#8817231
https://stackoverflow.com/questions/11770794/how-to-set-permissions-in-broadcast-sender-and-receiver-in-android
https://stackoverflow.com/questions/14450839/uses-permission-vs-permission-for-android-permissions-in-the-manifest-xml-file

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?