Android SDK web browser

I am testing a mobile browser in an Android web browser through the Android SDK on Linux, and I have a few questions:

  • Can I launch an Android Android device without the entire Android SDK?
  • Can I authorize a web browser when launching the Android virtual device / emulator?
+4
source share
2 answers

I'm not sure why you want to do 1), but 2) it is possible if you are ready to do a little work. You need to create a simple Android application that receives the BOOT_COMPLETED hardware event and then launches the browser. Once this application is installed, your browser will start automatically.

A little background knowledge: How to start an Android project

The application is quite simple. You need to declare that your application should digest the BOOT_COMPLETED event. You can do this in AndroidManifest.xml:

<application> ... <receiver class=".BrowserStartupIntentReceiver"> <intent-filter> <action android:value="android.intent.action.BOOT_COMPLETED" /> <category android:value="android.intent.category.HOME" /> </intent-filter> </receiver> </application> 

Then you just need to implement the BrowserStartupIntentReceiver class. Its only function is to convey the intention of the OS to launch the browser.

 public class BrowserStartupIntentReceiver extends IntentReceiver { @Override public void onReceiveIntent(Context context, Intent intent) { Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com")); myIntent.setLaunchFlags(Intent.NEW_TASK_LAUNCH); context.startActivity(myStarterIntent); } } 

This should start the browser when the emulator boots up. Although, perhaps you should not go to such lengths to avoid additional button presses.

+2
source

For # 2, I don’t know, and I suppose the iandisme answer is good enough, but for # 1 you can always try running live-android "(LiveCD from Android for computers) on a virtual machine.

You can also run Android in the emulator without installing the entire SDK, but I'm not quite sure.

0
source

All Articles