Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Should Resolve Most App Compliance Issues #478

Merged
merged 9 commits into from
Aug 27, 2019
Merged

Should Resolve Most App Compliance Issues #478

merged 9 commits into from
Aug 27, 2019

Conversation

a-r-db
Copy link
Contributor

@a-r-db a-r-db commented Aug 27, 2019

The newest libraries have been included.

Austin H added 9 commits August 26, 2019 16:52
Service to listen to notifications and identify track information for Media Players initial commit.
Added Album
Removed some older android version bugs.
Breaks old Broadcasts and substitutes modern Notification Ready for API 21+
Keeps old Broadcasts for API < 26
Cleanup and breaking Gingerbread support is official.
@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

This should resolve approximately 90% of users issues.
Some users using android devices lower than Lollipop may not have this benefit.

@a-r-db a-r-db merged commit bd5a389 into simple-last-fm-scrobbler:master Aug 27, 2019
@a-r-db a-r-db mentioned this pull request Aug 27, 2019
@goodevilgenius
Copy link

This is really going to add support for all these apps? That's amazing. I can't wait until the stable release is ready.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

I could do a release now, although I fear that the bugs will anger users if there are too many.
I have sort of whipped up this code in a few days.
I need about a week or so to test and confirm the changes are reliable.
And thanks, I hope everything works well.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

Well, it's true some Music Apps might be too deprecated and not using the newest MediaSession tools.

There will simply be a few apps I cannot get information from, so closing is ok for now.

HERE is a signed APK #479 for testing and debugging.

@goodevilgenius
Copy link

goodevilgenius commented Aug 27, 2019

Pre-release seems to never actually send scrobbles.

Now Playing is updated (and shows up on the sites). Songs get added to cache, but never show up on the various sites. I have last.fm, libre.fm, and ListenBrainz, and all are doing this.

Within the app, all songs are listed in the cache, but clicking "Scrobble Now" does nothing.

This seems to happen with all apps, even previously fully-supported apps. I checked with Pandora and Google Play Music (which has always worked fine).

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

This is a new thing or it's been doing this before the new update?
And thanks by the way. I haven't had a lot of feedback.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

Could you please share the following:
Android version?
Phone model?
Are your credentials filled?

@goodevilgenius
Copy link

This is a new thing. On v1.5.7, scrobbling worked fine. Sometimes they would get stuck in the cache until I opened the app, but then they would immediately scrobble.

Now, on v1.5.8-pre-v3, songs are put in the cache, and never actually scrobbled. Even when I click "Scrobble now", nothing happens.

This is on a Samsung Galaxy S10E running Android 9.

@goodevilgenius
Copy link

And glad to help testing the new version. I'm really excited for this update. It looks really promising once the kinks are ironed out.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

All three services are stuck in the cache? last, libre & listen?
And are your power settings set that way? after 5 songs for example.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

I can't seem to recreate your database problem ...

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

Was your install an upgrade as opposed to fresh install?

@goodevilgenius
Copy link

Yeah, all three services. Yes, it was an upgrade. When I upgraded, though, all my data was lost, and I had to re-add my accounts.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

So the app might have left the remaining songs in the cache from before and it could have caused issues.
I will need to do some trial runs on upgrading, to make sure upgrade is not broken.

@goodevilgenius
Copy link

@a93h When I upgraded, there weren't any songs in the queue. I opened the app before I upgraded, and checked. The queue was empty.

The songs currently stuck in the queue were new since upgrading.

@goodevilgenius
Copy link

I'll try wiping data, and uninstalling and reinstalling shortly and let you know if that fixes the scrobbling problem.

@goodevilgenius
Copy link

Since clearing data, and then un- and re-installing, I've now got an odder issue.

When I started the app, there was already one scrobble in my cache. It was from a few days ago, although that was previously scrobbled.

When I click "Scrobble Now", the app crashes.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 27, 2019

This is great information, you don't by chance have adb handy?

@goodevilgenius
Copy link

I've got adb installed on all my computers.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 28, 2019

Well if you know how to recreate those bugs and send me whatever comes out of adb while the app crashes I can patch the bug or restructure.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 28, 2019

@goodevilgenius I am having a hard time recreating the app upgrade bug,
let me know if you catch the log data for it.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 28, 2019

Good News! I resolved the upgrade issues. I managed to get the same problems you had and found out it was an issue with the upgrade code.

Bad News! I kind of expected something gnarly would happen like this if I did not read the code fully before implementing custom database methods.

#485

@goodevilgenius
Copy link

What exactly do I need to do with adb? You need a logcat?

I've never actually done any Android development. I just use adb for backing up my phone, and for web development (connecting to Dev Tools from my computer).


I tried installing v1.5.8-pre-v5 and definitely saw some odd behavior.

It didn't fix the scrobbling bug.

Additionally, I tried clearing app data, uninstalling and reinstalling (instead of upgrading), and when I started the app again, my account logins were already there, and there were a few tracks in the queue, although not all of them that were there from before the upgrade.

And attempting to "Scrobble Now" still crashes the app.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 28, 2019

Ok, I thought it was for sure the problem.

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 28, 2019

@a-r-db
Copy link
Contributor Author

a-r-db commented Aug 28, 2019

I think I found it...

2019-08-28 15:11:26.534 1932-1999/com.adam.aslfms E/SQLiteLog: (1) foreign key mismatch - "scrobbles_netapp" referencing "scrobbles_netapp"
2019-08-28 15:11:26.537 1932-1999/com.adam.aslfms E/AndroidRuntime: FATAL EXCEPTION: pool-6-thread-1
    Process: com.adam.aslfms, PID: 1932
    android.database.sqlite.SQLiteException: foreign key mismatch - "scrobbles_netapp" referencing "scrobbles_netapp" (code 1 SQLITE_ERROR[1]): , while compiling: DELETE FROM scrobbles_netapp WHERE netappid = ? and trackid = ?
        at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
        at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1229)
        at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:703)
        at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
        at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
        at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
        at android.database.sqlite.SQLiteDatabase.delete(SQLiteDatabase.java:2047)
        at com.adam.aslfms.util.ScrobblesDatabase.deleteScrobble(ScrobblesDatabase.java:257)
        at com.adam.aslfms.service.Scrobbler.doRun(Scrobbler.java:111)
        at com.adam.aslfms.service.AbstractSubmitter.run(AbstractSubmitter.java:67)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants