0

I'm having problems figuring out the logistics of how to do the following on Android: load a URL in a browser, the user logs in and hits authorize, then the browser is redirected to another page that displays all of the JSON data that I need to pull out of it.

I've tried using WebView, but it seems buggy. I cannot simply have it pull up the initial URL in the default internet app because I need to pull the JSON data from the website and as far as I'm aware there isn't a way to automatically switch back to my app.

Any help is greatly appreciated!

j .Doe.123
  • 13
  • 1
  • 4

1 Answers1

0

Try to simulate a log page in the app, and instead of using a webview, send your log data in a post request look here for that.

Then you'll retrieve your JSON data, and be able to do what you want. Don't forget to load data on another thread (or use AsyncTask) to prevent UI from freezing.

I'd suggest to use services/handlers (or be care) to treat your data when your activity is active (if not, you may encounter some UI inconsistencies in the best case, crash in worst ones).

Community
  • 1
  • 1
Feuby
  • 708
  • 4
  • 7