Page 1 of 1

Call Record/Image Capture

Posted: January 25th, 2017, 12:52 am
by vipul315singhal
Hi Development Team,

Can we call any other App/function of Android device in CsPro while filling response in CAPI.
Like during interview, Is it possible to capture the image? or Can we record the voice in between the interview?
I hope by doing this we can improve the quality of the survey.

If possible please do share us the function by which we can call the other apps.

Many Thanks In Advance!

Regards
Vipul

Re: Call Record/Image Capture

Posted: January 25th, 2017, 6:12 am
by josh
Look in the help under execsystem (Android). It shows how to launch the camera to take photos and how to launch other Android activities. Recording audio is not currently possible.

Re: Call Record/Image Capture

Posted: February 9th, 2017, 12:49 am
by asmarketing
When taking the photo in a new case the first photo is replaced, how to create a variable name according to each case ?, try to add in the code the case ID at the end of the name, but it did not work.

Code: Select all

execsystem("camera:/storage/emulated/0/csentry/nueva carpeta/images/load/photo %d.png", id);

Re: Call Record/Image Capture

Posted: February 9th, 2017, 7:18 am
by josh
You can't use substitutions (%s, %d) directly in execsystem. Use maketext() for the substitution and pass the result to execsystem:
execsystem(maketext("camera:/storage/emulated/0/csentry/nueva carpeta/images/load/photo %d.png", id));
See http://teleyah.com/cspro/SouthAfricaOct ... diaGPS.pdf and http://teleyah.com/cspro/SouthAfricaOct ... rcises.zip for more examples.

Re: Call Record/Image Capture

Posted: February 9th, 2017, 10:30 am
by asmarketing
Thanks, josh!!! :D