Android Question Pass some values from browser to app

sktanmoy

Active Member
Licensed User
Longtime User
I'm working with a Facebook application. As still b4a didn't release Facebook library, I've no way without using browser to get access token after app authorization.

I've used webview and did everything there, user could login from the webview, authorize application, and then I could collect access token from browser.

But user won't feel comfortable to put username/password within app. So I can easily open the default browser from the app with the required url for app authorization and access token. Is there any way so that I can collect the token from the user's browser?

I got a tutorial here, I think it should work. Can anyone help me to find a way that in b4s?
 

sktanmoy

Active Member
Licensed User
Longtime User
You can use the solution described in the link you posted (the answer that received 214 points). You should call Activity.GetStartingIntent to get the intent that caused the activity to be resumed.

I've posted here because I've failed to understand
<data android:scheme="http" android:host="twitter.com"/>
in here, I mean why twitter
B4X:
<intent-filter>
    <data android:scheme="http" android:host="twitter.com"/>
    <action android:name="android.intent.action.VIEW" />
</intent-filter>

<data android:scheme="my.special.scheme" />
in here, what my.special.scheme is, how to use etc.
B4X:
<intent-filter>
    <data android:scheme="my.special.scheme" />
    <action android:name="android.intent.action.VIEW" />
</intent-filter>

Parameters format here:
<a href="my.special.scheme://other/parameters/here">
, how can pass params here

And finally how to catch the params from b4a apps.

And how to deal with manifest, I mean direct xml editing or any way to b4a XML editor.

An example will be helpful for me and other notice like me.

Please help
 
Last edited:
Upvote 0
Top