Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have done it in this project (the project is not finished (ie polished) but fast forward works):</p> <p><a href="https://bitbucket.org/owentech/epileptic-gibbon-android" rel="nofollow">https://bitbucket.org/owentech/epileptic-gibbon-android</a></p> <p>Take a look at playerfragment.java :</p> <p>I handle this by using Threads to fast forward the mediaplayer.</p> <p>Example code from project:</p> <pre><code>/*******************************/ /* Fast-Forward button actions */ /*******************************/ ffbutton.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View arg0, MotionEvent event) { switch (event.getAction() ) { case MotionEvent.ACTION_DOWN: arrays.fastforwardpressed = true; FastForwardThread newFFThread = new FastForwardThread(); arrays.fastforwardfrom = mp.getCurrentPosition(); arrays.fastforwardto = arrays.fastforwardfrom; newFFThread.start(); break; case MotionEvent.ACTION_UP: arrays.fastforwardpressed = false; mp.seekTo(arrays.fastforwardto); break; } return true; } }); public class FastForwardThread extends Thread { public FastForwardThread() { super("FastForwardThread"); } public void run() { while (arrays.fastforwardpressed == true) { arrays.fastforwardto = arrays.fastforwardto + 10000; int fastforwardseconds = arrays.fastforwardto / 1000; int hours = fastforwardseconds / 3600, remainder = fastforwardseconds % 3600, minutes = remainder / 60, seconds = remainder % 60; String Hours = Integer.toString(hours); String Minutes = Integer.toString(minutes); String Seconds = Integer.toString(seconds); if (Hours.length() == 1) { Hours = "0" + Hours; } if (Minutes.length() == 1) { Minutes = "0" + Minutes; } if (Seconds.length() == 1) { Seconds = "0" + Seconds; } arrays.formattedfftime = Hours + ":" + Minutes + ":" + Seconds; fastforwardHandler.sendEmptyMessage(0); try { sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload