-2

I have been searching the web, and I still can’t find the answer. I have an Android app with a WebView, I am trying to make my activity the default browser for the phone. Therefore when I do a Google search in the Google search widget, it should pass the results into my WebView.

I am new to android development any examples would be highly grateful.

  • find Android source only, find default browser source, take a look at AndroidManifest.xml – Selvin Feb 20 '14 at 14:20
  • I've modified the formulation of your question in an attempt to understand what you're trying to accomplish. Can you check that these assumptions are correct? If not, please edit it to clarify. – Paul Lammertsma Feb 20 '14 at 15:54

1 Answers1

0

What I believe you are trying to ask is how to subscribe your application to intents for launching web URIs. In order to do so, you can add an intent filter to your application's manifest.

There's an example of this on Lars Vogel's blog. It boils down to this:

<application android:icon="@drawable/icon" android:label="@string/app_name">
     <activity android:name=".BrowserActivitiy"
               android:label="@string/app_name">
         <intent-filter>
             <action android:name="android.intent.action.VIEW" />
             <category android:name="android.intent.category.DEFAULT" />
             <data android:scheme="http"/>
         </intent-filter>
     </activity>
 </application>
Paul Lammertsma
  • 37,593
  • 16
  • 136
  • 187
  • Thankyou for the response, im a bit busy at the moment. But looking quickly over your links, I think they will help. Im looking to become that crappy browser lol – user3301587 Feb 20 '14 at 18:43