Skip to first unread message
Assigned to ewpa...@gmail.com by me

Ken Albright

unread,
Dec 14, 2016, 1:54:58 PM12/14/16
to MIT App Inventor Forum
Trying to set up to record user input. Set button.click to call soundrecorder.start. On click, AI Companion crashes. Suggestions?

Thx.

Taifun

unread,
Dec 14, 2016, 5:00:02 PM12/14/16
to MIT App Inventor Forum
How to use the Sound Recorder

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 


Ken Albright

unread,
Dec 14, 2016, 5:37:49 PM12/14/16
to MIT App Inventor Forum

As I said, on click of button 1, ->> AI Companion crash.
Auto Generated Inline Image 1

Taifun

unread,
Dec 14, 2016, 5:46:51 PM12/14/16
to MIT App Inventor Forum
did you try the example project?
which device/Android version are you using?
to find out more about the Runtime Error, you can use Logcat

I normally use Eclipse and Logcat there, but if you have installed the App Inventor Software (see also http://appinventor.mit.edu/explore/ai2/setup-emulator.html), you already have everything you need to use logcat...

How to use Logcat
  1. connect your device using USB with your computer
  2. in File Manager go to the App Inventor directory, which is  C:\Program Files\App Inventor or similar
  3. press Shift and right mouse click the subdirectory commands-for-Appinventor to get the context menu
  4. select "open command window here" and you will get a command window of that subdirectory
  5. enter adb logcat and the logcat will start running
  6. start your app to elicit the error
  7. copy the log (see below)
To copy your log, right click, click "select all" and enter to copy the complete log into the clipboard, then open Notepad and paste it using ctrl-v.

Ken Albright

unread,
Dec 15, 2016, 10:22:59 AM12/15/16
to MIT App Inventor Forum
I tried the example. Same result.

Unable to get my phone connected via USB. Will continue to work on that.

Other sites have suggested that the mic may be in use by something else. Is there any way in AI2 to force control of mic? I've disabled all apps that look like they might use the mic.

Phone is Blu Energy X Plus. Android version 5.0.

Thx!

Ken Albright

unread,
Dec 16, 2016, 6:52:00 PM12/16/16
to MIT App Inventor Forum
Update:

I downloaded your .aia file and ran it in AI2. Crashed the Companion. Made an app from it. Loaded on my phone - crashed. Loaded the same app on a different phone - no problems. Works perfectly. 

So, it's something about this phone. I can't find any settings on the phone that prohibits use of the microphone. 

I downloaded another recording app on this phone and it works fine. https://play.google.com/store/apps/details?id=com.sonymobile.androidapp.audiorecorder

So some combination of AI2 and this phone is not compatible.

Suggestions?

Evan Patton

unread,
Dec 16, 2016, 7:24:23 PM12/16/16
to MIT App Inventor Forum
Hi Ken,

This a problem we've seen before with Android 5.0. The crash appears to happen in some native code called from App Inventor for the purpose of recording the sound. Unfortunately, we don't have a fix for it yet and it only appears to affect this version. Users on older 4.4 devices and newer 6.0 devices don't seem to have these crashes. It's not necessarily device-specific either, as we've been able to trigger the behavior inside of the emulator running an Android 5.0 build. If you have the option of upgrading the device to a newer version of Android, that is likely the fastest way to not be blocked by this.

Evan

Ken Albright

unread,
Dec 16, 2016, 7:39:15 PM12/16/16
to MIT App Inventor Forum
Thanks, Evan. Good news and bad news, eh.

I can't upgrade my Android version. Other apps are able to use the recorder on this version. What's the work-around? My app will really benefit from a recorder. Plus I don't want to put out something that won't work on certain versions of Android. Is it AI2 specific? If so, can I just go to another platform? Thoughts?

Evan Patton

unread,
Dec 16, 2016, 10:52:20 PM12/16/16
to MIT App Inventor Forum
Hi Ken,

I was made aware of this bug on Android 5.0 about a month ago but due to higher priority issues haven't had time to address it. I have no doubt that there is a workable solution, its just that our Media Utilities implementation relies on an Android API that was broken in that release. The crash itself is in native code from the AOSP, not our own code (it's even running in a different process). We are planning to do a release over the winter break, so I'll see what I can do about getting a fix together before then.

Evan

Ken Albright

unread,
Dec 17, 2016, 11:29:41 AM12/17/16
to MIT App Inventor Forum
Great! Thanks for your response and attention to this issue.

Ken Albright

unread,
Dec 21, 2016, 5:51:38 PM12/21/16
to MIT App Inventor Forum
Taifun, I don't understand why you marked that as complete. It obviously is not. The issue remains. Perhaps Evan has elevated it but it's not complete.

Taifun

unread,
Dec 21, 2016, 5:56:15 PM12/21/16
to MIT App Inventor Forum
this thread is completed, so I flagged it as complete, 
the issue is not completed, but MIT is aware of it...
I hope, this is ok for you like this

Taifun

Ken Albright

unread,
Dec 24, 2016, 7:18:53 PM12/24/16
to MIT App Inventor Forum
Actually, I don't like this. First, it is not complete. Second, you didn't answer the question so it would seem inappropriate for you to mark it complete. I don't know your status with AI, but it seems like you're a hanger-on and have no real authority. It's a bit presumptuous for you to mark something complete when it is not.

I'm hoping it will actually be complete in the near future - Evan???

Who are you, Taifun? What is your relation to MIT AI2?

Taifun

unread,
Dec 24, 2016, 8:52:15 PM12/24/16
to MIT App Inventor Forum
I'm nobody ;-)
and I just removed the "complete" flag especially for you...

Taifun


Sivaldo Santos

unread,
Dec 25, 2016, 9:15:24 AM12/25/16
to MIT App Inventor Forum
Queridos amigos, como eu faço meu trabalho fluxo, eu fiz tudo e eu não posso, alguém pode me ajudar

rádio online

Ghica

unread,
Dec 25, 2016, 9:33:31 AM12/25/16
to MIT App Inventor Forum
Sivaldo,
Create a new thread for your question. And when you do so, provide more detail about what you are trying to do.
Post your relevant blocks with it.
Cheers, Ghica.

Ghica

unread,
Dec 25, 2016, 9:43:04 AM12/25/16
to MIT App Inventor Forum
Ken,
Happy Xmas!
Hang on a bit on this forum and you will see what Taifun's authority is.
Keep in mind that App Inventor is open source and has an open community to support it. Everybody, including you, can contribute to it.
Cheers, Ghica.

Evan Patton

unread,
Jan 8, 2017, 8:02:24 PM1/8/17
to MIT App Inventor Forum
The fix for this bug has been merged into the code for the next components release.

Evan

Ken Albright

unread,
Jan 16, 2017, 7:37:38 PM1/16/17
to MIT App Inventor Forum
Thanks Evan! Do you have an idea when that release is going to happen?
Reply all
Reply to author
Forward
0 new messages