Updating the Android permissions so we can access all the info we need

This commit is contained in:
Joe Bowser 2008-10-15 17:41:50 -07:00
parent 9911202d5b
commit bdab7d8a02
2 changed files with 20 additions and 3 deletions

View File

@ -3,6 +3,13 @@
package="com.android.droidgap"
android:versionCode="1"
android:versionName="1.0.0">
<uses-permission android:name="android.permission.CAMERA" />
<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.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".DroidGap"
android:label="@string/app_name">
@ -12,4 +19,5 @@
</intent-filter>
</activity>
</application>
</manifest>

View File

@ -5,11 +5,14 @@ import android.hardware.SensorManager;
import android.location.Location;
import android.location.LocationManager;
import android.os.Vibrator;
import android.telephony.TelephonyManager;
public class PhoneGap {
public GeoTuple location;
public AccelTuple accel;
public static GeoTuple location;
public static AccelTuple accel;
public String uuid = getDeviceId();
public static String version = "0.1";
private Context mCtx;
@ -17,7 +20,7 @@ public class PhoneGap {
this.mCtx = ctx;
}
public void updateAccel(AccelTuple accel){
public void updateAccel() {
accel.accelX = SensorManager.DATA_X;
accel.accelY = SensorManager.DATA_Y;
accel.accelZ = SensorManager.DATA_Z;
@ -49,4 +52,10 @@ public class PhoneGap {
String test = "<p>Test</p>";
return test;
}
private String getDeviceId(){
TelephonyManager operator = (TelephonyManager) mCtx.getSystemService(Context.TELEPHONY_SERVICE);
String uniqueId = operator.getDeviceId();
return uniqueId;
}
}