Why is my activity not starting at the url?

I understand that there are several similar questions, but none of the accepted answers work for me. As part of the oauth process, I want the browser to redirect the start of my activity. As I saw throughout, I created an intent filter that supposedly does this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.codesta.test"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="7" />

    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:name=".BrowsableActivity"
                  android:label="@string/app_name">
            <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="http" android:host="oauth.android.mydomain.com" />
            </intent-filter>
        </activity>

    </application>
</manifest>

However, when I open the browser and enter http://oauth.android.mydomain.com , I get a page with the error "webpage is not available." I also tried to define my own schema (which I read was generally not recommended), but that didn't work either.

I aimed at level 7 api and without success tested the code on emulated devices running 2.1 and 2.2. Any help would be greatly appreciated!

+5
4

http https, . , , . , ( ).

WebView , shouldOverrideUrlLoading WebViewClient uri . , , , , .

0

. , OAuth < META.../ > , .

META Intent, . , ​​ Location: . - Android 2.2.1, .

URL- Location: , .

EDIT: Location:, , http:// , (x-oauth://) , .

+2

, , , , .

, , :// , " url".

: , , . , , , , . URL- ( , , , URL-?)

0

...

https http.

0

All Articles