0

On the first boot itself, I want to set the default browser from the three that are already installed on the system. I do not want to give the user the option to select the default browser, I want to set it for him/her.

How do I go about it?

EDIT : The Phone is running ICS.

  • Maybe if you compose/write your own rom, can't think of any other way. – Fabian Dec 02 '13 at 11:26
  • Just wanted to add that I have access to all the code that makes up this rom. Essentially, I'm building this rom for a device which supports a network which can't have speeds beyond 128kbps. So I would like the default browser to be Opera Mini. Assuming that I have access to all the code, now would there be a way I can do this? – Prathamesh Shetye Dec 03 '13 at 16:31

3 Answers3

1

It is impossible to do. There is no API method which would allow this.

XorOrNor
  • 8,868
  • 12
  • 48
  • 81
1

To do it on first boot make one receiver,whenever boot detects on that time call any activity and on activity onCreate method write this

Intent intent = new Intent();
intent.setComponent(new ComponentName("com.google.android.browser","com.google.android.browser.BrowserActivity"));
intent.setAction("android.intent.action.VIEW");
intent.addCategory("android.intent.category.BROWSABLE");
Uri uri = Uri.parse(url);
intent.setData(uri);
try
{
    startActivity(intent);
}
catch (Exception e)
{
   e.printStackTrace();
}
Aamirkhan
  • 5,746
  • 10
  • 47
  • 74
0

This can be done if u develop your own firmware and make it a default app for internet uses.This requires the both firmware and boot permissions from the device to make ur application as the default application.

Any way you can set ur application as always to open the web pages in settings

TechArcSri
  • 1,982
  • 1
  • 13
  • 20