cordova-android/framework/src/com/phonegap/StandAlone.java
2009-11-30 10:33:11 -08:00

31 lines
689 B
Java

package com.phonegap;
import android.app.Activity;
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);
}
}