resolved android naming conflict

This commit is contained in:
Brock Whitten 2008-11-28 13:58:41 -08:00
commit 53cdce1b1e
9 changed files with 29 additions and 16 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.nitobi.droidgap" package="com.nitobi.phonegap"
android:versionCode="1" android:versionCode="1"
android:versionName="1.0.0"> android:versionName="1.0.0">
<uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.CAMERA" />

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="hello">Hello World, DroidGap</string> <string name="hello">Hello World, PhoneGap</string>
<string name="app_name">TransLink</string> <string name="app_name">PhoneGap</string>
<string name="url">http://phonegap.com/demo2/</string>
</resources> </resources>

View File

@ -1,4 +1,4 @@
package com.nitobi.droidgap; package com.nitobi.phonegap;
public class AccelTuple { public class AccelTuple {
public long accelX; public long accelX;

View File

@ -1,7 +1,8 @@
package com.nitobi.droidgap; package com.nitobi.phonegap;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.lang.reflect.Field;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; import android.os.Bundle;
@ -35,16 +36,26 @@ public class DroidGap extends Activity {
/* Bind the appView object to the gap class methods */ /* Bind the appView object to the gap class methods */
bindBrowser(appView); bindBrowser(appView);
/* /* Load a URI from the strings.xml file */
* We need to decide whether this is a local or a remote app. For the sake of clarity String uri = null;
* we can use HTML with both local and remote applications, but it means that we have to open the local file Class<R.string> c = R.string.class;
*/ Field f;
int i = 0;
try {
f = c.getField("url");
i = f.getInt(f);
uri = this.getResources().getString(i);
} catch (Exception e)
{
uri = "http://www.phonegap.com";
}
appView.loadUrl("http://www.infil00p.org/gap/demo/"); appView.loadUrl(uri);
} }
private void loadFile(WebView appView){ protected void loadFile(WebView appView){
try { try {
InputStream is = getAssets().open("index.html"); InputStream is = getAssets().open("index.html");

View File

@ -1,4 +1,4 @@
package com.nitobi.droidgap; package com.nitobi.phonegap;
public class GeoTuple { public class GeoTuple {
public double lat; public double lat;

View File

@ -1,4 +1,4 @@
package com.nitobi.droidgap; package com.nitobi.phonegap;
import android.content.Context; import android.content.Context;
import android.hardware.SensorManager; import android.hardware.SensorManager;

View File

@ -1,4 +1,4 @@
package com.nitobi.droidgap; package com.nitobi.phonegap;
import android.content.Context; import android.content.Context;
import android.hardware.SensorManager; import android.hardware.SensorManager;

View File

@ -1,4 +1,4 @@
package com.nitobi.droidgap; package com.nitobi.phonegap;
import android.content.Context; import android.content.Context;
import android.hardware.SensorManager; import android.hardware.SensorManager;

View File

@ -5,7 +5,7 @@
* should not be modified by hand. * should not be modified by hand.
*/ */
package com.nitobi.droidgap; package com.nitobi.phonegap;
public final class R { public final class R {
public static final class attr { public static final class attr {
@ -22,5 +22,6 @@ public final class R {
public static final class string { public static final class string {
public static final int app_name=0x7f040001; public static final int app_name=0x7f040001;
public static final int hello=0x7f040000; public static final int hello=0x7f040000;
public static final int url=0x7f040002;
} }
} }