android custom url scheme..?

I think the problem is with the Action you defined.
There is a “android.intent.action.VIEW” which is what I think you want.

<activity android:name=".Gallery1" android:label="@string/app_name" android:launchMode="singleTask" android:screenOrientation="portrait">
        <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="cedemo" android:host="com.cedemo.scan" />

        </intent-filter>
</activity>

Try that and I bet will resolve correctly. I only made this assumption because you included the browsable category which is usually used by the Browser, which does not know of any of your custom actions. If you do want the GALLERY action as you have implied then just create 2 filters

<activity android:name=".Gallery1" android:label="@string/app_name" android:launchMode="singleTask" android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.GALLERY" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="cedemo" android:host="com.cedemo.scan" />

        </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="cedemo" android:host="com.cedemo.scan" />

        </intent-filter>
</activity>

So within the contents of your activity you can do something like:

// Value should be "toto" as in your example
String value = getData().getQueryParameter("X"); 

Leave a Comment