Giter Site home page Giter Site logo

cheeseman1997 / ad-free Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abertschi/ad-free

0.0 1.0 0.0 4.8 MB

A modularized Ad Blocker for Spotify on Android

Home Page: http://adfree.abertschi.ch

License: Apache License 2.0

Java 1.04% Kotlin 80.12% Groovy 1.32% HTML 15.38% CSS 1.86% JavaScript 0.28%

ad-free's Introduction

Kotlin App codebeat badge

Ad-Free

Ad Free is a research project attempting to show flaws in the way how Spotify for Android presents audio advertisement. It is a proof-of-concept of a modularized Ad Blocker written in Kotlin with a modern and simplistic user interface.

http://adfree.abertschi.ch

Features

  • No ROOT required
  • Turn off sound when advertisement is playing
  • Play arbitrary audio instead of Spotify advertisement
  • Plugin based design

Download

Download the latest release from the F-Droid store.

Implementation notes

Ad detection

Advertisement detectors are modularized into implementations of AdDetectable. An instance of AdDetectable can determine if a track being played is a Spotify advertisement or not.

Ad Free registers an NotificationListenerService and is therefore able to parse all incoming notifications on Android. Notifications shown by Spotify are parsed by implementations of AdDetectable:

  • SpotifyTitleDetector:
    Detector which parses Spotify notifications for certain keywords. In order to avoid false positives, an notification action is provided to unblock wrongly detected advertisements.

  • NotificationActionDetector:
    Detector which inspects Spotify notifications for properties set in the track navigation bar.

  • NotificationBundleAndroidTextDetector:
    Detector which checks for properties set in the notification bundle.

Ad blocking

AudioManager, Android's Audio System provides several streams on which audio can be played. Spotify, alike many music players, plays audio on the stream STREAM_MUSIC. In case of ad detection, Ad Free mutes STREAM MUSIC and calls a configured AdPlugin. AdPlugins aim to replace Spotify's advertisement. They play music on an alternative stream and are therefore not affected by the mute of STREAM MUSIC.

Plugins

Mute Audio

As the title of this plugin suggests, it only mutes adertisments without playing sound.

Interdimensional Cable

Interdimensional Cable replaces Spotify advertisements with interdimensional cable advertisements featured in Adult Swim's Rick and Morty TV series.

Play local music

Play music tracks stored on your phone while advertisement is playing

Compatibility

Due to the lack of notifications on Android TV, Ad Free is currently not compatible with Android TV.

Tested with the following Spotify versions

  • 2017-04-19: 8.3.0.681 armV7
  • 2017-09-01: 8.4.17.640 armV7
  • 2017-11-28: 8.4.24.875 armV7

This app is optimized to work on Android 6.0.1 as my phone runs on Android 6.0.1. If you notice problems on a newer version of Android, please fill an issue and we try to tackle down the problem together.

Release notes

Credits

  • The bird and website icons used in this app are made by Freepik from www.flaticon.com and are licensed by CC 3.0 BY.

  • This app is written in Kotlin. Kotlin by Jetbrains is lisenced by the Apache Lisence 2.0

  • AppUpdater by javiersantos is licensed by the Apache License 2.0

  • Videocache is made by danikula and is licensed by the Apache License 2.0

  • RxAndroid by the RxAndroid authors is licensed by the Apache License 2.0

  • Fuel is made by Kittinun Vantasin and is licensed by MIT

  • snakeyaml is licensed by the Apache License 2.0

  • XStream by Joe Walnes and the XStream Committers is lisenced by BSD license.

Licence

This project is lisenced by the Apache Lisence 2.0

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IT IS A PROOF OF CONCEPT AND INTENDED TO BE A RESEARCH PROJECT. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

ad-free's People

Contributors

abertschi avatar bennettscience avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.