Can I hook the web browser?

by tuxedo25 » Fri, 18 Jul 2008 16:12:48 GMT


Sponsored Links
 Hi guys,

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?

Thanks for your help!
Tux

--~--~---------~--~----~------------~-------~--~----~



Can I hook the web browser?

by Mark Murphy » Fri, 18 Jul 2008 19:14:15 GMT


 


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 

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Want a background Service to show Toasts on Device Screen

Hi

I have a background service component which is reacting to changes in
network connectivity.
I would like to alert the user that a a connectivity change event has
occurred by popping
up a Toast View on the device screen.

Is this possible ? Can it be done even though a Service component does
not have a
UI associated with it ?

Thanks for any pointers

Graeme

--~--~---------~--~----~------------~-------~--~----~

2. Problem compiling Master and/or Cupcake, before and after the merge, targeting HTC Dream

I've seen that happen on (I think) recent cupcake.

Right now my priority is to get master to build "out of the box" (i.e.
without local changes), first for the emulator and then for dream. I
can't promise that I'll have time to look at cupcake-on-dream.

JBQ

On Fri, Mar 20, 2009 at 2:38 PM, abqm...@googlemail.com





-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. What are people's thoughts on flood of themes on market?

4. Scheduling a repeating task and being notified

5. How to achieve iPhone like transition effect between screens?

6. Why can not edit /init.rc on adp1 with firmware 1.1?

7. where is the link to buy adp1?