< Googles Android
Zurück zu Googles Android
Eine Pflicht für jede Android-Anwendung ist das AndroidManifest.xml-File. Es enthält die wichtigsten Informationen über eine Anwendung, welche es dem Android-System zur Verfügung stellt. Diese Informationen müssen dem System vor dem Start der Anwendung bekannt sein, damit es diese ausführen kann.
Folgendes wird im Manifest festgehalten:
- Als eindeutige ID für die Anwendung wird das Java-Package der Anwendung genannt
- Eine Auflistung aller Komponenten einer Anwendung. Dazu gehören Activities, Services, Broadcast-Receiver oder Content-Provider. Für jede dieser Komponenten werden der Klassenname und die jeweiligen Fähigkeiten angegeben.
- Alle Berechtigungen (Permissions), die benötigt werden, um bestimmte Teile der API in der Anwendung zu nutzen.
Struktur des Manifests
<?xml version="1.0" encoding="utf-8"?> <manifest> <uses-permission /> <permission /> <permission-tree /> <permission-group /> <instrumentation /> <uses-sdk /> <uses-configuration /> <uses-feature /> <supports-screens /> <compatible-screens /> <supports-gl-texture /> <application> <activity> <intent-filter> <action /> <category /> <data /> </intent-filter> <meta-data /> </activity> <activity-alias> <intent-filter> . . . </intent-filter> <meta-data /> </activity-alias> <service> <intent-filter> . . . </intent-filter> <meta-data/> </service> <receiver> <intent-filter> . . . </intent-filter> <meta-data /> </receiver> <provider> <grant-uri-permission /> <meta-data /> </provider> <uses-library /> </application> </manifest>
Hier eine Liste aller erlaubten Tags im Manifest:
- <action>[1]
- <activity>[2]
- <activity-alias>[3]
- <application>[4]
- <category>[5]
- [6]
- <grant-uri-permission>[7]
- <instrumentation>[8]
- <intent-filter>[9]
- <manifest>[10]
- <meta-data>[11]
- <permission>[12]
- <permission-group>[13]
- <permission-tree>[14]
- <provider>[15]
- <receiver>[16]
- <service>[17]
- <supports-screens>[18]
- <uses-configuration>[19]
- <uses-feature>[20]
- <uses-library>[21]
- <uses-permission>[22]
- <uses-sdk>[23]
Einzelnachweise
- ↑ http://developer.android.com/guide/topics/manifest/action-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/activity-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/activity-alias-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/application-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/category-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/data-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/grant-uri-permission-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/instrumentation-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/intent-filter-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/manifest-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/meta-data-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/permission-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/permission-group-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/permission-tree-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/provider-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/receiver-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/service-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/supports-screens-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/uses-configuration-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/uses-feature-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/uses-library-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/uses-permission-element.html. Stand 17. März 2011
- ↑ http://developer.android.com/guide/topics/manifest/uses-sdk-element.html. Stand 17. März 2011
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.