wood burning stoves 2.0*
The moose likes Android and the fly likes Ask for confirmation from android service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Ask for confirmation from android service" Watch "Ask for confirmation from android service" New topic
Author

Ask for confirmation from android service

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

This is what I am trying to do :

I have a service that has a certain listener. Once that event occurs - the service wants to do some processing (say doStuff()), but before the service starts to do this processing, I want to ask user if he wants to cancel it (Through activity with dialogue theme) . So if user wants to cancel, he can do it in 30 seconds - if not cancelled; the service will start with the processing.

What is the best approach to accomplish this? I can show Activity with cancel button from service - but not sure how can I process user inputs or finish activity after specified time. Any pointers would be highly appreciated!

Thanks!
- Manish
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

Never mind - I figured out. Moved large chunk of code from Service to Activity and called Dialog from activity for my confirmation. Works great! :-)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ask for confirmation from android service
 
Similar Threads
Need opionions: GUI table design
Cancel request mechanism
How to access the request variable in the java script?
How much data can a session bean hold?
Cancel database query....