Sha256: f08057b1d18f45c0d33ac5cb684d637a3345f8d5aa4bdd44bdc08fcf0c6b842c
Contents?: true
Size: 1.04 KB
Versions: 17
Compression:
Stored size: 1.04 KB
Contents
package com.rho.mediaplayer; import android.view.KeyEvent; import com.rhomobile.rhodes.api.RhoApiFactory; public class MediaplayerFactory extends RhoApiFactory<Mediaplayer, MediaplayerSingleton> implements IMediaplayerFactory { private MediaplayerSingleton singleton; public MediaplayerFactory() { super(); MediaplayerRhoListener.registerListener(this); } @Override protected MediaplayerSingleton createSingleton() { if(singleton == null) singleton = new MediaplayerSingleton(this); return singleton; } @Override protected Mediaplayer createApiObject(String id) { return new Mediaplayer(id); } public void onResume() { if(singleton != null) singleton.onResume(); } public void onPause() { if(singleton != null) singleton.onPause(); } public void onDestroy() { if(singleton != null) singleton.onDestroy(); } public void onStop() { if(singleton != null) singleton.onStop(); } public boolean onKey(int keyCode, KeyEvent event) { if(singleton != null) return singleton.onKey(keyCode, event); return false; } }
Version data entries
17 entries across 17 versions & 2 rubygems