2009-11-25 09:34:35 +08:00
|
|
|
package com.phonegap;
|
|
|
|
|
2009-12-01 02:44:20 +08:00
|
|
|
import java.lang.reflect.Field;
|
|
|
|
|
2009-12-01 02:33:11 +08:00
|
|
|
import android.app.Activity;
|
2009-11-25 09:34:35 +08:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|