Browser doesn't return to app after authentication(in some cases)
<p>This issue is driving me mad. I'm having an app which works for almost all users. But unfortunately, some users report the same issue which is that they have troubles in opening the browser activity for authentication, and/or redirecting to the correct activity after successful authentication. 
The weird stuff is that it works for most users(95%), only some users have these issues. Does this sound familiar?</p>

<p>Detail:
i'm using Signpost Oauth to get authorization token and secret to connect to Google Data Api.</p>

<p>The problem is that I can't reproduce the problem, so debugging is not an option for me.</p>

<p>Code for opening the browser:</p>

<pre><code>@Override
protected Void doInBackground(Void... params) {     
        try {
            final String url = provider.retrieveRequestToken(consumer, Constants.OAUTH_CALLBACK_URL);
            Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)).setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_FROM_BACKGROUND);
            context.startActivity(intent);          
        } catch (Exception e) {
            //Log.e(TAG, "Error during OAUth retrieve request token", e);
        }
        return null;
    }
</code></pre>

<p>Code for retrieving tokens, after successful login:</p>

<pre><code> @Override
        public void onNewIntent(Intent intent) {
        super.onNewIntent(intent); 
            SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
            final Uri uri = intent.getData();
            if (uri != null &amp;&amp; uri.getScheme().equals(Constants.OAUTH_CALLBACK_SCHEME)) {
                Log.i(TAG, "Callback received : " + uri);
                Log.i(TAG, "Retrieving Access Token");
                new RetrieveAccessTokenTask(this,consumer,provider,prefs).execute(uri);
                finish();   
            }
        }
</code></pre>

<p>This code works for allmost all the users, just in some cases the browser activity is not opened, in other rare cases, the browser doesn't return to the app activity and stays blank.</p>

<p>Manifest:</p>

<pre><code>&lt;activity android:name="helpers.PrepareRequestTokenActivity" android:theme="@android:style/Theme.NoTitleBar" android:launchMode="singleInstance"&gt;&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.VIEW" /&gt;
                &lt;category android:name="android.intent.category.DEFAULT" /&gt;
                &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
                &lt;data android:scheme="x-oauthflow" android:host="Intro" /&gt;
            &lt;/intent-filter&gt;

        &lt;/activity&gt;
</code></pre>

<p>Thankx for your help!</p>
