Media recorder Not Working in Desktop Application

26 views
Skip to first unread message

john david

unread,
Sep 10, 2014, 10:44:51 AM9/10/14
to codenameone...@googlegroups.com
Good day, i created an application that uses MediaRecorder, it creates a file in my application directory and records into it, it worked fine. But later i decided to make a desktop version of it without sending it to the build server by following the instructions i found here Creating builds for non-mobile platforms (windows, linux mac) . My app is working fine, but i don't think it does the recording, infacts it throws a null pointer exception and the file path it shows when i try to show it with a dialog is something like this file://homeaudioSample1410359700375. Which makes me know that it seems to behaving like it is running in simulator. So i decided to run the jar from the command prompt and what i got was an error: not supported in simulator. What is the solution to this as i want the app to also run on non-mobile platform, or is there no other way around this except sending it to the build server. Thanks in Advance.

Shai Almog

unread,
Sep 10, 2014, 11:33:26 AM9/10/14
to codenameone...@googlegroups.com
Yes we didn't get much demand for that so it didn't get done.
You can use a native interface for that and do the recoding code using Java SE 7 which is a bit painful (the media API's in SE are just awful): http://www.codenameone.com/how-do-i---access-native-device-functionality-invoke-native-interfaces.html
Reply all
Reply to author
Forward
0 new messages