Saturday, February 19, 2011

Re: [android-developers] How to close browser ?



On Sat, Feb 19, 2011 at 5:57 PM, cuil yahoo <cuilyahoo@gmail.com> wrote:
Appreciate the prompt response.


On Sun, Feb 20, 2011 at 4:15 AM, Mark Murphy <mmurphy@commonsware.com> wrote:
On Sat, Feb 19, 2011 at 5:33 PM, cuil yahoo <cuilyahoo@gmail.com> wrote:
> I am making an app. which uses google authentication. For this, i pass on
> intents to the browser and then using the callback method, get the token
> back to my application.

Callback method?

To allow the user to authenticate himself, i pass on a url to the browser using intent. Then when verified the browser returns a token back to a callback class. This is perhaps easier to use for authentication. I would be glad to know of other ways as well. (:


How?
 
 

> The problem i am facing is : After getting the token when i go to my next
> activity, and if i click back( which calls finish() ) it goes back to the
> browser (which i think did not close but just transferred the token and then
> remained in the background ).
>
> I want to display my main activity when i click back . It would be great if
> someone could please provide some pointers.

With regards to your subject line, you cannot close the browser. That
is another application -- you have no more rights to close some other
application than other applications have the right to close yours.

Oh...yes, agreed.  absolutely.

Off the cuff, I would think that this sort of authentication would
work better with a WebView widget, so you can control this stuff
better. Then again, I have not tried it.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in London: http://bit.ly/smand1 and http://bit.ly/smand2

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


i want my previous activity to be shown instead of the browser when i click back in the newer activity (the one which comes after the authentication).

just wondering : correct me i am wrong, if i say create an intent of my previous activity and use startActivity (intent_name), all the data stored in the previous activity would be lost ?


--
Cuil

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment