528 CHAPTER 14: Android Content Providers: Providing Data to Applications
- Now you have added a READ database permission for the ContactsContract
database. While you are here, you might as well add the WRITE database
permission for the ContactsContract database. Click on the Add button,
and again add atag, this time selecting the
WRITE_CONTACTS permission constant from the Name drop-down menu. - It is important to notice that when you click the Add button, the Uses
Permission entry in the Permissions List area on the left changes to use the
more detailed android.permission description entry of READ_CONTACTS. If
you want the second Uses Permission entry to show a change after you select
the drop-down menu option for WRITE_CONTACTS, simply click on the Uses
Permissions tag in the list area. It will then update itself based on what you
have set in the right side of this visual permissions editor. As you can see, any
click in the left area of the UI will update the UI based on what you set in the
right area UI. Since you are working in Android 4.4.4, you should also use API
Level 19 in the Max SDK version field, as shown in Figure 1 4-1 7.
Figure 14-16. Select the READ_CONTACTS constant attribute for the Uses Permissions tag from the drop-down list
Figure 14-17. Click an Add button to add another Uses Permission tag and then set a WRITE_CONTACTS attribute