Granting permissions for ADB deployed applications in Android
I'm trying to create an Android application that reads the list of bookmarks from the built in Browser app. To access the ContentProvider, I need to have the com.android.browser.permission.READ_HISTOR开发者_如何学PythonY_BOOKMARKS
permission.
I'm deploying my application directly to my device using ADB. How do I grant this application the permission that I require?
You set it in the androidmanifest.xml file.
Like so:
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS" />
This can be set in the Eclipse ADT Plugin with the following steps:
- Select the application's manifest.
- Go to the 'Permissions' tab.
- Click 'Add', and chose 'Uses Permission'.
- Enter the name of the permission, either by inputting the text or selecting the permission from the drop-down menu.
精彩评论