mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
resolved android naming conflict
This commit is contained in:
commit
53cdce1b1e
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.nitobi.droidgap"
|
||||
package="com.nitobi.phonegap"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0.0">
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="hello">Hello World, DroidGap</string>
|
||||
<string name="app_name">TransLink</string>
|
||||
<string name="hello">Hello World, PhoneGap</string>
|
||||
<string name="app_name">PhoneGap</string>
|
||||
<string name="url">http://phonegap.com/demo2/</string>
|
||||
</resources>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.nitobi.droidgap;
|
||||
package com.nitobi.phonegap;
|
||||
|
||||
public class AccelTuple {
|
||||
public long accelX;
|
@ -1,7 +1,8 @@
|
||||
package com.nitobi.droidgap;
|
||||
package com.nitobi.phonegap;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
@ -35,16 +36,26 @@ public class DroidGap extends Activity {
|
||||
/* Bind the appView object to the gap class methods */
|
||||
bindBrowser(appView);
|
||||
|
||||
/*
|
||||
* We need to decide whether this is a local or a remote app. For the sake of clarity
|
||||
* we can use HTML with both local and remote applications, but it means that we have to open the local file
|
||||
*/
|
||||
/* Load a URI from the strings.xml file */
|
||||
String uri = null;
|
||||
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 {
|
||||
InputStream is = getAssets().open("index.html");
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.nitobi.droidgap;
|
||||
package com.nitobi.phonegap;
|
||||
|
||||
public class GeoTuple {
|
||||
public double lat;
|
@ -1,4 +1,4 @@
|
||||
package com.nitobi.droidgap;
|
||||
package com.nitobi.phonegap;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.SensorManager;
|
@ -1,4 +1,4 @@
|
||||
package com.nitobi.droidgap;
|
||||
package com.nitobi.phonegap;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.SensorManager;
|
@ -1,4 +1,4 @@
|
||||
package com.nitobi.droidgap;
|
||||
package com.nitobi.phonegap;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.SensorManager;
|
@ -5,7 +5,7 @@
|
||||
* should not be modified by hand.
|
||||
*/
|
||||
|
||||
package com.nitobi.droidgap;
|
||||
package com.nitobi.phonegap;
|
||||
|
||||
public final class R {
|
||||
public static final class attr {
|
||||
@ -22,5 +22,6 @@ public final class R {
|
||||
public static final class string {
|
||||
public static final int app_name=0x7f040001;
|
||||
public static final int hello=0x7f040000;
|
||||
public static final int url=0x7f040002;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user