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. linux kernel programming!.

hi hello

im a mobile phone beginner programmer in korea company
(it is very big company. you may know this compnay's name.L~)
(but im not this company's employee. im a this company's corporation
company's employee.)
 frankly speaking, i wanted to be a linux programmer.
 after i graduated university. i have trained how to use and
programming in embedded linux.
 when i was ready to last embedded linux project. i got a job.
i entered this company. moblie phone programming is embedded
programming. but developer doesn't use linux.
 but i decided to work in this company.
 i have worked for two month. it is very boring.
 my assigned task is mobile phone's token.
it is very easy task and i have many free time because of it
but my worry is like this.
my first job is not linux developer. after i work for 1 year in this
company (not linux, just special platform used) can i move to other
linux company?

yappp  my first article please welcome to this group
wow i interested in android and linux. my toy held android kernel.
please let me be your friendly member.

good bye.

ps.. i  don't like winter. i'don like be alone in X-mas.
      but this week is 10's last week.
      i hope you are not alone in this x-mas


2. Using the Eclipse debugger?

Hi Guys,

Im programmign on Windows with Elcipse and a Motorola Droid.  ADB will
successfully download the code to the Droid and run it, but ive been
unable to get debugging to work either remotely or with the emulator.
(To be honest Im having multiple problems with the emulator and id
rather just not have to use it.)

Does remote debugging work? If so, how would I get it working?  If
not, does emulator debugging work and how would I get that working?

Right now my "debugging" consists of setting the text of an onscreen
text-view, but thats not a good long-term solution.


3. Downloading and using .so on the fly

4. How to change the height of a view

5. Paid apps supported in Canada?

6. Dev Tools Documentation?

7. Overlay vs ItemizedOverlay, your thoughts?