So i have a simple Question , it is Possible to Handle the Method onActivityResult() in a Service if this Activity was Started from the Same Service (Using Intent) ?
In My Case , i want to start SpeechRegnition , Speak , and Get the Result on the Service , Everything on Background (Main Service Start from a Widget) ,
Thanks .
Thanks for a recent downvoting, whoever it was. The previous answer I gave back in 2012 is a total nonsesnse so I decided to write a proper one.
You can not handle Activity result in a Service, but you can pass any data retrieved from onActivityResult() to a Service.
If your Service is already running, you can call startService() with a new Intent handling the event, like so
And handle action in a Service. If it is already running it will not be restarted, otherwise it will be started