Reputation: 23
I'm currently developing an android app that will regularly stop to watch streamed video. I'm using Unity 3D to create the app. I've had no problem with other devices I've installed the app on (Samsung Galaxy 10, Galaxy Player 5.0, Toshiba Thrive), however when I run it on the Kindle Fire the movie begins to play and then one or two seconds in, the unity app crashes in the background. The movie continues to play and stream behind the error message. (which reads: "The application test(app) has stopped unexpectedly. Please try again"). Yay for vague errors.
I got it hooked up so I could get a log cat readout and as its crashing these are the events logged:
02-07 11:29:38.578: W/dalvikvm(2695): threadid=1: thread exiting with uncaught exception (group=0x40015560)
02-07 11:29:38.585: E/AndroidRuntime(2695): FATAL EXCEPTION: main
02-07 11:29:38.585: E/AndroidRuntime(2695): java.lang.AbstractMethodError: abstract method not implemented
02-07 11:29:38.585: E/AndroidRuntime(2695): at com.unity3d.player.VideoPlayer.onControllerHide(Unknown Source)
02-07 11:29:38.585: E/AndroidRuntime(2695): at android.widget.MediaController$7.handleMessage(MediaController.java:704)
02-07 11:29:38.585: E/AndroidRuntime(2695): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 11:29:38.585: E/AndroidRuntime(2695): at android.os.Looper.loop(Looper.java:130)
02-07 11:29:38.585: E/AndroidRuntime(2695): at android.app.ActivityThread.main(ActivityThread.java:3683)
02-07 11:29:38.585: E/AndroidRuntime(2695): at java.lang.reflect.Method.invokeNative(Native Method)
02-07 11:29:38.585: E/AndroidRuntime(2695): at java.lang.reflect.Method.invoke(Method.java:507)
02-07 11:29:38.585: E/AndroidRuntime(2695): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:850)
02-07 11:29:38.585: E/AndroidRuntime(2695): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
02-07 11:29:38.585: E/AndroidRuntime(2695): at dalvik.system.NativeStart.main(Native Method)
Some things I've tried:
The Kindle's software is up-to-date.
Build made with both Unity 3.4 and 3.5.
Some of the variations on the iPhoneUtils.PlayMovieURL command. (Including the new Handheld.PlayMovieFullScreen from Unity 3.5)
Navigating to the link through the Fire's web browser plays fine.
Downloading the file through Unity to the file structure and loading from there works fine.
Different size files (big or small) don't affect the outcome
Any insight would be greatly appreciated.
Upvotes: 2
Views: 800
Reputation: 1071
I was having a similar problem as well. The video would start but when the controls disappeared, the app would crash. Believe it or not, adding this code fixed everything.
public void onControllerHide() {
mMediaController.hide();
}
Upvotes: 1