Call Record/Image Capture

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
vipul315singhal
Posts: 25
Joined: March 28th, 2013, 9:17 am

Call Record/Image Capture

Post 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
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Call Record/Image Capture

Post 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.
asmarketing
Posts: 3
Joined: February 9th, 2017, 12:31 am

Re: Call Record/Image Capture

Post 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);
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Call Record/Image Capture

Post 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.
asmarketing
Posts: 3
Joined: February 9th, 2017, 12:31 am

Re: Call Record/Image Capture

Post by asmarketing »

Thanks, josh!!! :D
Post Reply