My app appears to work fine on all devices except one, the Galaxy Exhibit
(SGH-T679).
On this phone they are reporting a Null Pointer Exception, to do with the Player component.
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.Screen1}: java.lang.NullPointerException
.
.
Caused by: java.lang.NullPointerException
at com.xiledsystems.AlternateJavaBridgelib.components.altbridge.Player.Source(Player.java:127)
at com.example.myapp.Screen1.$define(Screen1.java:577)
I am setting the Player source in $define in the first screen,
Player1 = new Player(this);
Player1.Source("snd_intro.mp3");
then I am setting the Player source again using when Player1.Completed (whenever the music stops)..
private void player1Completed() {
if (Convert.Boolean(tinyDB.GetValue("BGSound"))) {
Player1.Source(tinyDB.GetValue("BGSoundSource").toString());
Player1.Start();
}
else {
Player1.Source(tinyDB.GetValue("BGSoundSource").toString());
Player1.Stop();
}
}
Any ideas what could be causing this? And what would be a good solution.. Would a try/catch block be a good idea?