EDWARD'S LECTURE NOTES:
More notes at http://tanguay.info/learntracker
C O U R S E 
Programming Mobile Applications for Android
Adam Porter, University of Maryland
https://www.coursera.org/course/android
C O U R S E   L E C T U R E 
Android Permissions
Notes taken on June 30, 2014 by Edward Tanguay
Android uses permissions to protect resources
which applications can use cost-sensitive APIs, e.g. SMS
protects user information
system resources such as the camera
permissions are represented as strings
stored in AndroidManifest.xml file
when application wants to use a permissions
specifies a uses-permission tag in AndroidManifest.xml file
when user installs, has to accept this permission
in the earlier application, we access the contacts on the phone, here is how the app requrested the permission:
Android applications can also define and enforce permissions
e.g. your application performs a priviledged/dangerous operation
you want to put a permission on it so other applications can't invoke it
e.g. you have an app that formats an external memory card
the application can be started just by touching icon
AndroidManifest.xml file
any other application that wants to use it will have to acquire the permission
if it doesn't have permission
second application
will get permission error
to fix that, add element:
Android even allows you to set permission for components
Activity permissions
startActivity()
startActivityForResult()
Service Permissions
Context.startService()
Context.stopService()
Context.bindService()
BroadcastReceiver Permissions
ContentProvider Permissions