android - Google glass development - Store an array of taken photos and videos -


i have working code saving spoken text array of strings:

 @override     protected void onactivityresult(int requestcode, int resultcode,             intent data) {         if (requestcode == speech_request && resultcode == result_ok) {             list<string> results = data.getstringarraylistextra(                     recognizerintent.extra_results);             spokentext = results.get(0);             if(strarray.length>arraykey){                 strarray[arraykey]=spokentext;                 arraykey++;             }         } 

i want same not spoken text, photos , videos took. example, take photos using this:

private void takepicture() {         intent intent = new intent(mediastore.action_image_capture);         startactivityforresult(intent, take_picture_request);     } 

how can store photos , videos captured glasses each time after take them array? obviously, need add "if" case onactivityresult(), know parallel of speech_request in photos , videos.

many thanks!

you should add anothers "if" in onactivityresult image , videos.

these should like:

if (requestcode == take_video_request && resultcode == result_ok)          {             mvideopath = data.getstringextra(cameramanager.extra_video_file_path); .....            if (requestcode == take_image_request && resultcode == result_ok)          {             mimagepath = data.getstringextra(cameramanager.extra_picture_file_path); ....                 

where take_video_request , take_image_request same value pass in new intent() .

an example here:

https://developers.google.com/glass/develop/gdk/camera#capturing_images_or_video


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -