Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activity URL callback not working in 4.0.3 ICS

I am using OAUTH in a twitter app which sends you to the twitter page within the app where you then sign in and are redirected back to the app where the tokens are handled. This works perfectly in android 2.0.x and 3.0.x but in 4.0 I get "Web page not available" when I try to redirect back to my application. Can anybody tell me why this is?? I have the following in my manifest file:

<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" android:host="myactivity"/>
</intent-filter>

The twitter page is given the callback URL which has been working but now does not in android 4.0 ICS, can somebody please help? Thank you.

like image 827
Android4J Avatar asked May 31 '12 01:05

Android4J


1 Answers

it is Manifesh file activity entry

    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data
        android:host="www.yourpage.address"
        android:scheme="alocola" />                //scheme name

</intent-filter>

and it is html page open in url use click go to call back

> <html> Visit my blog <?php $homepage =
> file_get_contents('http://www.example.com/api/parameters'); echo
> $homepage; ?>  <a href="alocola://other/parameters/here">   ////alocola use scehma
>  <metahttp-equiv="alocola://other/parameters/here"content="5;
> url="alocola://other/parameters/here" > mysite </a>  or run the   <a
> href=\"alocola"> myactivity</a>  callback</html>
like image 109
Sachin C Avatar answered Oct 07 '22 07:10

Sachin C