Coder Social home page Coder Social logo

grezzled / antiadlimit Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 4.0 187 KB

A solution for Ad serving limit (Admob & Facebook Audience Network) that affected so many devs around the world.

Java 100.00%
admob admob-plugin audience-network ad-limit

antiadlimit's Introduction

Getting Started

To get a Git project into your build:

Step 1. Add the JitPack repository to your build file Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Step 2. Add the dependency

dependencies {
        implementation 'com.github.grezzled:AntiAdLimit:1.0-beta'
}

Basic Usage

Step 1. Create and host a JSON file on your Server. Please make sure to have a direct link to the hosted JSON file (e.g: https://mysite.com/file.json )

Step 2. Edit the JSON file content

  {
      "networks": {  
        "admob_activated": true,  
        "fan_activated": false  
      },  
      
      "ad_units": [  
        {  
          "limit_activated": true,  
          "unit_id": "1234516670394005_1234551527057186",  
          "ads_activated": true,  
          "clicks": 2,  
          "impressions": 20,  
          "delay_ms": 3000,  
          "ban_hours": 1,  
          "hide_on_click": true  
        },  
        {  
          "limit_activated": true,  
          "unit_id": "ca-app-pub-3940256099942544/6300978111",  
          "ads_activated": true,  
          "clicks": 2,  
          "impressions": 20,  
          "delay_ms": 3000,  
          "ban_hours": 1,  
          "hide_on_click": true  
         },
         ...
      ]  
    }

Networks Params Explained

Param Description Type
admob_activated Activate Admob units [boolean] Accepts true or false
fan_activated Override Admob units and use Audience Network units. [boolean] Accepts true or false

Please notice 1: if they are both false no Ad units will display so no Ads will run.

Please notice 2: if they are both true Audience network will be used

AdUnits Params Explained

Param Description Type
limit_activated Weither to activate limitation for this unit. [boolean] Accepts true or false
unit_id This is where you set the AD Unit Id (Either Audience Network or Admob) [string] Accepts a string value between double quotes ""
ads_activated Enable or Disable unit, if it's fasle this unit will not show any ads [boolean] Accepts true or false

.. In Progress

antiadlimit's People

Contributors

grezzled avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

antiadlimit's Issues

Error write file Preferences

Hello, Thanks for work, when I using lib, I got error when write to Preferences because path is invalid, Could you please check and fix help me ?
java.lang.IllegalArgumentException: File ca-app-pub-3940256099942544/6300978111.xml contains a path separator
at android.app.ContextImpl.makeFilename(ContextImpl.java:2657)
at android.app.ContextImpl.getSharedPreferencesPath(ContextImpl.java:787)
at android.app.ContextImpl.getSharedPreferences(ContextImpl.java:439)
at android.content.ContextWrapper.getSharedPreferences(ContextWrapper.java:178)
at anti.ad.limit.PrefUtils.init(PrefUtils.java:50)
at anti.ad.limit.JSONPullService.onHandleIntent(JSONPullService.java:94)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:78)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)

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.