把一個網址單獨分離出來,作為一個apk,點選就可以進入該網址
import android.app.Activity;
//import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
public class MobilePortal extends Activity {
private static final String URL = "http://10086.cn/m";
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Uri uri = Uri.parse(URL);
Intent i = new Intent(Intent.ACTION_VIEW, uri);
i.setClassName("com.android.browser", "com.android.browser.BrowserActivity");
startActivity(i);
finish();
}
}