Skip to content

Commit

Permalink
Merge pull request #635 from adobe/dev-v3.0.0
Browse files Browse the repository at this point in the history
Merge dev -> staging
  • Loading branch information
praveek authored Mar 26, 2024
2 parents fa5fccb + bd38e8c commit 69c2f69
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 136 deletions.
17 changes: 9 additions & 8 deletions Documentation/Debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ The AEP SDK offers an extension to quickly inspect, validate, debug data collect

#### Add Assurance to your app

Installation via [Maven](https://maven.apache.org/) & [Gradle](https://gradle.org/) is the easiest and recommended way to get the AEP SDK into your Android app. In your `build.gradle` file, include the latest version of following dependency:
Installation via [Maven](https://maven.apache.org/) & [Gradle](https://gradle.org/) is the easiest and recommended way to get the AEP SDK into your Android app. In your `build.gradle` file, include the latest version of Assurance:

```
implementation 'com.adobe.marketing.mobile:assurance:2.x.x'
##### Kotlin
```kotlin
implementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))
implementation("com.adobe.marketing.mobile:assurance")
```

**Note**: Assurance SDK displays some UI components using the source app context. If you see an error similar to

```
AAPT: error: attribute layout_constraintStart_toStartOf (aka <your_app_name>:layout_constraintStart_toStartOf) not found
##### Groovy
```groovy
implementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')
implementation 'com.adobe.marketing.mobile:assurance'
```
while building your app with Assurance SDK, include a dependency on `implementation 'androidx.constraintlayout:constraintlayout:1.x.x'` in your app.

#### Update Extension Registration

Expand Down
36 changes: 0 additions & 36 deletions Documentation/Migration.md

This file was deleted.

34 changes: 21 additions & 13 deletions Documentation/MobileCore/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This guide walks through how to get up and running with the AEP Android SDK with only a few lines of code.

> Existing ACP SDK customers should check out the [migration document](../Migration.md).
> For customers using previous versions of the Android SDK, it is recommended to first review the [migration document](https://developer.adobe.com/client-sdks/resources/migration/android/).
## Set up a Mobile Property

Expand All @@ -16,12 +16,26 @@ If you cannot access the Mobile Install Instructions dialog box in the Data Coll

1. Each extension needs to be added as a dependency to the mobile application project. The following examples will add the Mobile Core, Lifecycle, Identity, Signal and Profile extensions.

```java
implementation 'com.adobe.marketing.mobile:userprofile:2.+'
implementation 'com.adobe.marketing.mobile:core:2.+'
implementation 'com.adobe.marketing.mobile:identity:2.+'
implementation 'com.adobe.marketing.mobile:signal:2.+'
implementation 'com.adobe.marketing.mobile:lifecycle:2.+'
### Kotlin

```kotlin
implementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))
implementation("com.adobe.marketing.mobile:core")
implementation("com.adobe.marketing.mobile:identity")
implementation("com.adobe.marketing.mobile:signal")
implementation("com.adobe.marketing.mobile:lifecycle")
implementation("com.adobe.marketing.mobile:userprofile")
```

### Groovy

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

> **Warning**
Expand Down Expand Up @@ -125,12 +139,6 @@ override fun onPause() {
}
```

## Sample Apps

To download more examples of integrating the AEP Android SDK, head over to the sample app resources.

