Skip to content

Commit

Permalink
Merge pull request #60 from AppsFlyerSDK/releases/6.x.x/6.8.x/6.8.0
Browse files Browse the repository at this point in the history
Releases/6.x.x/6.8.x/6.8.0
  • Loading branch information
af-margot authored Aug 17, 2022
2 parents fda91ff + 48e13d4 commit 1e141ed
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 7 deletions.
3 changes: 3 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release Notes

### 6.8.0
* Update Android SDK to v6.8.0

### 6.5.2
* Update Android SDK to v6.5.2

Expand Down
25 changes: 25 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Built with AppsFlyer Android SDK `v6.5.2`

- [Introduction](#whatIsSegment)
- [Getting Started](#quickStart)
- [Manual mode](#manual)
- [SDK Initialization](#sdk_init)
- [Register In-App Events](#adding_events)
- [Get Conversion Data](#conversion_data)
Expand Down Expand Up @@ -66,6 +67,25 @@ The Segment AppsFlyer integration is entirely handled through Segment's servers,

AppsFlyer supports the `identify` and `track` methods.

### <a id="manual">
# Manual mode
Starting version 6.8.0, we support a manual mode to seperate the initialization of the AppsFlyer SDK and the start of the SDK. In this case, the AppsFlyer SDK won't start automatically, giving the developper more freedom when to start the AppsFlyer SDK. Please note that in manual mode, the developper is required to implement the API startAppsFlyer(Context context) in order to start the SDK.
### Example:

```java
AppsflyerIntegration.setManualMode(true);
```

And to start the AppsFlyer SDK, use `void startAppsFlyer(Context context)` API.

### Example:

```java
protected void onCreate(Bundle savedInstanceState) {
AppsflyerIntegration.startAppsFlyer(this);
}
```


### <a id="quickStart">

Expand All @@ -89,6 +109,11 @@ The AndroidManifest.xml should include the following permissions:
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
```

In v6.8.0 of the AppsFlyer SDK, we added the normal permission com.google.android.gms.permission.AD_ID to the SDK's AndroidManifest,
to allow the SDK to collect the Android Advertising ID on apps targeting API 33.
If your app is targeting children, you may need to revoke this permission to comply with Google's Data policy.
You can read more about it [here](https://support.appsflyer.com/hc/en-us/articles/7569900844689).

### <a id="sdk_init"> 2.2) Init AppsFlyer

```java
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ android {
}

dependencies {
implementation 'com.appsflyer:af-android-sdk:6.5.2'
implementation 'com.appsflyer:af-android-sdk:6.8.0'
compileOnly 'com.android.installreferrer:installreferrer:2.1'
compileOnly 'com.segment.analytics.android:analytics:4.+'
testImplementation 'junit:junit:4.12'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ public class AppsflyerIntegration extends Integration<AppsFlyerLib> {
private String customerUserId;
private String currencyCode;

public static void setManualMode(Boolean manualMode) {
AppsflyerIntegration.manualMode = manualMode;
}

public static void startAppsFlyer(@NonNull Context context){
if (context != null){
AppsFlyerLib.getInstance().start(context);
}
}

public static Boolean manualMode = false;
public static ConversionListenerDisplay cld;
public static final Factory FACTORY = new Integration.Factory() {
@Override
Expand Down Expand Up @@ -125,8 +136,10 @@ public AppsflyerIntegration(Context context, Logger logger, AppsFlyerLib afLib,
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
super.onActivityCreated(activity, savedInstanceState);
Intent intent = activity.getIntent();
AppsFlyerLib.getInstance().start(activity);
updateEndUserAttributes();
if (!manualMode) {
AppsFlyerLib.getInstance().start(activity);
updateEndUserAttributes();
}
}


Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

GROUP=com.appsflyer

VERSION_CODE=8
VERSION_NAME=6.5.2
VERSION_CODE=9
VERSION_NAME=6.8.0
POM_ARTIFACT_ID=segment-android-integration
POM_PACKAGING=aar

Expand Down
4 changes: 2 additions & 2 deletions segmenttestapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ dependencies {
implementation project(path: ':app')
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.appsflyer:af-android-sdk:6.5.2'
implementation 'com.appsflyer:af-android-sdk:6.8.0'
//noinspection GradleDynamicVersion
implementation 'com.segment.analytics.android:analytics:4.+'
// compile 'com.appsflyer:segment-android-integration:6.3.2'
// compile 'com.appsflyer:segment-android-integration:6.8.0'
implementation 'com.android.installreferrer:installreferrer:2.1'
//compile project(':app')
// compile 'com.google.firebase:firebase-crash:9.4.0'
Expand Down

0 comments on commit 1e141ed

Please sign in to comment.