Muhammed Zeeshan Muhammed Zeeshan - 2 months ago 19
Android Question

PhoneGap URL scheme on other pages not working

Hi i have this simple app and and i use

myapp://
to open app my ANDROID APP this works file but when i use
myapp://index.html
to open a page it does not work i searched the internet but i could not find the solution can any body tell me i want to open a specific page in my APP because TWITTER does not support
myapp://
it supports only if if has any extension like
myapp://index.html


or if this is not possible is there any why i could redirect user to a url
myapp://
after login from my TWITTER application

THANKS
Muhammad Zeeshan

Answer

You can listen also http scheme as your site with a listener activity. Something like this code.

<activity android:label="@string/app_name" android:name="com.foursquare.robin.BrowsableActivity">
    <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="example.com" android:pathPrefix="/" />
        <data android:scheme="https" android:host="example.com" android:pathPrefix="/" />
    </intent-filter>
</activity>

When any platform re-route your app to your scheme will be revoked shortly.