Fixing up because I lost the expired certificate

This commit is contained in:
Joe Bowser 2009-11-09 17:45:02 -08:00
parent 98dd5db8be
commit 4a027252ac
23 changed files with 76 additions and 23 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.phonegap.demo" android:versionName="1.0.1" android:versionCode="2">
package="com.phonegap" android:versionName="1.1" android:versionCode="3">
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
@ -17,7 +17,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:icon="@drawable/icon" android:label="@string/app_name"
android:debuggable="true">
android:debuggable="false">
<activity android:name=".DroidGap"
android:label="@string/app_name" android:configChanges="orientation|keyboardHidden">
<intent-filter>

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import static android.hardware.SensorManager.DATA_X;
import static android.hardware.SensorManager.DATA_Y;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
/* License (MIT)
* Copyright (c) 2008 Nitobi
* website: http://phonegap.com

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import java.io.File;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import android.webkit.WebView;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import java.io.ByteArrayOutputStream;
import java.io.IOException;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import java.util.List;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import android.provider.Contacts.ContactMethods;
import android.provider.Contacts.People;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import java.io.File;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
/* License (MIT)
* Copyright (c) 2008 Nitobi
* website: http://phonegap.com

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import java.io.*;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import java.util.HashMap;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import android.content.Context;
import android.location.Location;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
/* License (MIT)
* Copyright (c) 2008 Nitobi
* website: http://phonegap.com

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
/* License (MIT)
* Copyright (c) 2008 Nitobi
* website: http://phonegap.com

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import java.io.EOFException;
import java.io.FileOutputStream;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
/* License (MIT)
* Copyright (c) 2008 Nitobi
* website: http://phonegap.com

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
/* License (MIT)
* Copyright (c) 2008 Nitobi
* website: http://phonegap.com

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
/* License (MIT)
* Copyright (c) 2008 Nitobi
* website: http://phonegap.com

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import android.content.BroadcastReceiver;
import android.content.Context;

View File

@ -0,0 +1,53 @@
package com.phonegap;
import java.util.List;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.content.Context;
import android.webkit.WebView;
public class TempListener implements SensorEventListener {
WebView mAppView;
Context mCtx;
Sensor mSensor;
private SensorManager sensorManager;
TempListener(Context ctx, WebView appView)
{
mCtx = ctx;
mAppView = appView;
sensorManager = (SensorManager) mCtx.getSystemService(Context.SENSOR_SERVICE);
}
public void start()
{
List<Sensor> list = this.sensorManager.getSensorList(Sensor.TYPE_TEMPERATURE);
if (list.size() > 0)
{
this.mSensor = list.get(0);
this.sensorManager.registerListener(this, this.mSensor, SensorManager.SENSOR_DELAY_NORMAL);
}
}
public void stop()
{
this.sensorManager.unregisterListener(this);
}
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// TODO Auto-generated method stub
}
public void onSensorChanged(SensorEvent event) {
// We want to know what temp this is.
float temp = event.values[0];
mAppView.loadUrl("javascript:gotTemp(" + temp + ")");
}
}

View File

@ -1,4 +1,4 @@
package com.phonegap.demo;
package com.phonegap;
import android.app.Activity;