How to launch an application from an Android browser when I type "myapp: //" in the address bar

I need the browser to launch my application when I enter "myapp: //blah.com/a? B = 1 & c = 2" in the browser. I searched a lot for this topic, but the answers did not help me. Could you help me understand what I am missing?

<activity android:name=".MyAppMain"
              android:label="@string/app_name"
              android:configChanges="keyboardHidden|orientation" 
              android:screenOrientation="portrait">
        <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:scheme="myapp" /> 
        </intent-filter>
    </activity>

After installing from the Eclipse application (the "Launch from Android" application), my application can work fine on its own, but when I type "myapp: //blah.com/a? B = 1 & c = 2", the browser is simply googling for this line . Could you indicate what else I am missing? After installation, do I need to somehow register on the system that I want to handle myapp: // URLs?

+5
2

,

  <activity android:name=".ReceiveInviteActivity">

            <intent-filter >
                <category android:name="android.intent.category.BROWSABLE" />
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />

                 <data
                 android:scheme="appname" 
                 android:host="project.example.com"

                />
            </intent-filter>

        </activity>

 if (Intent.ACTION_VIEW.equals(action)) {
            final List<String> segments = intent.getData().getPathSegments();
            Log.d("LISTARRAY",segments.toString());
            String idString = segments.get(0);
            Log.d("LISTITEM",segments.get(0).getClass().toString());
            String friendId = idString.substring((idString.indexOf("="))+1);
            Log.d("friendId!",friendId);

, .

0

, : URI Android

, Android URI, URL.

0

All Articles