I need to ask why are you trying to do that or what are you trying to 
accomplish? I'm asking because these dialogs are modal. All interaction and 
app reactions are meant to take place within the scope of that dialog until 
*the user* makes it disappear by pressing a button. It is pretty unusual 
that the activity wants to finish while a dialog is still open.

So what happens in the background? What is the purpose of your activity and 
why does it finish while a JavaScript alert dialog is still open?

Another thing comes to my mind. The last time I had to play around with 
WebView (about a year ago) there was actually no alert popup support out of 
the box. You had to implement the dialog for yourself using a 
WebChromeClient<http://stackoverflow.com/questions/2979291/alert-in-embedded-webview>

I don't know whether the latest API versions changed something about that 
but you must be using a WebView which has an overridden, customized 
WebChromeClient that is responsible for creating these JavaScript alert 
dialogs in the first place.
I just whipped up a test application to verify that on Android version 
4.0.1.

So whatever code you are using there must be custom WebChromeClient that 
creates the dialog. Look for that code and change it in a way so you can 
dispose the dialog prior finishing the activity.

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