tuxedo25 wrote: > I have an application that requires users to provide their credentials > at a website (facebook). So I launch the web browser with a View > Action Intent, wait 60 seconds, then my application attempts to use > the facebook API. > > Obviously I'm not happy with this solution. As a slightly better > option, is there any way I can "hook" the web browser that I launched > to know when a user has browsed away from that page or closed the > browser?
As of the current SDK, you have two options I can think of: 1. You could try using startSubActivity() instead of startActivity() to launch the built-in Web browser. That will let you know when the user is "done", but I don't know what will constitute "done" in this case -- I've never tried the startSubActivity/launch-browser combination before. And, if you are relying up some state, such as cookies, being around for your own application, I don't know how this will help you. 2. You could embed the WebView widget in your activity and run the Facebook login through it. You can register all sorts of hooks into the widget via WebViewClient, including one that gets invoked whenever the browser wants to load another URL, so you have some idea where the user is in the process. Are you working on an OAuth framework, by any chance? -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch in September! http://www.bignerdranch.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

