JayThomason / Tutti

Tutti is a shared music application for the car being made in conjunction with Audi.
3 stars 1 forks source link

Bug: not working for some phones? #231

Closed avptv closed 10 years ago

avptv commented 10 years ago

So far, we've only been able to get our app working on our Nexus 5 phones and the Nexus 7 tablet. It should work for other Android phones

JayThomason commented 10 years ago

It would be great if we had more information about what phones the app is not working for.

avptv commented 10 years ago

It didn't work on my brother's Galaxy Note 2, and @hwray did you write down which phones the alumni had that it didn't work for? Not sure if it's just the APK that isn't working. All of these people were able to download the APK but then when they launched the app it immediately crashed

hwray commented 10 years ago

It crashed on boot for one user's HTC One (Google Play Edition). IIRC the second user didn't get as far as enabling her phone to trust our APK, so we don't know if it would have crashed for her or not.

hwray commented 10 years ago

@avptv , can you hook your brother's Note up to Eclipse and post a stack trace from the crash here?

avptv commented 10 years ago

screen shot 2014-05-30 at 5 46 47 pm

JayThomason commented 10 years ago

Looks like a bug in the thread that loads the local music -- null getting passed to Integer.parseInt(), which I think turns a string that is a number into an Integer.

JayThomason commented 10 years ago

@avptv do you know if your brother has music on his phone which wasn't downloaded directly from the Google Play music store?

avptv commented 10 years ago

Yeah all of his music was downloaded not from the google play store

JayThomason commented 10 years ago

This is the line that fails:

              song.setTrackNum(Integer.parseInt(cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.TRACK))));

Looks like the value for the track number is null, which probably just means that one or more mp3 files on the phone were not annotated with track numbers. We shouldn't be relying on the track number necessarily existing, in fact we should strive to not rely on any data except the music file itself existing in the database.

avptv commented 10 years ago

Looks like this is resolved now. Works on my brother's Galaxy Note 2, so I assume it should work on other phones too