Page 1 of 2

MergAndroid audio record did not work on LC v 6.7.2 or above

Posted: Tue Mar 17, 2015 8:09 am
by terryho
Hi Mo

I can not use record function in MergAndroid in LC v6.7.2 or above.

After I make the apk file from LC v6.7.2 or above, then I install on the Android device. I can run my apps but when record, it will not record the voice.

Regards

Terry Ho

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Wed Mar 18, 2015 1:27 am
by monte
Hmm... ok, it may need to be re-compiled with the latest externals sdk. I'll check it out ASAP.

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Wed Mar 18, 2015 1:32 am
by monte
You've definitely tried 6.7.3 though right because there was some backwards compatibility issues with some changes in the .2 releases

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Thu Apr 02, 2015 4:14 pm
by terryho
Hi Monte,

I had test mergAndroid, which can not record audio in LC v6.7.4 and Lc v 7.0.4 (rc2).

regards

Terry Ho

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Fri Apr 03, 2015 9:08 am
by monte
@terryho have you got the permissions set in the manifest as documented?

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Sun Apr 05, 2015 4:45 am
by terryho
Hi

I did not exactly know your meaning. Please advise which document refer to the manifest ?
In my test stack, which I set the manifest to allow record voice, I had use the same stack to test on different version of LC
Lc ver 6.7.1 can record and play voice
Lc ver 6.7.2 and above can not record and play voice

Please advice what I need to change in order to record voice in Android device. Now I use MergAndroid ver 1.0.0b2

*Also I can not use MergMicrophone ver 1.0.12 on LC ver 6.7.4

Regards

Terry Ho

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Mon Apr 06, 2015 3:24 am
by monte
The permission is android.permission.RECORD_AUDIO which you need to edit the manifest inside the LiveCode app bundle to add.

I'm just about to upload a new build of mergMicrophone. Must have missed it when uploading the last lot of builds.

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Mon Apr 06, 2015 2:37 pm
by terryho
Hi Monte,

Sorry. This is my mistake. I forget to change the manifest of the new version of LC. Thanks your advice.

I will test the new version in iphone.

Regards

Terry Ho

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Tue Apr 07, 2015 1:28 am
by monte
No problem, you can also make a copy of the manifest and add it to the copy files of the stack. That way you don't need to worry about it for each release. I contributed that a while back and it was merged into LC so it should be in the newer versions.

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Tue Apr 07, 2015 7:00 pm
by jacque
you can also make a copy of the manifest and add it to the copy files of the stack.
I had no idea, is this documented anywhere? I could use it. But the last time I edited the manifest the app would not compile if there were any substantial changes to the content of the original. I could change true/false values of existing permissions but could not add any extra ones. So I'm wondering how this works -- does the fix you made overwrite the default manifest after compilation? Or did you remove the check that used to ensure the default manifest is essentially unaltered? And is the replacement manifest put into the correct place in the file hierarchy instead of where other resources go?

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Tue Apr 07, 2015 11:59 pm
by monte
jacque wrote:I had no idea, is this documented anywhere?
I'm not sure. I contributed it a while back soon after they first scriptified parts of standalone building. Unfortunately I was focussed on Android at the time and didn't go ahead and make the same change for iOS plists. All it does is look for a manifest in the copy files and use that for the template instead of loading the file from the runtime folder.
jacque wrote:But the last time I edited the manifest the app would not compile if there were any substantial changes to the content of the original. I could change true/false values of existing permissions but could not add any extra ones. So I'm wondering how this works -- does the fix you made overwrite the default manifest after compilation? Or did you remove the check that used to ensure the default manifest is essentially unaltered? And is the replacement manifest put into the correct place in the file hierarchy instead of where other resources go?
I'm not aware of any check to see if the manifest is unaltered. I don't think it exists. Are you sure there wasn't some kind of issue with the XML in your altered version that was causing the problem?

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Wed Apr 08, 2015 4:04 am
by jacque
Are you sure there wasn't some kind of issue with the XML in your altered version that was causing the problem?
Could have been, I wouldn't put it past me. But all I remember doing was copying one of the lines from the screen resolution list and pasting it under the existing ones. Then I changed the flag to something else; "XLarge" or something. Anyway, the compiler didn't like it. But that was almost 3 years ago and things may have changed, or I did something wrong.

But now that I know this, I'm sure I will be using it. Thanks for putting it in, and especially for mentioning it.

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Sun Apr 19, 2015 10:09 pm
by jacque
I just tried using an altered manifest again. I named it "AndroidManifest.xml" and included it in Copy Files, but no matter what I tried it was moved into the apk's asset folder and did not reflect my changes. (It was also deleted from the source folder after the build; I lost it and had to recreate it.) The original template file was used in the root directory, and my custom manifest was placed into the assets folder as just another additional file.

My app was made for tablets but is being shown in the Play Store as made for phones, so I need to add support for xlarge screens, and add android:targetSdkVersion="11" to the supported sdks.

I left the "$" variables in place, should I be replacing those with actual values?

Edit: I'm compiling the standalone with LC 7.0.4.

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Mon Apr 20, 2015 12:02 am
by monte
Try naming it manifest.xml.

Re: MergAndroid audio record did not work on LC v 6.7.2 or a

Posted: Mon Apr 20, 2015 6:47 am
by jacque
Thanks, but I still get a second copy of my revised manifest inside the assets folder, with the "$" variables still intact (no custom values.)

As a side note, the main manifest in the root folder is odd, it looks like a binary file, but I don't see any values in there, just the names of some variables. It isn't XML at any rate. I remember seeing this before so I think it's normal, but I don't know what it is.