Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

android stop audio playing by activity lifecycle

@Override
    protected void onStop() {
        super.onStop();
        backgroundmusic.pause();
        length = backgroundmusic.getCurrentPosition();  
    }

@Override
    protected void onResume() {
        super.onResume();
        backgroundmusic.seekTo(length);
        backgroundmusic.start();
    }
Comment

PREVIOUS NEXT
Code Example
Java :: longest subarray with equal 0 and 1 
Java :: add external JARs to java vscode 
Java :: javacal 
Java :: java deserialize json array 
Java :: pack in swing 
Java :: java 8 lambda delete from list 
Java :: set maven goals in eclipse 
Java :: calculate tip and sales tax function 
Java :: How do I retrieve editors registered for a certain file extension in Eclipse? 
Java :: How can I add a listener on the ok button of JOptionPane 
Java :: Iterating an Array Using While Loop 
Java :: java nom de la methode actuel 
Java :: number guessing game in java using oops 
Java :: Java HashMap Class Declaration 
Java :: how to getobject from id in controlp5 
Java :: charstreams cannot be resolved 
Java :: download sources and javadoc 
Java :: media style dependency androidx 
Java :: call method without creating object java 
Java :: add dynamic view in android from xml 
Java :: android java shared preferences 
Java :: extracting kubernetes podname from java 
Java :: Hibernate/JPA criteria query 
Java :: how to save rich text format in database using java 
Java :: Java 8 merge multiple collections. 
Java :: sealed interface java codegrepper 
Java :: Calling the Pre-Defined Method in Java 
Java :: firebase timestamp to textview 
Java :: Quartz spring maven driver 
Java :: bakht k takht sy yaklakht utara hwa shaks tuny dekha hai kbi jeet k hara hwa shaks in urdu 
ADD CONTENT
Topic
Content
Source link
Name
5+3 =