I previously start speech recognition service from MainActivity by startActivityForResult and put onActivityResult also in the main. I also stop the service by finishActivity in the MainActivity. All work O.K.
Now I pass the active of the service to the Fragment and also the onActivityResult in the Fragment. It get there the replay. But when i put the finishActivity in the Fragment it mark it in red and didn't recognize it.
It is look it need activity so I add before getActivity.finishActivity(THE REQUEST CODE) and it run. But it is look that it doesn't close the service any more.
Where could be the problem?
Bar.