Tuesday, February 19, 2013

Re: RPC call in Activity onStop()

I don't see why it should not work. You can do an RPC request in Activity.onStop() but you have to be aware of the fact that the activity will continue to stop while the request is pending. So your request's callback should not do anything that depends on the activity state or its view (which will be detached after the activity is stopped).

You can also do a RPC request in Window.addClosingHandler() which will be called before the window/tab gets closed. But again in this case the callback is probably never called as the window/tab gets closed while the request is pending. All you could do here is telling the server that the app "terminates" now and let the server invalidate the users session for example.

Have you checked FireBug/Chrome Devtools and verified that no last request is made?

-- J.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate