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

Thanks for your help!


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) 
Android Training on the Ranch in September! 


Sponsored Links

Other Threads

1. BlueTooth API in 1.1?

Could anyone tell me if there is Bluetooth API in SDK 1.1?

Is bluetooth chatting already been implemented on the G Phone?


2. Browser Plugin for Android

Hello All,

My goal is to run a custom plugin on the android web browser. I have
found a "hello world" plugin, and successfully compiled with webkit.
now i have the plugin as a .so file.

what should be the next steps :-
1. where do i copy this plugin so that browser can load it?
2. How do i check if its loaded. in Firefox we can do "about:plugins"
to list plugins. anything similar available in android browser?



3. Android Platform Profiling

4. how can i upload audio file into res/raw folder

5. video playing in grayscale mode on dream

6. how to put OMX audio decoder in IDLE strate at the end of playback

7. Records not loading from database in listview