Audio save path

Discussions about creating CAPI applications to run on Android devices
Post Reply
Eohmer
Posts: 17
Joined: February 26th, 2019, 8:47 am
Location: Costa Rica

Audio save path

Post by Eohmer »

Hello.

I wanted to know if I could change the save path for audio recordings. I wanted to save the audios in a specific folder, not the same in which the questionaire is in.

if possible, what do I need to do?

Thanks!
khurshid.arshad
Posts: 606
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Audio save path

Post by khurshid.arshad »

Suppose your application is stored in the directory "file explorer\Android\data\gov.census.cspro.csentry\files\csentry\applicationname\". If you intend to save audio in a different folder named "file explorer\Android\data\newfolderaudio\", you can implement the following logic. I hope this solution works for you.
            if direxist("..\..\..\..\..\data\newfolderaudio\")then

            else

                dircreate
("..\..\..\..\..\data\newfolderaudio\");

           
endif;
                Recording.save("..\..\..\..\..\data\newfolderaudio\"+ audioFilename);
a.
Eohmer
Posts: 17
Joined: February 26th, 2019, 8:47 am
Location: Costa Rica

Re: Audio save path

Post by Eohmer »

I'll give it a try.

Thanks!
Post Reply