Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration docs #453

Merged
merged 15 commits into from
Nov 28, 2023
Merged
26 changes: 26 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,32 @@ module.exports = {
}

]
},{
title: "Migration",
path: "/resources/migration",
pages: [{
title: "Android",
path: "/resources/migration/android",
pages: [{
title: "Migrate to Android 2.x SDKs",
emdobrin marked this conversation as resolved.
Show resolved Hide resolved
path: "/resources/migration/android/migrate-to-android-2x"
praveek marked this conversation as resolved.
Show resolved Hide resolved
}
]
},
{
title: "iOS",
path: "/resources/migration/ios",
pages: [{
title: "Migrate to iOS 3.x SDKs",
path: "/resources/migration/ios/migrate-to-ios-3x"
},
{
title: "Migrate to iOS 4.x SDKs",
path: "/resources/migration/ios/migrate-to-ios-4x"
}
]
}
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a sub-page to resource, this can just be listed as a subpage under resources (so, similarly to path: "/resources/upgrade-platform-sdks",).

Copy link
Contributor Author

@praveek praveek Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@calebk1 I wanted to keep this section at the top level similar to User Guides. I placed the content in the resources directory, following the same approach used for 'User Guides'. Let me know if you need me to move it out of resources.

},
{
title: "User guides",
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/current-sdk-versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords:

<InlineAlert variant="info" slots="text"/>

**Migrate to latest Mobile SDKs for Android**<br/>If you are currently using the Mobile Core 1.x and the compatible libraries, please see the [Migrating to latest Mobile SDKs for Android](https://developer.adobe.com/client-sdks/previous-versions/documentation/migrate-to-android/) guide for next steps.<br/>The latest Mobile SDKs for Android support Google Android API 19 (KitKat) or later.
**Migrate to latest Mobile SDKs for Android**<br/>If you are currently using older SDK versions, please see the [Migrating to latest Mobile SDKs for Android](../resources/migration/android/index.md) guide for next steps.

<InlineAlert variant="info" slots="text"/>

Expand Down Expand Up @@ -64,7 +64,7 @@ The Android BOM (Bill of Materials) artifact has been released to Maven Central.

<InlineAlert variant="info" slots="text"/>

**Migrate to latest Mobile SDKs for iOS**<br/>If you are currently using the Objective-C (ACP-prefix) libraries, please see the [Migrating to latest Mobile SDKs for iOS](https://developer.adobe.com/client-sdks/previous-versions/documentation/migrate-to-swift/) guide for next steps.<br/>The latest Mobile SDK for iOS supports iOS 11 or later; requires Swift 5.1 or newer and Xcode 14.1 or newer. In addition to **CocoaPods**, **Swift Package Manager (SPM)**, and XCFramework installation options are supported with the latest iOS Swift SDKs! Find more details at the GitHub links below.
**Migrate to latest Mobile SDKs for iOS**<br/>If you are currently using older SDK versions, please see the [Migrating to latest Mobile SDKs for iOS](../resources/migration/ios/index.md) guide for next steps.

| Extension | tvOS | App Extension | CocoaPods | GitHub | Test app |
|---|---|---|---|---|---|
Expand Down
131 changes: 1 addition & 130 deletions src/pages/resources/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,136 +148,7 @@ Implementing push notification tracking and measurement with the SDK depends on

## Migrating to Android Mobile Core 2.x and compatible extensions

### Is there a change in minimum API level supported by Mobile SDK for Android?

Mobile SDK for Android now supports a minimum API level of **19**. If your application targets a lower API level, you will see the following build failure:

``` text
Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 19 declared in library [com.adobe.marketing.mobile:core:2.0.0]
```

To fix this build failure, increase the minSdkVersion for your Android project to **19** or above.

### When I add Mobile SDK to my Android project, why do I get an error about invoke-custom support and enabling desugaring?

Mobile SDK for Android uses Java 8 language features and desugaring is disabled by default. If your application uses Android Gradle plugin (AGP) v4.2 and has not enabled Java 8 support, you will see the following build failure:

``` text
D8: Invoke-customs are only supported starting with Android O (--min-api 26)
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
The dependency contains Java 8 bytecode. Please enable desugaring by adding the following to build.gradle
android {
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}

See https://developer.android.com/studio/write/java8-support.html for details.
Alternatively, increase the minSdkVersion to 26 or above.
```

To fix this build failure, you can follow one of two options:

* Add the listed compileOptions from the error message to your app-level build.gradle file.
* Increase the minSdkVersion for your Android project to **26** or above.

### How do I get the latest Mobile SDK Android dependences for my Application?

To get the latest Mobile SDK dependencies for your Android application:

* Open the **mobile property** configured in the **Data Collection UI** for your application.
* Navigate to the **Extensions** tab and update all the extensions to the latest version.
* The [install instructions](../home/getting-started/get-the-sdk.md#1-add-dependencies-to-your-project) will now show the dependencies for the latest Mobile SDK.

### Why do I see 'java.lang.NoSuchMethodError' after upgrading to the latest version of Mobile SDK for Android?

The latest Mobile Core SDK for Android includes changes that break compatiblity with solution SDKs developed for earlier verisons of the Mobile Core SDK.

If you attempt to use the latest Mobile Core SDK and solution SDKs that were built for previous versions of Mobile Core to build your app, you may encounter the following error:

``` text
2023-02-13 17:45:02.501 14264-14264/XXX E/AndroidRuntime: FATAL EXCEPTION: main
Process: XXX, PID: XXXXX
java.lang.NoSuchMethodError: No static method getCore()Lcom/adobe/marketing/mobile/Core; in class Lcom/adobe/marketing/mobile/MobileCore; or its super classes (declaration of 'com.adobe.marketing.mobile.MobileCore' appears in XXX
```

To resolve this error, upgrade all your solution SDKs to the [most recent versions](../home/current-sdk-versions.md#android).

### Why do I not see 'sdk-core' dependency for latest version of Mobile SDK for Android?

The **com.adobe.marketing.mobile:sdk-core** dependency is no longer available for the latest version of Mobile SDK. Instead, select the appropriate solution SDKs based on your requirements from the following options:

```java
implementation platform('com.adobe.marketing.mobile:sdk-bom:2.+')
implementation 'com.adobe.marketing.mobile:core'
implementation 'com.adobe.marketing.mobile:lifecycle'
implementation 'com.adobe.marketing.mobile:identity'
implementation 'com.adobe.marketing.mobile:signal'
```

### How do I upgrade to the latest version of Mobile SDK for Android if my app uses Mobile Services?

Adobe Mobile Service's end-of-life date is [December 31, 2022](https://experienceleague.adobe.com/docs/discontinued/using/mobile-services.html). To upgrade to the latest version of Mobile SDK for Android, you have to remove the Mobile Services dependency from your app.

### Why do I see a warning in AndroidManifest.xml about missing 'com.adobe.marketing.mobile.FullscreenMessageActivity' class?

After upgrading to the latest version of Mobile SDK for Android, you will see the following build warning if your application previously set up in-app messages with Campaign Standard.

``` text
Class referenced in the manifest, `com.adobe.marketing.mobile.FullscreenMessageActivity`, was not found in the project or the libraries
Unresolved class 'FullscreenMessageActivity'
```

To resolve the build warning, remove FullscreenMessageActivity from your application's manifest file. Campaign Standard SDK no longer requires application to add **FullscreenMessageActivity** to their manifest.

### Why do I see 'unresolved reference' error when upgrading Adobe Target SDK to the latest version?

The [latest version](../solution/adobe-target/release-notes.md#android-target-200) of Adobe Target Mobile SDK has the following breaking API changes for alignment with the iOS SDK:

* **locationsDisplayed** is now **displayedLocations**
* **locationClicked** is now **clickedLocation**

The public classes **TargetRequest**, **TargetPrefetch**, **TargetOrder**, **TargetProduct** and **TargetParameters** are consolidated under the **target** subpackage.

To resolve the error, fix the method references and update your target import statements:

```java
import com.adobe.marketing.mobile.target.TargetRequest;
import com.adobe.marketing.mobile.target.TargetPrefetch;
import com.adobe.marketing.mobile.target.TargetOrder;
import com.adobe.marketing.mobile.target.TargetProduct;
import com.adobe.marketing.mobile.target.TargetParameters;
```

In addition, replace the previously deprecated Target APIs and classes since they have been removed. For more information, please read this section on the [deprecated APIs and the recommended alternative APIs](https://developer.adobe.com/client-sdks/previous-versions/documentation/adobe-target/deprecated-apis/).

### Why do I see `registerDevice(String, String, Map<String, Object>)` cannot be applied to [arguments] error when upgrading Adobe Campaign Classic SDK to the latest version?

The `registerDevice` API in the latest Campaign Classic Android Mobile SDK, similar to iOS SDK, no longer provides a callback method for registration status since a `false` value cannot be accurately used as a signal to retry requests.

To resolve the error, remove the callback (`AdobeCallback<Boolean>`) parameter from the method invocation.

### Why do I see `getNearbyPointsOfInterest(Location, int, AdobeCallback<List<PlacesPOI>>, AdobeCallback<PlacesRequestError>)` cannot be applied to [arguments] error when upgrading Adobe Experience Platform Location Service SDK to the latest version?

The `getNearbyPointsOfInterest` API without the error callback has been removed. Alternatively, use the below overloaded API which provides both successCallback and errorCallback:

```java
public static void getNearbyPointsOfInterest(final Location location,
final int limit,
final AdobeCallback<List<PlacesPOI>> successCallback,
final AdobeCallback<PlacesRequestError> errorCallback)
```

The public classes `PlacesAuthorizationStatus`, `PlacesPOI`, and `PlacesRequestError` are consolidated under the `places` subpackage.

To resolve the error, fix the method references and update your places import statements:

```java
import com.adobe.marketing.mobile.places.PlacesAuthorizationStatus;
import com.adobe.marketing.mobile.places.PlacesPOI;
import com.adobe.marketing.mobile.places.PlacesRequestError;
```
See the frequently asked questions for migration [here](../resources/migration/android/migrate-to-android-2x.md#frequently-asked-questions)

## Lifecycle

Expand Down
7 changes: 7 additions & 0 deletions src/pages/resources/migration/android/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Migration guides for Adobe Experience Platform Android SDKs

This document provides a collection of resources to help you migrate between various versions of the Adobe Experience Platform Android SDKs.

## Migrate to Adobe Experience Platform 2.x Android SDKs
praveek marked this conversation as resolved.
Show resolved Hide resolved

Learn how to [migrate to Adobe Experience Platform 2.x Android SDKs](../android/migrate-to-android-2x.md) from Experience Platform 1.x Android SDKs.
Loading