forked from github/cordova-android
Finishing up the Jar
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.phonegap;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class StandAlone extends DroidGap {
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
/* Load a URI from the strings.xml file */
|
||||
Class<R.string> c = R.string.class;
|
||||
Field f;
|
||||
String uri;
|
||||
|
||||
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";
|
||||
}
|
||||
super.loadUrl(uri);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user