Skip to content

Commit

Permalink
update: sample java APP
Browse files Browse the repository at this point in the history
  • Loading branch information
Hemant-Mann committed Nov 29, 2021
1 parent c638f68 commit 5290265
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
You can find the latest version [here]()

```gradle
implementation 'com.trackier:android-sdk:1.6.12'
implementation 'com.trackier:android-sdk:1.6.15'
```

## <a id="qs-add-install-referre"></a>Adding Android install referrer to your app
Expand All @@ -50,7 +50,7 @@ Add the Android Install Referrer as a dependency. You can find the latest versio
// make sure to use the latest SDK version:
// https://mvnrepository.com/artifact/com.trackier/android-sdk
implementation 'com.trackier:android-sdk:1.6.12'
implementation 'com.trackier:android-sdk:1.6.15'
implementation 'com.android.installreferrer:installreferrer:2.2'
}
```
Expand Down
5 changes: 4 additions & 1 deletion TrackierSDK/example-app-java/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ android {
targetSdkVersion 30
versionCode 1
versionName "1.0"
multiDexEnabled true

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -36,6 +37,8 @@ dependencies {
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.trackier:android-sdk:1.6.14'
implementation 'com.android.installreferrer:installreferrer:1.1'
implementation "androidx.multidex:multidex:2.0.1"
implementation 'com.trackier:android-sdk:1.6.15'
implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
}
6 changes: 6 additions & 0 deletions TrackierSDK/example-app-java/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>

<application
android:name=".MainApplication"
Expand All @@ -15,6 +16,11 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Exampleappjava">

<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />

<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import android.app.Application;
import android.content.Context;

import com.trackier.sdk.TrackierEvent;
import com.trackier.sdk.TrackierSDK;
import com.trackier.sdk.AttributionParams;
import com.trackier.sdk.TrackierSDKConfig;
Expand All @@ -23,12 +25,13 @@ public void onCreate() {
setmContext(getApplicationContext());
mInstance = this;

final String TR_DEV_KEY = "xxxx-xx-4505-bc8b-xx";
TrackierSDKConfig sdkConfig = new TrackierSDKConfig(this, TR_DEV_KEY,"production");
final String TR_DEV_KEY = "328b7ad9-0496-4db8-80e3-5938fadff8b7";
TrackierSDKConfig sdkConfig = new TrackierSDKConfig(this, TR_DEV_KEY,"development");
// AttributionParams params = new AttributionParams();
// params.setParterId("ADD_PARTNER_ID_HERE");
// params.setChannel("ADD_CHANNEL_HERE"); // optional
// sdkConfig.setAttributionParams(params);
// TrackierSDK.setEnabled(false);
TrackierSDK.initialize(sdkConfig);
}
public static synchronized MainApplication getInstance() {
Expand Down
2 changes: 2 additions & 0 deletions TrackierSDK/example-app-java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
Expand All @@ -15,6 +16,7 @@ buildscript {
allprojects {
repositories {
google()
mavenCentral()
jcenter()
}
}
Expand Down

0 comments on commit 5290265

Please sign in to comment.