|
|
|
|
@ -6,6 +6,7 @@ import android.os.IBinder; |
|
|
|
|
|
|
|
|
|
import com.anymediacloud.iptv.standard.ForceTV; |
|
|
|
|
import com.forcetech.Util; |
|
|
|
|
import com.github.catvod.Init; |
|
|
|
|
import com.github.catvod.utils.Path; |
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
|
@ -19,14 +20,15 @@ public class MainActivity extends Service { |
|
|
|
|
try { |
|
|
|
|
checkLibrary(); |
|
|
|
|
System.loadLibrary("mitv"); |
|
|
|
|
} catch (Throwable ignored) { |
|
|
|
|
} catch (Throwable t) { |
|
|
|
|
t.printStackTrace(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void checkLibrary() throws Exception { |
|
|
|
|
String name = "libmitv.so"; |
|
|
|
|
File cache = Path.cache(name); |
|
|
|
|
if (!cache.exists()) Path.copy(getAssets().open(name), cache); |
|
|
|
|
if (!cache.exists()) Path.copy(Init.context().getAssets().open(name), cache); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|