Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Lockscreen overlay not working #10

Closed
duramato opened this issue Apr 20, 2021 · 9 comments
Closed

Lockscreen overlay not working #10

duramato opened this issue Apr 20, 2021 · 9 comments

Comments

@duramato
Copy link

This on an OnePlus 8 on Oxygen OS 11
App version 1.1.1

It shows the notification from the correct guess, but doesn't show the overlay on the lockscreen.

Here's the log dump:
ambient_music_mod_log_dump_2021-04-20T13_58_01.967.zip

If any other info is needed let me know.

@KieronQuinn
Copy link
Owner

Make sure you've granted it the accessibility permission, have excluded the app from battery optimisation and reboot. Other than that, there's nothing I can really do - the current method is the only way of doing it.

@duramato
Copy link
Author

I've done all of those.
But do you have any clue as to why it isn't showing? I have a screen lock set, could that be interfering?

@KieronQuinn
Copy link
Owner

No idea why it wouldn't work, screen lock makes no difference. It's a very basic accessibility service, nothing that could cause it to fail really

@duramato duramato changed the title Lockscreen overlay now working Lockscreen overlay not working Apr 20, 2021
@duramato
Copy link
Author

There's no way I could make it always show the overlay? for testing
Thinking of a way to test it, to see if it isn't working because it's trying to show in on the lock screen, or if it wouldn't work on any page.
Hope my idea was clear.

@KieronQuinn
Copy link
Owner

I mean you could edit the code to make it always show, this is what controls it: https://github.com/KieronQuinn/AmbientMusicMod/blob/main/app/src/main/java/com/kieronquinn/app/ambientmusicmod/app/service/LockscreenOverlayAccessibilityService.kt

but that seems very overkill. The logic is simple - show the overlay after SCREEN_ON has been received from the system and there's a track to show, hide it when unlocked or the track is cleared.

@duramato
Copy link
Author

Something else I've noticed while testing this issue is the sound recording it takes seems to be a bit distorted. Not sure if that's how it's supposed to be?

Here's the recorded file zipped (it didn't allowed me to upload PCMs), so you can take a listen.
ambient_music_input_2021-04-21T19_34_58.323.zip

@KieronQuinn
Copy link
Owner

No, that's not that normal - although it may simply be due to the microphone being in use having some heavy amplification applied to it. I'm yet to figure out how to change the input (without changing it in code which would break its compatibility with other sound recording apps), but if that's ever achieved, changing microphone would probably help.

@duramato
Copy link
Author

Update. I think I saw it work yesterday while on the car.
Does it only show for music matches with the phone locked?

@KieronQuinn
Copy link
Owner

It should show the last match, but gets cleared if there's a recognition run with no response. If you have the notification showing a song, it should also show on the lockscreen.

Since you say it has shown at least once, I'm closing this as it's working.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants