You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
FONGMITV/forcetech/src/main/java/com/gsoft/mitv/MainActivity.java

43 lines
905 B

package com.gsoft.mitv;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import com.anymediacloud.iptv.standard.ForceTV;
import com.forcetech.Util;
public class MainActivity extends Service {
private ForceTV forceTV;
private IBinder binder;
static {
System.loadLibrary("mitv");
}
@Override
public void onCreate() {
super.onCreate();
try {
binder = new LocalBinder();
loadLibrary(1);
} catch (Throwable ignored) {
}
}
@Override
public IBinder onBind(Intent intent) {
forceTV = new ForceTV();
forceTV.start(Util.MTV);
return binder;
}
@Override
public boolean onUnbind(Intent intent) {
if (forceTV != null) forceTV.stop();
return super.onUnbind(intent);
}
private native void loadLibrary(int type);
}