My application does not appear when I click on share in the browser in candy 5.1

I try to open my application when you click share on any web link. How can I do it? Do I need to allow an ad? I added the code below, but I do not see my application on the shared list. How can I make it work. I really appreciate any help.

manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="example.link" >

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />

                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data
                    android:scheme="http" android:host="*" />
            </intent-filter>
        </activity>
    </application>

</manifest>

Gradle:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "example.link"
        minSdkVersion 22
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
+2
source share
2 answers

You must add the code below to the activity you want to open by clicking on the share

<intent-filter android:label="Your app Name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
+1
source

try using the '*' wildcard char for the Host and Path Pattern fields. The filter of my intention is as follows:

<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:host="*"
                android:pathPattern="/*"
                android:scheme="http" />
            <data
                android:host="*"
                android:pathPattern=".*"
                android:scheme="custom" />
        </intent-filter>

, - , choser.

0

All Articles