How to get the current minute for playing YouTube video in Android
<p>I have the YouTube player embedded in my Android application. I want to get the current minute of the video playing once I press the device's back button. I tried doing this:</p>

<pre><code>  @Override
public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) {

    Log.d(TAG , "onInitializationSuccess(Provider, YouTubePlayer, boolean ) - Ini ");

    if(!b) {
        youTubePlayer.cueVideo(getIntent().getStringExtra("VIDEO_ID"));
        int minute  = youTubePlayer.getCurrentTimeMillis();

    }

    Log.d(TAG , "onInitializationSuccess(Provider, YouTubePlayer, boolean ) - Fi ");

}
</code></pre>

<p>but without success; the minute is always 0. I don't know why.</p>

<p>Any help?</p>