[View Samples](https://github.com/adobe/aepsdk-sample-app-android)

## Next Steps

- Get familiar with the various APIs offered by the AEP SDK by checking out the [Mobile Core API reference](./api-reference.md).
Expand Down
1 change: 0 additions & 1 deletion Documentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* [Getting Started](./MobileCore/getting-started.md)
* [Managing Gradle Dependencies](./MobileCore/gradle-dependencies.md)
* [API Usage](./MobileCore/api-reference.md)
* [Migrating from ACPCore to AEPCore](./Migration.md)
* [Validation via Assurance](./Debugging.md)
* [Architecture](./Architecture.md)
* [EventHub](./EventHub/README.md)
Expand Down
2 changes: 1 addition & 1 deletion code/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath("com.github.adobe:aepsdk-commons:gp-3.0.0-beta.2")
classpath("com.github.adobe:aepsdk-commons:gp-3.0.0")
classpath("org.jetbrains.kotlinx:binary-compatibility-validator:0.13.2")
classpath("androidx.benchmark:benchmark-gradle-plugin:1.2.3")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
import android.content.res.Configuration;
import android.content.res.Resources;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import com.adobe.marketing.mobile.internal.util.NetworkUtils;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -214,71 +214,15 @@ public String getMobileCarrierName() {

@Override
public ConnectionStatus getNetworkConnectionStatus() {
final Context context = getApplicationContext();

if (context == null) {
return DeviceInfoService.ConnectionStatus.UNKNOWN;
}

try {
// We have a context so ask the system for an instance of ConnectivityManager
ConnectivityManager connectivityManager =
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);

if (connectivityManager != null) {
// We have an instance of ConnectivityManager so now we can ask for the active
// network info
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();

if (activeNetworkInfo != null) {
// At this point we have everything that we need to accurately determine the
// current connectivity status
return activeNetworkInfo.isAvailable() && activeNetworkInfo.isConnected()
? DeviceInfoService.ConnectionStatus.CONNECTED
: DeviceInfoService.ConnectionStatus.DISCONNECTED;
} else {
// Per Android documentation getActiveNetworkInfo() will return null if no
// default network is currently active.
// If no default network is currently active we can assume that we don't have
// connectivity.
Log.debug(
ServiceConstants.LOG_TAG,
LOG_TAG,
"Unable to determine connectivity status due to there being no default"
+ " network currently active");
}
} else {
Log.debug(
ServiceConstants.LOG_TAG,
LOG_TAG,
"Unable to determine connectivity status due to the system service"
+ " requested being unrecognized");
}
} catch (NullPointerException e) {
Log.debug(
ServiceConstants.LOG_TAG,
LOG_TAG,
String.format(
"Unable to determine connectivity status due to an unexpected error"
+ " (%s)",
e.getLocalizedMessage()));
} catch (SecurityException e) {
Log.debug(
ServiceConstants.LOG_TAG,
LOG_TAG,
String.format(
"Unable to access connectivity status due to a security error (%s)",
e.getLocalizedMessage()));
} catch (Exception e) {
Log.debug(
ServiceConstants.LOG_TAG,
LOG_TAG,
String.format(
"Unable to access connectivity status due to an unexpected error (%s)",
e.getLocalizedMessage()));
ConnectivityManager connectivityManager =
ServiceProvider.getInstance().getAppContextService().getConnectivityManager();
if (connectivityManager == null) {
return ConnectionStatus.UNKNOWN;
}

return DeviceInfoService.ConnectionStatus.UNKNOWN;
return NetworkUtils.isInternetAvailable(connectivityManager)
? ConnectionStatus.CONNECTED
: ConnectionStatus.DISCONNECTED;
}

@Override
Expand Down
8 changes: 4 additions & 4 deletions code/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ android.useAndroidX=true

#Maven artifacts
#Core extension
coreExtensionVersion=3.0.0-beta.1
coreExtensionVersion=3.0.0
coreExtensionName=core
coreMavenRepoName=AdobeMobileCoreSdk
coreMavenRepoDescription=Android Core Extension for Adobe Mobile Marketing
#Signal extension
signalExtensionVersion=3.0.0-beta.1
signalExtensionVersion=3.0.0
signalExtensionName=signal
signalMavenRepoName=AdobeMobileSignalSdk
signalMavenRepoDescription=Android Signal Extension for Adobe Mobile Marketing
#Lifecycle extension
lifecycleExtensionVersion=3.0.0-beta.1
lifecycleExtensionVersion=3.0.0
lifecycleExtensionName=lifecycle
lifecycleMavenRepoName=AdobeMobileLifecycleSdk
lifecycleMavenRepoDescription=Android Lifecycle Extension for Adobe Mobile Marketing
#Identity extension
identityExtensionVersion=3.0.0-beta.1
identityExtensionVersion=3.0.0
identityExtensionName=identity
identityMavenRepoName=AdobeMobileIdentitySdk
identityMavenRepoDescription=Android Identity Extension for Adobe Mobile Marketing
4 changes: 1 addition & 3 deletions code/identity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ aepLibrary {
mavenRepoName = identityMavenRepoName
mavenRepoDescription = identityMavenRepoDescription
gitRepoName = "aepsdk-core-android"

// Stop using snapshot version after release
addCoreDependency("$coreExtensionVersion-SNAPSHOT")
addCoreDependency("$coreExtensionVersion")
}
}

Expand Down
4 changes: 1 addition & 3 deletions code/lifecycle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ aepLibrary {
mavenRepoName = lifecycleMavenRepoName
mavenRepoDescription = lifecycleMavenRepoDescription
gitRepoName = "aepsdk-core-android"

// Stop using snapshot version after release
addCoreDependency("$coreExtensionVersion-SNAPSHOT")
addCoreDependency("$coreExtensionVersion")
}
}

Expand Down
4 changes: 1 addition & 3 deletions code/signal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ aepLibrary {
mavenRepoName = signalMavenRepoName
mavenRepoDescription = signalMavenRepoDescription
gitRepoName = "aepsdk-core-android"

// Stop using snapshot version after release
addCoreDependency("$coreExtensionVersion-SNAPSHOT")
addCoreDependency("$coreExtensionVersion")
}
}

Expand Down

0 comments on commit 69c2f69

Please sign in to comment.