6.0之前开发者申请各种权限,只需要在清单列表(AndroidManifest.xml)中进行声明就可以了。对开发者来说是相当便利,但对用户来说是体验不好,6.0的权限换成了用户可以随时更改的操作,类似IOS的权限申请。

常规的权限

和以前一样,在清单中申请,这里不作累述 ####需要申请的权限 google是以权限组进行分类的,一旦组内的某个权限被赋予了,那么这个组的其他权限也将自动被赋予 !!!

权限组权限
android.permission-group.CALENDAR(日历数据)
  • android.permission.READ_CALENDAR
  • android.permission.WRITE_CALENDAR
android.permission-group.CAMERA(相机)
  • android.permission.CAMERA
android.permission-group.CONTACTS(联系人)
  • android.permission.READ_CONTACTS
  • android.permission.WRITE_CONTACTS
  • android.permission.GET_ACCOUNTS
android.permission-group.LOCATION(位置)
  • android.permission.ACCESS_FINE_LOCATION
  • android.permission.ACCESS_COARSE_LOCATION
android.permission-group.MICROPHONE(麦克风)
  • android.permission.RECORD_AUDIO
android.permission-group.PHONE(电话)
  • android.permission.READ_PHONE_STATE
  • android.permission.CALL_PHONE
  • android.permission.READ_CALL_LOG
  • android.permission.WRITE_CALL_LOG
  • com.android.voicemail.permission.ADD_VOICEMAIL
  • android.permission.USE_SIP
  • android.permission.PROCESS_OUTGOING_CALLS
android.permission-group.SENSORS(传感器)
  • android.permission.BODY_SENSORS
android.permission-group.SMS(短信)
  • android.permission.SEND_SMS
  • android.permission.RECEIVE_SMS
  • android.permission.READ_SMS
  • android.permission.RECEIVE_WAP_PUSH
  • android.permission.RECEIVE_MMS
  • android.permission.READ_CELL_BROADCASTS
android.permission-group.STORAGE(存储)
  • android.permission.READ_EXTERNAL_STORAGE
  • android.permission.WRITE_EXTERNAL_STORAGE
!!!