Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java android play sound file with variable

private void playMp3(String nameOfFile){
   MediaPlayer mPlayer = MediaPlayer.create(this, getResources().getIdentifier(nameOfFile, "raw", getPackageName()));
   mPlayer.start();
}
Comment

PREVIOUS NEXT
Code Example
Java :: bukkit scheduler 
Java :: java close jframe 
Java :: java random between 
Java :: sololearn java shapes coding project 
Java :: java ip regex pattern 
Java :: SpEL define default 
Java :: guess the number java 
Java :: take a value from keyboard java 
Java :: spring boot resource optional request param 
Java :: icon button java 
Java :: how to install java 11 jdk on ubuntu 20.04 
Java :: android ancestral navigation 
Java :: java find item in list by property 
Java :: update value in hashmap java 
Java :: making matrix in java 
Java :: from string to double andoird studio 
Java :: how to close the fragment by a close button in android 
Java :: prime check jaba 
Java :: JFrame text java 
Java :: Integer i = new Integer(257); byte x = i.byteValue(); System.out.print(x); 
Java :: java number padding zeros 
Java :: regex validation for special characters in java 
Java :: target element in a sorted matrix of distinct ints 
Java :: java create set with values 
Java :: go to activity android 
Java :: print 2d array in java 
Java :: java socket get ip address of client 
Java :: restart application programmatically android 
Java :: java sha256 hex digest 
Java :: java retirer derniere caractere sting 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =