@Override public Engine onCreateEngine() { Log.d(TAG, "onCreateEngine()"); // transfer video to sdcard Log.d(TAG, "transferring video asset to sdcard"); copyVideoToCard(); Log.d(TAG, "transferred"); // if videoName == blankVideo, then don't load anything // TODO NativeCalls.closeVideo(); NativeCalls.initVideo(); Log.d(TAG, "Opening video"); NativeCalls.loadVideo("file:/" + "sdcard/" + FootBallWallpaperService.videoName); // set video dimensions (now that we opened the video) videoWidth = NativeCalls.getVideoWidth(); videoHeight = NativeCalls.getVideoHeight(); videoWideScreen = (videoWidth > videoHeight) ? true : false; mEngine = new VideoEngine(); return mEngine; }
@Override public void onDestroy() { Log.d(TAG, "onDestroy()"); super.onDestroy(); NativeCalls.closeVideo(); }