开发者

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:

  1. Select the application's manifest.
  2. Go to the 'Permissions' tab.
  3. Click 'Add', and chose 'Uses Permission'.
  4. Enter the name of the permission, either by inputting the text or selecting the permission from the drop-down menu.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