1

This is my code. I have read other's post about this issue. They said their code worked very well. And my code almost the same as theirs. Why doesn't it work in my test. my device is Samsung I9300.

   <application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.haibin.androidtest.MainActivity"
        android:label="@string/app_name"
        android:exported="true" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <data android:scheme="haibintest"/>

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

ps: I using "adb -d shell am start -d haibintest:// -a android.intent.action.VIEW" on command line and it launch susccessfully, while use the url in the brower does't work.

ps2: I test it in opera and it work very well , so i know it will not work in some browers and devices.

1 Answer 1

1

To use url scheme inside adb you can use the following command line:

adb shell 'am start "intent:#Intent;scheme=yourscheme://yoururl?param1=value1;end"'

Or you can even do it with QrCodes: Go to ZXing and generate a url of this format:

yourscheme://yoururl?param1=value1

Then scan it with a QrCode app like BarcodeScanner

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.