Android 6.0 new Features: Permissions

Source: Internet
Author: User

Before 6.0 is the install time permissions model,6.0 after the runtime permissions model is taken.
The latter will show the user the required permissions when installing, and apply for permission when the app is running.
Android divides system privileges into four levels of protection Normal,dangerous,signature,signatureorsystem. The most common is Normal PermissionAnd Dangerous PermissionTwo classes.

Normal permission: This type of permission can be assigned by default during app installation
  
 
  1. android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
  2. android.permission.ACCESS_NETWORK_STATE
  3. android.permission.ACCESS_NOTIFICATION_POLICY
  4. android.permission.ACCESS_WIFI_STATE
  5. android.permission.ACCESS_WIMAX_STATE
  6. android.permission.BLUETOOTH
  7. android.permission.BLUETOOTH_ADMIN
  8. android.permission.BROADCAST_STICKY
  9. android.permission.CHANGE_NETWORK_STATE
  10. android.permission.CHANGE_WIFI_MULTICAST_STATE
  11. android.permission.CHANGE_WIFI_STATE
  12. android.permission.CHANGE_WIMAX_STATE
  13. android.permission.DISABLE_KEYGUARD
  14. android.permission.EXPAND_STATUS_BAR
  15. android.permission.FLASHLIGHT
  16. android.permission.GET_ACCOUNTS
  17. android.permission.GET_PACKAGE_SIZE
  18. android.permission.INTERNET
  19. android.permission.KILL_BACKGROUND_PROCESSES
  20. android.permission.MODIFY_AUDIO_SETTINGS
  21. android.permission.NFC
  22. android.permission.READ_SYNC_SETTINGS
  23. android.permission.READ_SYNC_STATS
  24. android.permission.RECEIVE_BOOT_COMPLETED
  25. android.permission.REORDER_TASKS
  26. android.permission.REQUEST_INSTALL_PACKAGES
  27. android.permission.SET_TIME_ZONE
  28. android.permission.SET_WALLPAPER
  29. android.permission.SET_WALLPAPER_HINTS
  30. android.permission.SUBSCRIBED_FEEDS_READ
  31. android.permission.TRANSMIT_IR
  32. android.permission.USE_FINGERPRINT
  33. android.permission.VIBRATE
  34. android.permission.WAKE_LOCK
  35. android.permission.WRITE_SYNC_SETTINGS
  36. com.android.alarm.permission.SET_ALARM
  37. com.android.launcher.permission.INSTALL_SHORTCUT
  38. com.android.launcher.permission.UNINSTALL_SHORTCUT

Dangerous Permission: This type of permission must be applied at run time
  
 
  1. CALENDAR:READ_CALENDAR;WRITE_CALENDAR
  2. CAMERA:CAMERA
  3. CONTACTS:READ_CONTACTS;WRITE_CONTACTS;GET_ACCOUNTS
  4. LOCATION:ACCESS_FINE_LOCATION;ACCESS_COARSE_LOCATION
  5. MICROPHONE:RECORD_AUDIO
  6. PHONE:READ_PHONE_STATE;CALL_PHONE;READ_CALL_LOG;WRITE_CALL_LOG;ADD_VOICEMAIL;USE_SIP;PROCESS_OUTGOING_CALLS
  7. SENSORS:BODY_SENSORS
  8. SMS:SEND_SMS;RECEIVE_SMS;READ_SMS;RECEIVE_WAP_PUSH;RECEIVE_MMS
  9. STORAGE:READ_EXTERNAL_STORAGE;WRITE_EXTERNAL_STORAGE

The API23 check and request permissions are as follows: checkselfpermissionAnd requestpermissions(API23) The process is:First check whether there is permission, if there is a direct call, if not, then request permission, then the user agreed or refused, the activity's Onrequestpermissionsresult will be callback to notify the result (through the third parameter).
If the user denies permission for the first time, the next timeuse when requestpermissions.Shouldshowrequestpermissionrationale to explain to the user.
third-party framework for permissions: Https://github.com/hotchemi/PermissionsDispatcher
Reference:Android 6.0 permissions: http://www.cnblogs.com/zqlxtt/p/4873831.html bubble online Explanation: http://www.jcodecraeer.com/a/anzhuokaifa/ Androidkaifa/2015/0830/3387.html


From for notes (Wiz)

Android 6.0 new Features: Permissions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.