Android Question WebView-problem with Pushbullet oauth-client

DonManfred

Expert
Licensed User
Longtime User
I´m writing a Pushbullet library/class together with @udg
Pushbullet allows to use the sdk for another account using oauth.
The user will be forwarded to pushbullet-site using a webview. The user log into into his account and gave access or decline the use and then he get forwarded to a return-url and token should be o this url too.
I can catch it then in urloverride event.

But at the last step the user dont get forwarded to the return url. Instead a error message appears on pushbulletsite (in webview) saying something like:

A setting Pushbullet requires to work is disabled in your browser (Local Storage). Please contact us at ...

I already send a mail to them asking whats wrong but waiting for answer.

Maybe someone here has an idea what´s going wrong here. Maybe i just need to set something special in webview setting somehow?

I would really appreciate if someone could give an advice here :)

 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Do you need to enable the WebView DOM storage?
I´m not sure. Maybe

Look at the WebSettings documentation:
Can i change this setting with webview extras (or wve2)?

Edit:
B4X:
    Activity.LoadLayout("oauth")
    we.Initialize(www)
    Dim ws As WebSettings = we.GetSettings
    ws.SetDOMStorageEnabled(True)
now i can go one step further... Seems to work.
But now it stuck when i click on Approve

Anyway: THANK YOU very much, @warwound !! Your hint was perfect it seems.
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Edit. It works... In my tests i changed the returnurl. That was my fault. Set back the one i created to use for this and now the approvement works.
B4X:
OverrideUrl(http://pushbullet.basic4android.de/?state#access_token=xxxxxxxxxxxxx)

Now i can go one step further and try to use this token as described in sdk....

THANKS AGAIN @warwound ! :)
 
Upvote 0
Top