how playing sound file in lazarus android ? lazarus / 43-Android ---------------------------------------------------------------------- karika · 2019-02-14 22:03 how playing sound file in lazarus android ? ---------------------------------------------------------------------- jmpessoa · 2019-02-15 10:49 LAMW??? You can try the demos:    AppMediaPlayerDemo1    AppVideoViewDemo1    AppLoadImageVideoSoundFromInternet ---------------------------------------------------------------------- karika · 2019-02-18 16:09 iam using laztoapk version #:1.8.0 now i have file sound 'hello.mp3'  How to make it work in lazarus android by MediaPlayer For example  ? ---------------------------------------------------------------------- jmpessoa · 2019-02-19 00:02 Have you a complete lazarus-android installation? if not, try here: https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/LAMW%20 Getting%20Started.txt but if you  have a complete lazarus-android installation then you can try the demos:  [LAMW folder  "....../demos/GUI"]    AppMediaPlayerDemo1    AppVideoViewDemo1    AppLoadImageVideoSoundFromInternet ---------------------------------------------------------------------- karika · 2019-02-23 11:05 thx,Yes I tried it but it is complicated, I want simple steps to use MediaPlayer on LAMW [Gui] Android jform? ---------------------------------------------------------------------- jmpessoa · 2019-02-23 20:59 Quotethx,Yes I tried it but it is complicated.... Can you do a simple "hello"  App? [just a button and some  showmessage('Hello')  to handle the button click event...] ---------------------------------------------------------------------- karika · 2019-02-23 21:41 ---------------------------------------------------------------------- karika · 2019-02-23 21:43 Why not give the answer in detail this first time to me ---------------------------------------------------------------------- jmpessoa · 2019-02-23 22:10 Hi, karika... 0) Configure paths... lazarus menu: "Tools" ---> "[LAMW] ...." --> "Paths Settings ..." 1) Your project construction is incorrect... please, do: menu "Project" ---> "New Project" ---> "LAMW [GUI] Android Module" 2) after project construction put your "mp3" file in project folder "assets" ...  [ex.  pipershut2.mp3] 3) Put a jButton and a jMediaPlayer on the form... 4) handle the button "OnClick" event: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.jButton1Click(Sender: TObject);begin  jMediaPlayer1.LoadFromAssets('pipershut2.mp3');end;  5) handle the jMediaPlayer "OnPrepared" event: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.jMediaPlayer1Prepared(Sender: TObject;  videoWidth: integer; videoHeight: integer);begin  jMediaPlayer1.Start();end;  6) Connect your device by usb cable... [you need active "mode developer"] 7) lazarus menu "Run" --> "[LAMW] Build Apk and Run" ..............Listen to the sound and enjoy! note: there are some help here: https://github.com/jmpessoa/lazandroidmodulewizard/blob/master/LAMW%20 Getting%20Started.txt ---------------------------------------------------------------------- Handoko · 2019-02-24 02:04 Quote from: karika on February 23, 2019, 10:41:41 pm I understand you want to get the answer and you're impatient. But no one here owe you money. So please don't show the red angry face. ---------------------------------------------------------------------- Deepaak · 2019-02-24 04:05 Quote from: karika on February 23, 2019, 10:41:41 pm How arrogant you are. Please be polite. ---------------------------------------------------------------------- karika · 2019-02-25 22:51 I am very sorry I did not mean this but I mean that I was angry with myself because I did not understand something that's my intention and I repeat my apology again ---------------------------------------------------------------------- karika · 2019-02-25 22:52 This succeeded me from the first time Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.jButton1Click(Sender: TObject);begin  jMediaPlayer1.SetDataSource('pipershut2.mp3');  //from  .../assets...         jMediaPlayer1.Prepare();         jMediaPlayer1.Start(); end;