2

I am new to android application development.

I want to fetch the list of installed browser names on android mobile through the application. How can I do that?

  • based on your comment on one answer... know that getting the browsing history in all the browsers installed on the device will be much more challenging than just getting a list of the browsers... some (most?) of them may not expose any interface to provide you that data... – Matthieu Apr 28 '12 at 01:47

2 Answers2

3

I did not test this, but the most obvious way should be to use the PackageManager to find what application / Activity can resolve the Intent to browse a web address.

The function you are looking for is there : http://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent, int)

The Intent should have action ACTION_VIEW and the data could be "http://www.google.com" or any web URL you would like (as long as it starts with http)

Matthieu
  • 16,103
  • 10
  • 59
  • 86
0

From your question I infer you probably want the user to choose a browser to open a URL?! If you simply want the user to pick one of the installed browsers to open a URL given by your app, you don't have to display a list of them yourself. Android will care about it; see this

Community
  • 1
  • 1
Alexander
  • 1,068
  • 6
  • 22
  • Thanks a lot for your reply. Actually i want identify all the browsers at run time to fetch the browser history in my application. – Sarala Hegde Apr 27 '12 at 12:37