Hi,

I am working on a fairly complex bit of code. I would like your input to 
understand which (if any at all) of the above classes I should use.

The short description is that I have an Activity that displays local HTML5 
within a WebView. The WebView utilises a WebViewClient which intercepts URL 
requests from the HTML5 implementation (I realise that on Android the 
HTML5/javascript implementation can directly call native code but 
unfortunately the HTML5 needs to be x-platform (i.e. run on iOS) so I am 
forced to communicate through intercepting URL's that are being loaded). 
The application also has a separate Thread that I use to communicate with 
an external server across the network.

1: When the native Android code wants to do a javascript call in the 
WebView object, does this need to be done via the main application thread 
or could for instance the external server Thread do a 
WebView.loadURL("javascript:......") directly?
2: Is the HTML5/javascript implementation run by the main thread? In other 
words, is the WebViewClient.shouldOverrideUrlLoading(....) called by the 
main application thread?
3: I implemented PUSH notifications within the application and I am 
currently using a BroadCastReceiver in my Activity to receive broadcast 
messages from the cloud messaging IntentService I added. As the Activity 
already contains a Broadcastreceiver - should the external server Thread 
(in case the answer to 1 is yes) and the WebViewClient (in case the answer 
to 2 is no) also send a broadcast message to report to the Activity or 
should I implement an additional message Handler?

- on a sidenote .. I just read that I cannot perform timeconsuming actions 
from the BroadcastReceiver.onReceive(....) method. (apparently not even 
open pop-up dialogs although that is exactly what I do and works fine on 
both the simulator and a range of real devices) ... what is the solution 
here?

Hope I explained the situation clear enough :)

Cheers,

Lieuwe


-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to