Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
geolocation [2013/04/11 20:08] admin |
— (aktuell) | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== Geolocation ====== | ||
| - | |||
| - | <code xml AndroidManifest.xml> | ||
| - | <?xml version="1.0" encoding="utf-8"?> | ||
| - | <manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
| - | package="com.example.position" | ||
| - | android:versionCode="1" | ||
| - | android:versionName="1.0" > | ||
| - | |||
| - | <uses-sdk | ||
| - | android:minSdkVersion="8" | ||
| - | android:targetSdkVersion="16" /> | ||
| - | <supports-screens | ||
| - | android:largeScreens="true" | ||
| - | android:normalScreens="true" | ||
| - | android:smallScreens="true" | ||
| - | android:resizeable="true" | ||
| - | android:anyDensity="true" /> | ||
| - | <uses-permission android:name="android.permission.VIBRATE" /> | ||
| - | <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | ||
| - | <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | ||
| - | <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> | ||
| - | <uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
| - | <uses-permission android:name="android.permission.INTERNET" /> | ||
| - | <uses-permission android:name="android.permission.RECEIVE_SMS" /> | ||
| - | <uses-permission android:name="android.permission.RECORD_AUDIO" /> | ||
| - | <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> | ||
| - | <uses-permission android:name="android.permission.READ_CONTACTS" /> | ||
| - | <uses-permission android:name="android.permission.WRITE_CONTACTS" /> | ||
| - | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | ||
| - | <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | ||
| - | <uses-permission android:name="android.permission.GET_ACCOUNTS" /> | ||
| - | <uses-permission android:name="android.permission.BROADCAST_STICKY" /> | ||
| - | | ||
| - | <application | ||
| - | android:allowBackup="true" | ||
| - | android:icon="@drawable/ic_launcher" | ||
| - | android:label="@string/app_name" | ||
| - | android:theme="@style/AppTheme" > | ||
| - | <activity | ||
| - | android:name="com.example.position.MainActivity" | ||
| - | android:label="@string/app_name" | ||
| - | android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" > | ||
| - | | ||
| - | <intent-filter> | ||
| - | <action android:name="android.intent.action.MAIN" /> | ||
| - | |||
| - | <category android:name="android.intent.category.LAUNCHER" /> | ||
| - | </intent-filter> | ||
| - | </activity> | ||
| - | </application> | ||
| - | |||
| - | </manifest> | ||
| - | </code> | ||
| - | |||
| - | <code java MainActivity.jar> | ||
| - | package com.example.position; | ||
| - | |||
| - | import android.os.Bundle; | ||
| - | import android.view.Menu; | ||
| - | import org.apache.cordova.*; | ||
| - | |||
| - | public class MainActivity extends DroidGap { | ||
| - | |||
| - | @Override | ||
| - | public void onCreate(Bundle savedInstanceState) { | ||
| - | super.onCreate(savedInstanceState); | ||
| - | super.loadUrl("file:///android_asset/www/index.html"); | ||
| - | } | ||
| - | |||
| - | |||
| - | @Override | ||
| - | public boolean onCreateOptionsMenu(Menu menu) { | ||
| - | // Inflate the menu; this adds items to the action bar if it is present. | ||
| - | getMenuInflater().inflate(R.menu.main, menu); | ||
| - | return true; | ||
| - | } | ||
| - | | ||
| - | } | ||
| - | |||
| - | </code> | ||