I create a simple app with webview
that can handle/open any URL. But the problem is that my app will not be shown in open with list when I click on any hyperlinks.
As shown in above image I click on a hyperlink and it popup an open with list but my app is not shown here. So, I want to show my app also shown in this open with list.
Manifest code:
<application
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name="biz.coolpage.aashish.app.MainActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:theme="@style/AppTheme.Translucent.Light"
android:hardwareAccelerated="true"
android:launchMode="singleInstance"
android:alwaysRetainTaskState="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="text/link"
android:scheme="http" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<data android:mimeType="text/plain"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
To change default apps in Android, go to Settings > Apps > Default apps and pick which category you want to set a default app for. Then select the app you want to use for this category.
If you have a newer Android phone, swipe up from the bottom-right corner of the screen. If your phone has physical navigation buttons, press the square app switcher button next to the home button. There may also be an icon with three vertical lines to access the app switcher.
Tap the three horizontal lines at the top right of the screen and then, in the menu, tap "My apps & games." Here, you'll have two options. 3. At the top of the screen, tap "Installed." As the name suggests, this is a list of all the apps that are currently installed on this phone.
Add another activity with this intent filter
<activity
android:label="MyBrowser" android:name="BrowserActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="http"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With