Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Notifications show only once per app per session #626

Open
TheRealMrSteel opened this issue Oct 25, 2022 · 8 comments
Open

Notifications show only once per app per session #626

TheRealMrSteel opened this issue Oct 25, 2022 · 8 comments

Comments

@TheRealMrSteel
Copy link

Important things first: Hufman, thanks for your amazing work 🙏. Been using this app for around a year now and the added functionality is superb. I really enjoy the Spotify and Notifications integration and I can no longer live without it!
In August, I bought a new phone and immediately installed AAIdrive again. In the past months I noticed some different behavior compared to my previous phone. Hopefully I'm able to provide some more info below.

Subject of the issue

The main thing that is working differently after I switched to my new phone, is that the notifications are only shown once per app on my iDrive screen, if I dismiss (or mark as read) the notification and a new (second) notifications comes in, the notification is not shown on the iDrive screen anymore.

My devices

Car

  • NBTevo_ID5_2103
  • AAIdrive version 1.4
  • App can run in the background
  • App is ready to connect to a BMW
  • Notifications Popups are supported

Old phone (working)

  • OnePlus 6
  • Android 10
  • Necessary permissions are granted

New phone (Not fully working)

  • Nothing Phone (1)
  • Android 12
  • Necessary permissions are granted (also tried to remove and re-add it again)
  • Already tried setting Battery Management to Unrestricted for both MyBMW and AAIdrive to see if aggresive battery management causes this, but no change.

Expected behaviour

With my OnePlus 6, I got a notification for every message (notification) which came in via Whatsapp. Also notifications for Flitsmeister (a popular traffic and speedcam app) were shown for every new alert. (Which reminds me of #216, any updates on this 😄)

Actual behaviour

With my Phone (1), I only receive 1 notification the first time it triggers, and all the next incoming notifications no longer pop-up. So the first Whatsapp notifications shows, all new notifications after this dont. Same goes for Flitsmeister.

Is there anything I can still try to get this fixed, or try to debug?
If the above is still not fully clear, please let me know and I will try to provide more information.
Thanks!

@hufman
Copy link
Collaborator

hufman commented Nov 2, 2022

Thank you for the very clear information! I haven't heard of this problem before, thank you for reporting it!
If you are able to compile AAIdrive for yourself, please compile and run a version where LOG_NOTIFICATIONS=true and look in the adb logcat to see if there's any helpful information.

Does the phone show the notification that you previously wiped away? Do second notifications still show up if you swipe away the first notification instead of dismissing with the car interface?
When you say the second notification isn't displayed, do you mean it doesn't show up on the list, or it doesn't trigger a popup?

@TheRealMrSteel
Copy link
Author

Never have I ever compiled an apk via Android Studio. I took a quick look at the Developer's Guide you provided, but it looks like it will require some time to get all the preparations running for the first time.

  • Does the phone show the notification that you previously wiped away?
    Yes it does, I have my phone in a holder and I do see new notifications appear on my lockscreen on my phone.
  • Do second notifications still show up if you swipe away the first notification instead of dismissing with the car interface?
    I will try this in the coming week, not sure If I've tried this before so it is worth testing
  • When you say the second notification isn't displayed, do you mean it doesn't show up on the list, or it doesn't trigger a popup?
    In this case I mean it doesn't trigger a popup, I will check if it is present in the list or not. Hopefully I have acquired some useful input over the next few days!

@TheRealMrSteel
Copy link
Author

I still haven't been able to find a solution for my problem.
In the mean time I received an update to Android 13 which I'm running now for a week. I was hoping that would already fix the issue, but still the same.
When 1.4.1 released yesterday, I decided to start fresh and completely remove AAIdrive. Installed 1.4.1 and noticed I had to take some additional steps in order to get all the right permissions Android 13 introduced (remove the restricted settings), otherwise it couldn't access the notifications:

Google is introducing a change with Android 13 that will prevent sideloaded apps from abusing the Accessibility APIs.

So lets find out if this changed something when I drive back this afternoon. If not, I will probably close this issue because I can't find a solution for it.

@hufman
Copy link
Collaborator

hufman commented Jan 24, 2023

AAIdrive doesn't use Accessbility APIs, what do you mean? The only new permission I know about is the Bluetooth permission to start when the car connects.

@TheRealMrSteel
Copy link
Author

Sorry, in that case I made a wrong assumption.
If it helps I can redo all the steps I need to take after a fresh install of 1.4.1 and record my screen?
Unfortunately, still the same happens regarding the notifications. The first time the notification shows as a popup in iDrive, the second time, there is no popup. Tested this with the Test Notification button, as well as Whatsapp.

@hufman
Copy link
Collaborator

hufman commented Jan 25, 2023

I'd be curious to see a video of it, yes :)
That's very curious, I'll try to think of what could be causing it!

@TheRealMrSteel
Copy link
Author

screen-20230125-223218.mp4

This should give you some more insights hopefully.

I know earlier you mentioned that AAIdrive doesn't use accessibility services, but could it be that it is related to this quote:

In addition, the ACCESS_RESTRICTED_SETTINGS permission only gates access to accessibility services, but it’s plausible that it could be used in the future to gate access to other sensitive APIs like the notification listener.

Explained on this page ?

@hufman
Copy link
Collaborator

hufman commented Jan 26, 2023

Ah, that is annoying :( I don't know how to handle that more smoothly :(

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

No branches or pull requests

2 participants