abertschi / ad-free

A modularized audio ad blocker for Android
https://abertschi.ch/blog/2022/building-adfree/
Apache License 2.0
273 stars 19 forks source link

Android TV support possible with Oreo? #35

Open bigoulours opened 4 years ago

bigoulours commented 4 years ago

Hi, great app! I wonder if ad-free would work on Android TV Oreo since it displays notifications while playing music.

abertschi commented 4 years ago

As far as i know there are no official APIs to inspect notification content on Android TV. But i could be wrong. Can you upload a picture of an advertisement notification on Android TV as well as a normal playback notification?

bigoulours commented 4 years ago

Hi, i managed to take screenshots of the notifications (music playing, ad and Spotify announcement). Looks similar to phone notifications but i don't know if these are accessible through API... Screenshot_20190725-194817-01 Screenshot_20190725-194720-01 Screenshot_20190725-191359-01

2803media commented 4 years ago

For Android auto there is an api https://developer.android.com/training/cars/notifications

abertschi commented 4 years ago

Yes, notifications and notification listeners seem to be available, on Car and TV. This post claims that only system apps can attach themselves as notification listeners. Can you check if in the Car/ or TV settings there is an option to grant permissions for a notification listener -- similar to the phone situation? ("Settings/ Special App access/ Notification access") If so there is a chance to get this working.

2803media commented 4 years ago

If you install the android auto app you will see that there is an option to display notification from medias (music, podcast or other) but the menu is different from the phone settings

2803media commented 4 years ago

https://www.androidpolice.com/2019/10/04/android-auto-v4-7-app-filtering-launcher-media-notifications-optional-apk-teardown/