0

I see the sample codes and walkthroughs on how to register your application, get the pin/uid and retrieve the access token and use it in the OnNewIntent method.

How can I do this OAuth authentication for a widget instead of an application?

1 Answer 1

2

You need to start an Activity and start the Oauth flow from there.

You can use setOnClickPendingIntent to start an Activity if the user clicks on a part of the Widget, or use a Configuration Activity to have the user authenticate himself the moment the widget is placed on the homescreen.

Sign up to request clarification or add additional context in comments.

1 Comment

I used a separate activity as you suggested. I also tried the configuration activity but i couldnT get it working. For the authentication I launch the browser and as far as I remember now, I get back in the activity with the activity callback url and parse the oauth result OnNewIntent (?). And i think this event is not available for the configuration activity.. But anyway, like i said, a separate activity did the trick..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.