android - finishActivity doesn't recognize in Fragment -
i start speech recognition service mainactivity
startactivityforresult
, put onactivityresult
in main. stop service finishactivity in mainactivity
. work o.k.
now pass active of service fragment
, onactivityresult
in fragment
. there replay. when put finishactivity in fragment
mark in red , didn't recognize it.
it need activity add before getactivity.finishactivity(the request code)
, run. doesn't close service more. problem? bar.
try using this.stopself() if in same service
or inside onactivityresult try calling stopservice(intent)
refer
alternative finish() method service class? kill dead
for same
Comments
Post a Comment