Reactive Android Development CS 4593-02T & CS 5463-01T Summer 2016
Manifest "header" <uses-permission /> <permission /> <permission-tree /> <permission-group /> <instrumentation /> <uses-sdk /> <uses-feature /> <supports-screens /> <compatible-screens /> <supports-gl-texture />
Manifest: permissions <uses-permission android:name="string" android:maxSdkVersion="integer" /> Requests permissions that must be granted by the user
Manifest: permissions <permission android:description="string resource" android:icon="drawable resource" android:label="string resource" android:name="string" android:permissionGroup="string" android:protectionLevel=[ "normal" | "dangerous" | "signature" | "signatureOrSystem"] /> Defines a new kind of permission
Manifest: Permissions <permission-tree android:icon="drawable resource" android:label="string resource" ] android:name="string" /> Provides a hierarchy for categorizing permissions
Manifest: Permissions <permission-group android:description="string resource" android:icon="drawable resource" android:label="string resource" android:name="string" /> Provides a way to group declared permissions so that they will be presented to the user at the same time.
Manifest: instrumentation Used to register a class for debugging or otherwise monitoring the application
Manifest: uses-sdk Used to declare the minimum and maximum SDK versions on which this app can run
Manifest: uses-configuration Describes hardware/software configuration required for this app. Most apps should not use this tag!
Manifest: uses-feature android:name="string" android:required=["true" | "false"] android:glEsVersion="integer" /> Defines hardware and software features that may be required or desired for the app. Can be declared more than once.
Manifest: supports-screens Can limit supported screen sizes (in broad catagories) Small Normal Large XLarge
Manifest: compatible-screens Information only, not used at runtime But can affect availability on Google Play store If defined, you must list all screens that you support Normally, you should not use this element
Manifest: supports-gl-texture Used to declare texture (bitmap) compression formats that your app supports Can be used to limit the devices that can see your app based on GPU capabilities If not specified, no filtering based on GL texture formats will be applied.
Manifest: application The only required element in a manifest! Declares Activities Services (non-UI background code) Receivers (listens for broadcast messages) Providers (provides data to multiple components/ apps) <activity-alias /> <uses-library />
Manifest: application/activity <activity> <intent-filter> <action/> <category/> <data/> </intent-filter> <meta-data/> </activity>
Manifest: example intent-filter <activity android:name="ShareActivity"> <intent-filter> <action android:name="android.intent.action.SEND"/> <category android:name="android.intent.category.DEFAULT"/> <data android:mimeType="text/plain"/> </intent-filter> </activity>
Manifest: application/provider <provider> <grant-uri-permission /> <meta-data /> <path-permission /> </provider>
Lifecycle
Lifecycle
Lifecycle
Lifecycle
Lifecycle
Persistence: Key-Value Pairs getPreferences() When you only need one properties file getSharedPreferences Named preferences file
Persistence Writing Reading Uses a SharedPreferences.Editor editor = getPreferences().edit() editor.putInt("IntKey", 5); Reading Just uses the SharedPreferences object getPreferences().getInt("IntKey", 20);