'Use library JavaObject
Public Sub GetDefaultBrowser As String
Dim Result As String
Dim jo As JavaObject
jo.InitializeContext
Dim intent As JavaObject
intent.InitializeNewInstance("android.content.Intent", Array("android.intent.action.VIEW"))
Dim uri As JavaObject
uri.InitializeNewInstance("android.net.Uri", Array("http://"))
intent.RunMethod("setData", Array(uri))
Dim pm As JavaObject
pm = jo.RunMethod("getPackageManager", Null)
Dim resolveInfo As JavaObject
resolveInfo = pm.RunMethod("resolveActivity", Array(intent, 0))
If resolveInfo.IsInitialized Then
Dim activityInfo As JavaObject
activityInfo = resolveInfo.RunMethod("activityInfo", Null)
Result = activityInfo.GetField("packageName")
Else
Result = "No default browser found."
End If
Return Result
End Sub