Skip to content

vickypathak123/AndroidAdsHelper

Repository files navigation

Vasundhara Android Common Code

Common Code For Android that is required in every app of Vasundhara Infotech LLP

Installation

The library is hosted on jitpack, add this to your build.gradle:

Step 1. Add the JitPack repository to your project's build.gradle
pluginManagement {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}

dependencyResolutionManagement {
    repositories {
        ...
        maven { url "https://jitpack.io" }
    }
}
Step 2. Add the dependency to your module's build.gradle

Note: Add only 1 of these 2 dependency, either the adshelper or the revenueCat.

API Version

android {
    defaultConfig {
        ...
        multiDexEnabled true
        
//        add below line if you face any issue with localization of Subscription Screen
        resConfigs "en", "af", "ar", "da",  "el", "es", "fil", "fr", "gu", "ha", "hi", "in", "it", "ja", "ko", "pt", "ru", "th", "ur", "zh", "bn", "de", "kn", "ml", "mr", "or", "pa", "ta", "te", "tr", "vi"
    }
    
//        add below line if you face "A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction"    
    packagingOptions {
        resources {
            excludes += ['META-INF/DEPENDENCIES', 'META-INF/INDEX.LIST']
        }
    }
}

dependencies {
    implementation 'com.android.support:multidex:1.0.3'
    
//        add below line if you want to work with Google Billing    
    implementation 'com.github.vickypathak123.AndroidAdsHelper:adshelper:latest_build_version'
    
//        add below line if you want to work with RevenueCat Billing    
    implementation 'com.github.vickypathak123.AndroidAdsHelper:revenueCat:latest_build_version'
}

Usage

  1. Exit Dialog
  2. Live Internet Connection Status
  3. In-App Purchases and Subscription
  4. Safetynet (Google Play Integrity & Admob Consent Form)
  5. Google Ads

Following points are covered in this code:

  1. Google Ads
  2. Safetynet - Google Play Integrity
  3. Safetynet - Admob Consent Form
  4. Subscription Using Google Billing
  5. Subscription Using RevenueCat
  6. Initial App Opening Flow After Splash
  7. Initialization Of Subscription Related Remote Config JSON
  8. Opening Flow of Subscription Screen
  9. Exit Dialog
  10. Live Internet Connection Status
  11. Some Launcher functions like Open Google Play Store, Open Privacy Policy Link, Open Any Other Link, and Share This App, all links are open using the Google Custom

⭐️ If you liked it support me with your stars!

Developed By

Akshay Harsoda - [email protected]

Follow me on Github Follow me on LinkedIn Follow me on Twitter Follow me on Facebook