Sha256: 5a5f2c795527c6dc37798df35b606ad99c1a6bfa9fa02cc1c59f4cbb347b23f7

Contents?: true

Size: 1.45 KB

Versions: 17

Compression:

Stored size: 1.45 KB

Contents

package com.rho.mediaplayer;

import android.view.KeyEvent;

import com.rhomobile.rhodes.Logger;
import com.rhomobile.rhodes.RhodesActivity;
import com.rhomobile.rhodes.extmanager.AbstractRhoListener;
import com.rhomobile.rhodes.extmanager.IRhoExtManager;

public class MediaplayerRhoListener extends AbstractRhoListener
{
	private static final String LOGTAG = "MediaplayerRhoListener";
	private static MediaplayerFactory factory;
	
	public static void registerListener(MediaplayerFactory inputFactory)
	{
		factory = inputFactory;
	}
	
	public MediaplayerRhoListener()
	{
		
	}
	
	@Override
	public void onResume(RhodesActivity activity)
	{
		Logger.D(LOGTAG, "onResume");
		if(factory != null) factory.onResume();
	}

	@Override
	public void onPause(RhodesActivity activity)
	{
		Logger.D(LOGTAG, "onPause");
		if(factory != null) factory.onPause();
	}

	@Override
	public void onStop(RhodesActivity activity)
	{
		Logger.D(LOGTAG, "onStop");
		if(factory != null) factory.onStop();
	}

	@Override
	public void onDestroy(RhodesActivity activity)
	{
		Logger.D(LOGTAG, "onDestroy");
		if(factory != null) factory.onDestroy();
	}

	@Override
	public void onCreateApplication(IRhoExtManager extManager)
	{
		Logger.D(LOGTAG, "onCreateApplication");
		extManager.addRhoListener(this);
		extManager.startKeyEventUpdates(this);
		
	}
	
	@Override
	public boolean onKey(int keyCode, KeyEvent event)
	{
		if(factory != null)
		{
			return factory.onKey(keyCode, event);
		}
		return false;
	}
}

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
rhodes-7.6.0 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-7.5.1 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-7.4.1 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-7.1.17 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-6.2.0 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-6.0.11 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-5.5.18 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-5.5.17 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-5.5.15 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-5.5.0.22 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-5.5.2 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-5.5.0.7 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-5.5.0.3 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
rhodes-5.5.0 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
tauplatform-1.0.3 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
tauplatform-1.0.2 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java
tauplatform-1.0.1 lib/commonAPI/mediaplayer/ext/platform/android/src/com/rho/mediaplayer/MediaplayerRhoListener.java