我在我的Android应用程序中调用视频播放器,意图播放视频。播放视频时不会发生错误。关闭视频播放器应用程序后,我的应用程序停止。 我用这个方法:
private void play_video() {
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
File file = new File(Environment.getExternalStorageDirectory().getPath() + "/nabege" + File.separator + "video"
+ File.separator + videoFileName);
intent.setDataAndType(Uri.fromFile(file), "video/*");
startActivity(intent);}
09-25 15:47:02.772: E/ActivityThread(31449): Activity com.android.gallery3d.app.MovieActivity has leaked IntentReceiver com.android.gallery3d.app.MovieActivity$6@41b61bf8 that was originally registered here. Are you missing a call to unregisterReceiver()?
09-25 15:47:02.772: E/ActivityThread(31449): android.app.IntentReceiverLeaked: Activity com.android.gallery3d.app.MovieActivity has leaked IntentReceiver com.android.gallery3d.app.MovieActivity$6@41b61bf8 that was originally registered here. Are you missing a call to unregisterReceiver()?
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:837)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:608)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1441)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1421)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1415)
09-25 15:47:02.772: E/ActivityThread(31449): at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:423)
09-25 15:47:02.772: E/ActivityThread(31449): at com.android.gallery3d.app.MovieActivity.onCreate(MovieActivity.java:254)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.Activity.performCreate(Activity.java:5179)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1146)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2336)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2424)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.ActivityThread.access$600(ActivityThread.java:169)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1388)
09-25 15:47:02.772: E/ActivityThread(31449): at android.os.Handler.dispatchMessage(Handler.java:107)
09-25 15:47:02.772: E/ActivityThread(31449): at android.os.Looper.loop(Looper.java:194)
09-25 15:47:02.772: E/ActivityThread(31449): at android.app.ActivityThread.main(ActivityThread.java:5433)
09-25 15:47:02.772: E/ActivityThread(31449): at java.lang.reflect.Method.invokeNative(Native Method)
09-25 15:47:02.772: E/ActivityThread(31449): at java.lang.reflect.Method.invoke(Method.java:525)
09-25 15:47:02.772: E/ActivityThread(31449): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:924)
09-25 15:47:02.772: E/ActivityThread(31449): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:691)
09-25 15:47:02.772: E/ActivityThread(31449): at dalvik.system.NativeStart.main(Native Method)