Saturday, November 6, 2010

[android-developers] Custom Protocol Handler

G'day guys,

I am hoping to create my own protocol handler for urls in a webview.

I have tried two approaches already. The first was to attempt
something similar to the approach defined here to create a customer
protocol handler.

http://java.sun.com/developer/onlineTraining/protocolhandlers/

This works in a command-line Java program if I correctly set the
system property java.protocol.handler.pkgs, but it does not work in
Android, probably because I cannot figure out where to define this
system property. Defining the system property in the code does not
work. I assume this is because it needs to be loaded when the
application first starts.

I have also attempted to use URL.setURLStreamHandlerFactory. This
works for creating URL objects within the code, but it does not seem
to be associated with the WebView.


Any ideas on how to get this working?


Cheers

paulb

--
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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate