2016년 12월 14일 수요일

Sound recorder crashes AI Companion


Trying to set up to record user input. Set button.click to call soundrecorder.start. On click, AI Companion crashes. Suggestions?

-- 
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.

-- 
 blocks.png
As I said, on click of button 1, ->> AI Companion crash.

-- 
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 AppInventor 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.

-- 
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.

-- 
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?

-- 
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.

-- 
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?

-- 
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.

-- 
Great! Thanks for your response and attention to this issue.

-- 
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.


-- 
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


-- 

댓글 없음:

댓글 쓰기