Skip to content

Instantly share code, notes, and snippets.

View westlinkin's full-sized avatar
🎯
Focusing

Wesley Lin westlinkin

🎯
Focusing
View GitHub Profile
/**
This code snippet shows how an Android activity can trigger a web based auth using webview and then use
the cookies from there to make subsequent calls to an API (since the api is checking the cookies to detect
sign in)
MyApplication: The root "controller" and the first activity in my app
OAuthLogin: A class that handles the web based login.
It montors the url change and if the user had been redirected to
a "success" page it sends out the cookie string to the root controller
Once the controller has the cookie, it sets those on the service that