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