Help! Stranger situation in Android Audio recorder

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
terryho
Posts: 78
Joined: Mon Nov 05, 2012 2:53 pm

Help! Stranger situation in Android Audio recorder

Post by terryho » Fri Oct 12, 2018 12:04 pm

HI All,

I had two stack, Stack A is the original Android audio recorder example, which it can run and record audio in android device.

Then I copy the android audio recorder card into Stack B, which embedded the code in this stack, When run this stack and open the audio recorder card, it can not record audio and return the following error :

"error:863,9,1,Java 864,9,1, JNI exception thrown when calling native method 865,9,1, androidaudiorecorder.lcb......"

Also I had a button in this card, use mobilepick, which return error and can not display mobilePick. It seems all native android object will not work on this card. I put this button with mobilepick code into another card, the mobilepick is work correctly. I had try the following in order the fix the problem :

1. set the record audio file into specialfolderpath("external documents")
2. set the acceleratedRendering of this stack to true
3. use manually and system inclusions of android audio recorder library and etc.

Due to my Stack B has a lot of third party tools, So I cannot upload the the stack for reference.

I hope someone may face such situation can give me a hints. Otherwise I need to card out each card in piece by piece to find out the problems

Regards

Terry Ho

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4673
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Help! Stranger situation in Android Audio recorder

Post by jacque » Fri Oct 12, 2018 4:02 pm

Look in the original stack script also to see if there are required handlers that were not copied.

The mobilePick failure sounds like the button is disabled, or a group it is in is disabled. Put an answer dialog at the top of the mouseUp handler to see if it triggers.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

terryho
Posts: 78
Joined: Mon Nov 05, 2012 2:53 pm

Re: Help! Stranger situation in Android Audio recorder

Post by terryho » Sun Oct 14, 2018 11:08 am

Hi,

Thanks your advice. I had check with stack A and B to find there is no missing of library. I had include all the necessary library. But still no luck.

Also I had manually edit the manifest.xml to add permission to record audio. But fail again.

It seems I need to cut the stack into seperate card and test it.

Regards

Terry Ho

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4673
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Help! Stranger situation in Android Audio recorder

Post by jacque » Sun Oct 14, 2018 5:08 pm

Does the original script check for errors and report them? You may get a hint if you add some answer dialogs after relevant commands to report the result of it isn't empty.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4673
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Help! Stranger situation in Android Audio recorder

Post by jacque » Sun Oct 14, 2018 8:22 pm

Also, when you edited the manifest, did you do it after the standalone was built? It is better to make a copy of the default manifest, edit it, and put it into the Copy Files pane of standalone settings. LC will use your custom manifest instead of its own default one.

The dictionary says the correct permissions are automatically included when you use the library. You could try letting LC search for inclusions instead of adding inclusions manually. That may work better than changing the manifest. From the dictionary:
Note: This library requires RECORD_AUDIO, WRITE_EXTERNAL_STORAGE and CAPTURE_AUDIO_OUTPUT permissions. These will be automatically added to the application manifest when an application including this library is built.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Rich Media”