Listening for JSON data after authenticating (OAuth) through an Intent

I have an app that i am writing that requires a user to authenticate through OAuth, and then returns some JSON with a Secret key etc. I am achieving this through a browser Intent, and the information is returning to the browser but not the application. There are multiple stages to the authentication inside the browser, with the user inputting their email and password twice before the JSON is returned.

My question is this - is there anyway to set up a listener for that Intent that returns the data from the Intent when the browser finally loads the JSON response page?

Thanks in advance.


If you mean by saying "browser" an Android system browser, then answer is no. You should use Webview for this task.


OAuth process had to be done like this:

  • Open webview for user to login.
  • Set onPageStarted listener to handle specific url after user login. In that response you can get token.

    webview.setWebViewClient(new WebViewClient() {
        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            //get token here. Most often token is added to url
  • After you have token, make separate request with HttpURLConnection or any other connection.

If you actually must do everything in WebView and want to get page content look at this thread

Need Your Help

Operation could destabilize the runtime?

c# .net linq linq-to-sql .net-3.5

I'm having a little bit of trouble understanding what the problem is here. I have a bit of code that pulls records from a database using LINQ and puts them into an object which is cast into an

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.