android - OnActivityResult doesn't receive data -


i started in app activity

var recordintent= new intent(recognizerintent.actionrecognizespeech); startactivityforresult(recordintent, (int)resultactivitycodes.speechresult); 

and have stoprecord function

    void stoprecord()      {             setresult(result.ok,recordintent);              finishactivity((int)resultactivitycodes.speechresult);      } 

after execute stoprecord() function called onactivityresult(int requestcode, result resultcode, intent data)

why data has been null in onactivityresult?

how stop correctly activity variable "data" not null

you need use setresult(int, intent) method in started activity before destroyed. second parameter data parameter of onactivityresult() method.


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -