Hi , I just began fusetools learning.I’m AngularJs developer. I want to implement audio player using fusejs? How can i do ?? Thanks
Hi!
To implement an audio player for JS you have to write a bit of Uno code to access the native players. This can be done by using a Native module and Foreign Code.
Here is some example code using Android´s MediaPlayer to get you started:
using Uno;
using Uno.Collections;
using Uno.Compiler.ExportTargetInterop;
using Fuse;
using Fuse.Scripting;
using Fuse.Reactive;
namespace JSAudioPlayer
{
public class Player : NativeModuel
{
public Player()
{
AddMember(new NativeFunction("Create", (NativeCallback)Create));
AddMember(new NativeFunction("Load", (NativeCallback)Load));
AddMember(new NativeFunction("Play", (NativeCallback)Play));
}
static object Load(Context c, object[] args)
{
var player = args[0] as IMediaPlayer;
var filePath = args[1] as string;
player.Load(filePath);
return null;
}
static object Play(Context c, object[] args)
{
var player = args[0] as IMediaPlayer;
player.Play();
return null;
}
static object Create(Context c, object[] args)
{
return MediaPlayer.Create();
}
}
static class MediaPlayer
{
public static IMediaPlayer Create()
{
if defined(Android) return new AndroidMediaPlayer();
else if defined(iOS) return new iOSMediaPlayer();
throw new NotImplementedException("MediaPlayer not implemented on this platform");
}
}
interface IMediaPlayer
{
void Load(string filePath);
void Play();
}
extern(Android) class AndroidMediaPlayer : IMediaPlayer
{
readonly Java.Object _mediaPlayerHandle;
public AndroidMediaPlayer()
{
_mediaPlayerHandle = Create();
}
public void Load(string filePath) { Load(_mediaPlayerHandle, filePath) };
public void Play() { Play(_mediaPlayerHandle); }
[Foreign(Language.Java)]
static Java.Object Create()
@{
return new android.media.MediaPlayer();
@}
[Foreign(Language.Java)]
static void Load(Java.Object handle, string filePath)
@{
((android.media.MediaPlayer)handle).setDataSource(filePath);
((android.media.MediaPlayer)handle).prepare();
@}
[Foreign(Language.Java)]
static void Play(Java.Object handle)
@{
((android.media.MediaPlayer)handle).start();
@}
}
extern(iOS) class iOSMediaPlayer : IMediaPlayer
{
public void Load(string filePath) { }
public void Play() { }
}
}
From JS this would look like this:
var MediaPlayer = requre("module-name-here");
var handle = MediaPlayer.Create();
MediaPlayer.Load(handle, "audiofile.mp3");
MediaPlayer.Play(handle);
@Vegard Strand Lende, thanks very much.Can i learn Uno without knowledge in C#??
Yes you can. If you are an absolute beginner in programming in langauges like C# or Java then I would recommend looking at C# tutorial for beginners (we dont have any Uno tutorial for beginners yet, but since Uno is a C# dialect all you learn in C# you can do in Uno (Uno conforms more or less to the C# 2.0 spec))
I added this code to my project and tried to compile it, however it is giving me an error.
JSAudioPlayer.uno(70.80): E1044: Expected ‘;’
JSAudioPlayer.uno(72.9): E1065: Expected statement or ‘}’
I looked it over, and other than “NativeModule” being misspelled in the beginning it seems to be fine. any ideas?
Wups, my mistake. The error says that there is a misssing ;
and one to may ;
at line 70. The line should look like this public void Load(string filePath) { Load(_mediaPlayerHandle, filePath); }
Hello,
Thank you for this important help, many apps uses audio player to play mp3, the code you provided is for android, is it possible for you to make a sort of “package” or a “class” for android and ios so designer like me can use with simplicity?
Thank you again.
Hi,
We agree that a package like that would be useful, but to be honest it’s not at the top of our priorities right now.
We are however prioritising features that make it easier for everyone to make and distribute Fuse packages, so if you’re lucky someone in the community will make one before we get the time to do it ourselves!
I updated a couple syntax errors, now the code is working, but I get the following error:
BUILD FAILED
/Users/user/Library/Android/sdk/tools/ant/build.xml:716: The following error occurred while executing this line:
/Users/user/Library/Android/sdk/tools/ant/build.xml:730: Compile failed; see the compiler error output for details.
using Uno;
using Uno.Collections;
using Uno.Compiler.ExportTargetInterop;
using Fuse;
using Fuse.Scripting;
using Fuse.Reactive;
namespace JSAudioPlayer
{
public class Player : NativeModule
{
public Player()
{
AddMember(new NativeFunction("Create", (NativeCallback)Create));
AddMember(new NativeFunction("Load", (NativeCallback)Load));
AddMember(new NativeFunction("Play", (NativeCallback)Play));
}
static object Load(Context c, object[] args)
{
var player = args[0] as IMediaPlayer;
var filePath = args[1] as string;
player.Load(filePath);
return null;
}
static object Play(Context c, object[] args)
{
var player = args[0] as IMediaPlayer;
player.Play();
return null;
}
static object Create(Context c, object[] args)
{
return MediaPlayer.Create();
}
}
static class MediaPlayer
{
public static IMediaPlayer Create()
{
if defined(Android) return new AndroidMediaPlayer();
else if defined(iOS) return new iOSMediaPlayer();
throw new NotImplementedException();
}
}
interface IMediaPlayer
{
void Load(string filePath);
void Play();
}
extern(Android) class AndroidMediaPlayer : IMediaPlayer
{
readonly Java.Object _mediaPlayerHandle;
public AndroidMediaPlayer()
{
_mediaPlayerHandle = Create();
}
public void Load(string filePath) { Load(_mediaPlayerHandle, filePath); }
public void Play() { Play(_mediaPlayerHandle); }
[Foreign(Language.Java)]
static Java.Object Create()
@{
return new android.media.MediaPlayer();
@}
[Foreign(Language.Java)]
static void Load(Java.Object handle, string filePath)
@{
((android.media.MediaPlayer)handle).setDataSource(filePath);
((android.media.MediaPlayer)handle).prepare();
@}
[Foreign(Language.Java)]
static void Play(Java.Object handle)
@{
((android.media.MediaPlayer)handle).start();
@}
}
extern(iOS) class iOSMediaPlayer : IMediaPlayer
{
public void Load(string filePath) { }
public void Play() { }
}
}
Hi Manol, can you please provide a few more details?
- Which Fuse version are you on?
fuse --version
, or see the menu icon - Which exact command do you use to build?
- What is the full output when the build fails? Please include
-v
to get verbose output - Which version of OS X are you on?
It would also be helpful if you could upload your full project to https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK, in case we are unable to reproduce it just from this single file.
Anders Schau Knatten wrote:
Hi Manol, can you please provide a few more details?
- Which Fuse version are you on?
fuse --version
, or see the menu icon- Which exact command do you use to build?
- What is the full output when the build fails? Please include
-v
to get verbose output- Which version of OS X are you on?
It would also be helpful if you could upload your full project to https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK, in case we are unable to reproduce it just from this single file.
Hi Anders.
I solve last error, to sumarize I write here the three mistakes I found:
# 1.- first line is incorrent should look like second one as Vegard said
public void Load(string filePath) { Load(_mediaPlayerHandle, filePath) };
public void Load(string filePath) { Load(_mediaPlayerHandle, filePath); }
# 2.- Aparently Android does'nt support return a string so:
throw new NotImplementedException("MediaPlayer not implemented on this platform");
throw new NotImplementedException();
# 3.- In JS Vegard wrote, require is missing an "i"
var MediaPlayer = requre("module-name-here");
var MediaPlayer = require("module-name-here");
After solving those little issues I’m getting that error
../../fuse/mp3player/build/Android/Preview/cache/MainView.g.uno(13.18): E0000: 'Fuse.Animations.Player' has no default constructor
Any hints? thank you Anders.
This is what I got by now:
<App Theme="Basic">
<DockPanel>
<StatusBarBackground Dock="Top" />
<Logea ux:Global="Logea" />
<JSAudioPlayer.Player ux:Global="Player" />
<JavaScript>
var Log = require("Logea").Log;
var MediaPlayer = require("Player");
var handle = MediaPlayer.Create();
MediaPlayer.Load(handle, "tq.mp3");
MediaPlayer.Play(handle);
function playme() {
Log("Playing Audio");
MediaPlayer.Play(handle);
}
function logea() {
Log("Hello from JavaScript!");
}
module.exports = {
logea: logea,
playme: playme
}
</JavaScript>
<StackPanel>
<Button Text="Logea" Clicked="{logea}" />
<Button Text="Play mp3 Audio" Clicked="{playme}" />
</StackPanel>
</DockPanel>
</App>
using Uno;
using Uno.Collections;
using Uno.Compiler.ExportTargetInterop;
using Fuse;
using Fuse.Scripting;
using Fuse.Reactive;
namespace JSAudioPlayer
{
public class Player : NativeModule
{
public Player()
{
AddMember(new NativeFunction("Create", (NativeCallback)Create));
AddMember(new NativeFunction("Load", (NativeCallback)Load));
AddMember(new NativeFunction("Play", (NativeCallback)Play));
}
static object Load(Context c, object[] args)
{
var player = args[0] as IMediaPlayer;
var filePath = args[1] as string;
player.Load(filePath);
return null;
}
static object Play(Context c, object[] args)
{
var player = args[0] as IMediaPlayer;
player.Play();
return null;
}
static object Create(Context c, object[] args)
{
return MediaPlayer.Create();
}
}
static class MediaPlayer
{
public static IMediaPlayer Create()
{
if defined(Android) return new AndroidMediaPlayer();
else if defined(iOS) return new iOSMediaPlayer();
throw new NotImplementedException();
}
}
interface IMediaPlayer
{
void Load(string filePath);
void Play();
}
extern(Android) class AndroidMediaPlayer : IMediaPlayer
{
readonly Java.Object _mediaPlayerHandle;
public AndroidMediaPlayer()
{
_mediaPlayerHandle = Create();
}
public void Load(string filePath) { Load(_mediaPlayerHandle, filePath); }
public void Play() { Play(_mediaPlayerHandle); }
[Foreign(Language.Java)]
static Java.Object Create()
@{
return new android.media.MediaPlayer();
@}
[Foreign(Language.Java)]
static void Load(Java.Object handle, string filePath)
@{
((android.media.MediaPlayer)handle).setDataSource(filePath);
((android.media.MediaPlayer)handle).prepare();
@}
[Foreign(Language.Java)]
static void Play(Java.Object handle)
@{
((android.media.MediaPlayer)handle).start();
@}
}
extern(iOS) class iOSMediaPlayer : IMediaPlayer
{
public void Load(string filePath) { }
public void Play() { }
}
}
If I put back that line:
throw new NotImplementedException("MediaPlayer not implemented on this platform");
I get that error
Output dir: build/Android/Debug
(7,716.69 ms)
Compiling syntax tree
Player.uno(50.19): E2009: Call to 'Uno.NotImplementedException()' has some invalid arguments (string)
(8,252.81 ms)
Build completed in 15.98 seconds.
0 Warning(s)
1 Error(s)
fuse: Errors were encountered while building the project
If I remove the line I get:
[javac] /Users/manol/Development/fuse/mp3player/build/Android/Debug/mp3/app/src/main/java/com/foreign/JSAudioPlayer/AndroidMediaPlayer.java:33: unreported exception java.io.IOException; must be caught or declared to be thrown
[javac] ((android.media.MediaPlayer)handle).setDataSource(filePath);
[javac] ^
[javac] /Users/manol/Development/fuse/mp3player/build/Android/Debug/mp3/app/src/main/java/com/foreign/JSAudioPlayer/AndroidMediaPlayer.java:34: unreported exception java.io.IOException; must be caught or declared to be thrown
[javac] ((android.media.MediaPlayer)handle).prepare();
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 2 errors
[javac] 100 warnings
BUILD FAILED
/Users/manol/Library/Android/sdk/tools/ant/build.xml:716: The following error occurred while executing this line:
/Users/manol/Library/Android/sdk/tools/ant/build.xml:730: Compile failed; see the compiler error output for details.
Total time: 2 seconds
(unknown): E0200: Android build failed
(3,121.58 ms)
Build completed in 53.36 seconds.
0 Warning(s)
1 Error(s)
fuse: Errors were encountered while building the project
Ah yes, java uses checked exceptions.
Change the Load method with this:
[Foreign(Language.Java)]
static void Load(Java.Object handle, string filePath)
@{
try
{
((android.media.MediaPlayer)handle).setDataSource(filePath);
((android.media.MediaPlayer)handle).prepare();
}
catch (java.lang.Exception e)
{
android.util.Log.d("android player", "Failed to load: " + e.getMessage());
}
@}
Thank you Vegard, I just updated the code (WORKING) with the corrections in case is helpful for somebody.
<App Theme="Basic">
<DockPanel>
<StatusBarBackground Dock="Top" />
<JSAudioPlayer.Player ux:Global="Player" />
<JavaScript>
var MediaPlayer = require("Player");
var handle = MediaPlayer.Create();
MediaPlayer.Load(handle, "tq.mp3");
MediaPlayer.Play(handle);
function playme() {
MediaPlayer.Play(handle);
}
module.exports = {
playme: playme
}
</JavaScript>
<StackPanel>
<Button Text="Play mp3 Audio" Clicked="{playme}" />
</StackPanel>
</DockPanel>
</App>
using Uno;
using Uno.Collections;
using Uno.Compiler.ExportTargetInterop;
using Fuse;
using Fuse.Scripting;
using Fuse.Reactive;
namespace JSAudioPlayer
{
public class Player : NativeModule
{
public Player()
{
AddMember(new NativeFunction("Create", (NativeCallback)Create));
AddMember(new NativeFunction("Load", (NativeCallback)Load));
AddMember(new NativeFunction("Play", (NativeCallback)Play));
}
static object Load(Context c, object[] args)
{
var player = args[0] as IMediaPlayer;
var filePath = args[1] as string;
player.Load(filePath);
return null;
}
static object Play(Context c, object[] args)
{
var player = args[0] as IMediaPlayer;
player.Play();
return null;
}
static object Create(Context c, object[] args)
{
return MediaPlayer.Create();
}
}
static class MediaPlayer
{
public static IMediaPlayer Create()
{
if defined(Android) return new AndroidMediaPlayer();
else if defined(iOS) return new iOSMediaPlayer();
}
}
interface IMediaPlayer
{
void Load(string filePath);
void Play();
}
extern(Android) class AndroidMediaPlayer : IMediaPlayer
{
readonly Java.Object _mediaPlayerHandle;
public AndroidMediaPlayer()
{
_mediaPlayerHandle = Create();
}
public void Load(string filePath) { Load(_mediaPlayerHandle, filePath); }
public void Play() { Play(_mediaPlayerHandle); }
[Foreign(Language.Java)]
static Java.Object Create()
@{
return new android.media.MediaPlayer();
@}
[Foreign(Language.Java)]
static void Load(Java.Object handle, string filePath)
@{
try
{
((android.media.MediaPlayer)handle).setDataSource(filePath);
((android.media.MediaPlayer)handle).prepare();
}
catch (java.lang.Exception e)
{
android.util.Log.d("android player", "Failed to load: " + e.getMessage());
}
@}
[Foreign(Language.Java)]
static void Play(Java.Object handle)
@{
((android.media.MediaPlayer)handle).start();
@}
}
extern(iOS) class iOSMediaPlayer : IMediaPlayer
{
public void Load(string filePath) { }
public void Play() { }
}
}
No luck, I can compile and install the code but now:
Installing APK on 1 device(s)
Launching actitity 'mp3'
05-02 13:47:57.241 8299 10409 I ActivityManager: Start proc 29118:com.mp3/u0a223 for activity com.mp3/.mp3
05-02 13:47:57.273 29118 29118 I art : Late-enabling -Xcheck:jni
05-02 13:47:57.372 29118 29118 I LoadedApk: No resource references to update in package common
05-02 13:47:57.372 29118 29118 I LoadedApk: No resource references to update in package com.wsdeveloper.galaxys7
05-02 13:47:57.372 29118 29118 I LoadedApk: No resource references to update in package com.wsdeveloper.galaxys7
05-02 13:47:57.379 29118 29118 D mp3 : SUT: false CML: false SDK: 23
05-02 13:47:57.507 29118 29118 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36
05-02 13:47:57.697 29118 29177 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
05-02 13:47:57.759 29118 29177 I OpenGLRenderer: Initialized EGL, version 1.4
05-02 13:47:58.914 29118 29178 E MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
05-02 13:47:58.914 29118 29178 E MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
05-02 13:47:58.931 29118 29118 I mp3 : Unhandled exception:
05-02 13:47:58.931 29118 29118 I mp3 :
05-02 13:47:58.931 29118 29118 I mp3 : Name: Unhandled type in V8 marshaller: JSAudioPlayer.AndroidMediaPlayer:JSAudioPlayer.AndroidMediaPlayer
05-02 13:47:58.931 29118 29118 I mp3 : Error message: Uncaught Unhandled type in V8 marshaller: JSAudioPlayer.AndroidMediaPlayer:JSAudioPlayer.AndroidMediaPlayer
05-02 13:47:58.931 29118 29118 I mp3 : File name: MainView.ux
05-02 13:47:58.931 29118 29118 I mp3 : Line number: 13
05-02 13:47:58.931 29118 29118 I mp3 : Source line: var handle = MediaPlayer.Create();
05-02 13:47:58.931 29118 29118 I mp3 :
05-02 13:47:58.931 29118 29118 D mp3 : One or more errors occurred.
05-02 13:47:58.931 29118 29118 W System.err: java.lang.RuntimeException: One or more errors occurred.
05-02 13:47:58.934 29118 29118 W System.err: at com.Bindings.Binding_Fuse_App_FrameCallback.__n_doFrame(Native Method)
05-02 13:47:58.934 29118 29118 W System.err: at com.Bindings.Binding_Fuse_App_FrameCallback.doFrame(Binding_Fuse_App_FrameCallback.java:14)
05-02 13:47:58.934 29118 29118 W System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
05-02 13:47:58.934 29118 29118 W System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:670)
05-02 13:47:58.934 29118 29118 W System.err: at android.view.Choreographer.doFrame(Choreographer.java:603)
05-02 13:47:58.934 29118 29118 W System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
05-02 13:47:58.934 29118 29118 W System.err: at android.os.Handler.handleCallback(Handler.java:739)
05-02 13:47:58.934 29118 29118 W System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
05-02 13:47:58.934 29118 29118 W System.err: at android.os.Looper.loop(Looper.java:148)
05-02 13:47:58.934 29118 29118 W System.err: at android.app.ActivityThread.main(ActivityThread.java:5466)
05-02 13:47:58.935 29118 29118 W System.err: at java.lang.reflect.Method.invoke(Native Method)
05-02 13:47:58.935 29118 29118 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-02 13:47:58.935 29118 29118 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-02 13:47:58.935 29118 29118 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdeadcab1 in tid 29118 (com.mp3)
05-02 13:47:59.047 256 256 F DEBUG : pid: 29118, tid: 29118, name: com.mp3 >>> com.mp3 <<<
05-02 13:48:00.213 29118 29118 W com.mp3 : type=1701 audit(0.0:6143): auid=4294967295 uid=10223 gid=10223 ses=4294967295 subj=u:r:untrusted_app:s0:c512,c768 reason="memory violation" sig=11
05-02 13:48:00.272 8053 8053 I Zygote : Process 29118 exited due to signal (11)
05-02 13:48:00.412 8299 9089 I ActivityManager: Process com.mp3 (pid 29118) has died
Process com.mp3 terminated.
Hmm, looks like JS wont let us use an Uno object as a handle, try this:
public class Player : NativeModule
{
public Player()
{
AddMember(new NativeFunction("Create", (NativeCallback)Create));
AddMember(new NativeFunction("Load", (NativeCallback)Load));
AddMember(new NativeFunction("Play", (NativeCallback)Play));
}
static int _playerCount = 0;
static Dictionary<int, IMediaPlayer> _players = new Dictionary<int, IMediaPlayer>();
static object Load(Context c, object[] args)
{
var player = _players[(int)args[0]];
var filePath = args[1] as string;
player.Load(filePath);
return null;
}
static object Play(Context c, object[] args)
{
var player = _players[(int)args[0]];
player.Play();
return null;
}
static object Create(Context c, object[] args)
{
var id = _playerCount++;
_players.Add(id, MediaPlayer.Create());
return id;
}
}
Sorry Vegard now:
Player.uno(23.26): E3102: There is nothing named '_players' accessible in this scope. Did you perhaps misspell '_player' (as in 'Fuse.Video.VideoContainer._player')? Could you be missing a package reference?
Player.uno(33.26): E3102: There is nothing named '_players' accessible in this scope. Did you perhaps misspell '_player' (as in 'Fuse.Video.VideoContainer._player')? Could you be missing a package reference?
Player.uno(40.22): E3102: There is nothing named '_playerCount' accessible in this scope. Are you missing a package reference?
Player.uno(41.13): E3102: There is nothing named '_players' accessible in this scope. Did you perhaps misspell '_player' (as in 'Fuse.Video.VideoContainer._player')? Could you be missing a package reference?
(43,196.68 ms)
Are you sure you copied all of the code? It compiles when I test it
Really really sorry I missed a line, but getting those errors:
Installing APK on 1 device(s)
Launching actitity 'mp3'
05-02 15:31:49.812 12683 12683 I Thread-1482: type=1400 audit(0.0:6996): avc: denied { search } for name="13634" dev="proc" ino=5676857 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:r:zygote:s0 tclass=dir permissive=1
05-02 15:31:49.812 218 218 W auditd : type=1302 audit(0.0:6996): item=0 name="/proc/13634/status" inode=5673935 dev=00:03 mode=0100444 ouid=0 ogid=0 rdev=00:00 obj=u:r:zygote:s0
05-02 15:31:49.818 8299 8585 I ActivityManager: Start proc 13634:com.mp3/u0a225 for activity com.mp3/.mp3
05-02 15:31:49.861 13634 13634 I art : Late-enabling -Xcheck:jni
05-02 15:31:50.066 13634 13634 I LoadedApk: No resource references to update in package common
05-02 15:31:50.066 13634 13634 I LoadedApk: No resource references to update in package com.wsdeveloper.galaxys7
05-02 15:31:50.066 13634 13634 I LoadedApk: No resource references to update in package com.wsdeveloper.galaxys7
05-02 15:31:50.125 13634 13634 D mp3 : SUT: false CML: false SDK: 23
05-02 15:31:50.302 13634 13634 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36
05-02 15:31:50.535 13634 13687 D OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
05-02 15:31:50.601 13634 13687 I OpenGLRenderer: Initialized EGL, version 1.4
05-02 15:31:51.537 13634 13689 E MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
05-02 15:31:51.538 13634 13689 E MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
05-02 15:31:51.554 13634 13634 I mp3 : Unhandled exception:
05-02 15:31:51.554 13634 13634 I mp3 :
05-02 15:31:51.554 13634 13634 I mp3 : Name: Object reference was null
05-02 15:31:51.554 13634 13634 I mp3 : Error message: Uncaught Object reference was null
05-02 15:31:51.554 13634 13634 I mp3 : File name: MainView.ux
05-02 15:31:51.554 13634 13634 I mp3 : Line number: 14
05-02 15:31:51.554 13634 13634 I mp3 : Source line: MediaPlayer.Load(handle, "tq.mp3");
05-02 15:31:51.554 13634 13634 I mp3 :
05-02 15:31:51.555 13634 13634 D mp3 : One or more errors occurred.
05-02 15:31:51.555 13634 13634 W System.err: java.lang.RuntimeException: One or more errors occurred.
05-02 15:31:51.566 13634 13634 W System.err: at com.Bindings.Binding_Fuse_App_FrameCallback.__n_doFrame(Native Method)
05-02 15:31:51.566 13634 13634 W System.err: at com.Bindings.Binding_Fuse_App_FrameCallback.doFrame(Binding_Fuse_App_FrameCallback.java:14)
05-02 15:31:51.566 13634 13634 W System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:856)
05-02 15:31:51.566 13634 13634 W System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:670)
05-02 15:31:51.566 13634 13634 W System.err: at android.view.Choreographer.doFrame(Choreographer.java:603)
05-02 15:31:51.566 13634 13634 W System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
05-02 15:31:51.566 13634 13634 W System.err: at android.os.Handler.handleCallback(Handler.java:739)
05-02 15:31:51.566 13634 13634 W System.err: at android.os.Handler.dispatchMessage(Handler.java:95)
05-02 15:31:51.566 13634 13634 W System.err: at android.os.Looper.loop(Looper.java:148)
05-02 15:31:51.566 13634 13634 W System.err: at android.app.ActivityThread.main(ActivityThread.java:5466)
05-02 15:31:51.566 13634 13634 W System.err: at java.lang.reflect.Method.invoke(Native Method)
05-02 15:31:51.566 13634 13634 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-02 15:31:51.566 13634 13634 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-02 15:31:51.567 13634 13634 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdeadcab1 in tid 13634 (com.mp3)
05-02 15:31:51.693 256 256 F DEBUG : pid: 13634, tid: 13634, name: com.mp3 >>> com.mp3 <<<
05-02 15:31:55.107 13634 13634 W com.mp3 : type=1701 audit(0.0:7038): auid=4294967295 uid=10225 gid=10225 ses=4294967295 subj=u:r:untrusted_app:s0:c512,c768 reason="memory violation" sig=11
05-02 15:31:55.176 8299 9056 I ActivityManager: Process com.mp3 (pid 13634) has died
05-02 15:31:55.187 8053 8053 I Zygote : Process 13634 exited due to signal (11)
05-02 15:31:55.495 8299 9083 W InputMethodManagerService: Got RemoteException sending setActive(false) notification to pid 13634 uid 10225
Process com.mp3 terminated.
Process com.mp3 terminated.