Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

22
LINES

< > BotCompany Repo | #1001270 // Android Play MP3 test

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (173L/2K/6K).

!747

import android.app.*;
import android.media.*;
import android.net.*;

m {
  static Activity androidContext;
  
  p {
    File mp3 = loadLibrary("#1001269");
    final MediaPlayer mPlayer = MediaPlayer.create(androidContext, Uri.fromFile(mp3));
    
    mPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
      public void onCompletion(MediaPlayer mp) {
        mPlayer.release();
      }
    });

    mPlayer.start();
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, ufhdzwgrioxs, vouqrxazstgt

No comments. add comment

Snippet ID: #1001270
Snippet name: Android Play MP3 test
Eternal ID of this version: #1001270/1
Text MD5: f766fbe9f487815745db58e8ab312f0d
Transpilation MD5: ae75881ee8dec2b879db69ab37e7ffba
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-10-06 12:33:44
Source code size: 471 bytes / 22 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 666 / 687
Referenced in: #1001271 - androidPlayMp3
#1001272 - Test androidPlayMp3
#3000382 - Answer for ferdie (>> t = 1, f = 0)
#3000383 - Answer for funkoverflow (>> t=1, f=0 okay)