General configurations
You need to add have the following in your settings.gradle file (dependencyResolutionManagement block):
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
You need to add have the following in your settings.gradle file (dependencyResolutionManagement block):
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
Then, add the following in your app's gradle file:
implementation 'com.github.githubusername:EasyAds:version'
You will also need to add the following dependencies:
implementation 'com.google.android.gms:play-services-ads-identifier:18.0.1'
implementation 'com.google.android.gms:play-services-appset:16.0.2'
implementation 'com.google.android.gms:play-services-location:18.0.0'
In order to use all the functionality offered by the SDK, these permissions need to be defined:
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
Use the following statement to import the SDK in the activity in which you are inittializing the SDK:
import com.reconcile.easyads_lib.EasyAds;
The SDK can be initialized as follows:
EasyAds.init("APIKey",this);