Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Update from release/10.0.0 (#100)
Browse files Browse the repository at this point in the history
* Jenkins Release Job 39 message: Update API Docs

* Jenkins Release Job 39 message: Update Migration Guides

* Jenkins Release Job 39 message: Update CHANGELOG.md

* Jenkins Release Job 39 message: Update README.md

Co-authored-by: Thunderhead Bot <scrum-team-x@thunderhead.com>
  • Loading branch information
github-actions[bot] and Thunderhead Bot authored Jul 15, 2021
1 parent ee8ea5d commit b29c8d7
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 79 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#### Version 10.0.0
* [BREAKING] Requires the [Orchestration Plugin version 5.0.0](https://github.com/thunderheadone/one-android-orchestration-plugin/releases/tag/5.0.0).
* [BREAKING] Fixed an issue where SDK logging was not able to be turned off when using the logging configuration builder in Java. For further details on this [see our migration guide](https://github.com/thunderheadone/one-sdk-android/blob/master/MIGRATION-VERSION-10.md#logging-configuration).
* [BREAKING] JSON Assets no longer contain HTML encoded entities and the SDK no longer attempts to remove HTML encoded entities. For further details on this [see our example app](https://github.com/thunderheadone/one-sdk-android/commit/ee8ea5ddab9173cd7401f3765dcd9610f2034ee3). If you still require the old encoding to be returned, please reach out to our [support team](https://github.com/thunderheadone/one-sdk-android#thunderhead-one-support).
* [NEW] Added ability to send SDK logs to a file whilst in Admin Mode for easy sharing without support team.
* [NEW] Added ability to create entities in Admin mode and codelessly send app preference data for a region to ONE based on configuration.
* [UPDATE] Device data is now sent with all runtime requests.
* [UPDATE] Improved `WebView` automatic Interaction tracking given identified obfuscation issue.
* [UPDATE] Updated the SDK to use Kotlin 1.4.
* [BUGFIX] Updated logging to notify the developer if a callback is added before an activity content view is set.
* [BUGFIX] Fixed a crash when a null error is received by a callback expecting a non-null error.
* [BUGFIX] Fixed an issue where some not allowed interactions were sent.
* [BUGFIX] Fixed an issue where the EXIT PREVIEW button was hidden behind a soft menu bar on some phones.

#### Version 9.1.0
* [NEW] Added ability to control Data Adapter location sharing. For further details on this [see our readme](https://github.com/thunderheadone/one-sdk-android#opt-an-end-user-out-in-of-city-country-level-tracking).
* [NEW] Added ability to disable WebView Interaction tracking. For further details on this [see our readme](https://github.com/thunderheadone/one-sdk-android#disable-automatic-interaction-detection).
Expand Down
133 changes: 62 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
* [Send a location object](#send-a-location-object)
* [Get Tid](#get-tid)
* [Configuring Logging](#configuring-logging)
* [Turn all logs on](#turn-all-logs-on)
* [Turn specific logs on](#turn-specific-logs-on)
* [Turn logs for the Thunderhead SDK initialization process on](#turn-logs-for-the-thunderhead-sdk-initialization-process-on)
* [Turn all logs off](#turn-all-logs-off)
* [Identify the SDK version](#identify-the-sdk-version)
* [Clear the user profile](#clear-the-user-profile)
* [Further integration details](#further-integration-details)
Expand Down Expand Up @@ -74,15 +78,15 @@

```gradle
dependencies {
implementation "com.thunderhead.android:one-sdk:9.1.0"
implementation "com.thunderhead.android:one-sdk:10.0.0"
}
```
For **Salesforce Interaction Studio** integrations:
```gradle
dependencies {
implementation "com.thunderhead.android:is-sdk:9.1.0"
implementation "com.thunderhead.android:is-sdk:10.0.0"
}
```
Expand Down Expand Up @@ -144,7 +148,7 @@
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.thunderhead.android:orchestration-plugin:4.0.0'
classpath 'com.thunderhead.android:orchestration-plugin:5.0.0'
}
}
```
Expand All @@ -171,7 +175,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.thunderhead.android:orchestration-plugin:4.0.0'
classpath 'com.thunderhead.android:orchestration-plugin:5.0.0'
}
}
Expand Down Expand Up @@ -210,7 +214,7 @@ android {
}
dependencies {
implementation "com.thunderhead.android:one-sdk:9.1.0"
implementation "com.thunderhead.android:one-sdk:10.0.0"
}
repositories {
Expand Down Expand Up @@ -241,7 +245,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.thunderhead.android:orchestration-plugin:4.0.0'
classpath 'com.thunderhead.android:orchestration-plugin:5.0.0'
}
}
Expand Down Expand Up @@ -279,7 +283,7 @@ android {
}
dependencies {
implementation "com.thunderhead.android:is-sdk:9.1.0"
implementation "com.thunderhead.android:is-sdk:10.0.0"
}
repositories {
Expand Down Expand Up @@ -1628,7 +1632,6 @@ Uri.parse("https://www.yourfullurl.com/").sendInteractionForOutboundLink()
URL("https://www.yourfullurl.com/").sendInteractionForOutboundLink()
```
`Java`
```java
// URL example
Expand Down Expand Up @@ -1694,77 +1697,46 @@ One.getTid();
### Configuring Logging
The Thunderhead SDK for Android provides an extensible logging configuration API for debug or reporting purposes. The API can be configured to
log any combination of "Components" (features or technical concepts such as networking or databases) to Log Levels (Debug, Verbose, etc). In addition,
log any combination of Components (features or technical concepts such as Networking or Databases) to Log Levels (Verbose, Debug, etc). In addition,
custom log writers can be added to facilitate reporting if desired (ex. sending errors to Google Console).
Below are various examples of logging configurations.
*Turning logging off if it has been turned on.*
`Kotlin`
```kotlin
import com.thunderhead.android.api.logging.Component
import com.thunderhead.android.api.logging.LogLevel
import com.thunderhead.android.api.logging.and
import com.thunderhead.android.api.oneConfigureLogging
// rest of imports
oneConfigureLogging {
levels = mutableSetOf()
components = mutableSetOf()
}
```
`Java`
```java
import com.thunderhead.One;
import com.thunderhead.android.api.configuration.OneConfiguration;
import com.thunderhead.android.api.logging.Component;
import com.thunderhead.android.api.logging.LogLevel;
import com.thunderhead.android.api.logging.OneLoggingConfiguration;
// rest of imports
final OneLoggingConfiguration oneLoggingConfiguration = OneLoggingConfiguration.builder()
.build();
By default, the Thunderhead SDK for Android logs ERROR and WARN messages for ANY component. Below are examples of other logging configurations.
One.setLoggingConfiguration(oneLoggingConfiguration);
```
#### Turn all logs on
*Combination of ERROR and WARN levels for ANY Thunderhead SDK Component.*
*Example of configuring logging to VERBOSE Log Level for ANY Components of the Thunderhead SDK.*
`Kotlin`
```kotlin
import com.thunderhead.android.api.logging.Component
import com.thunderhead.android.api.logging.LogLevel
import com.thunderhead.android.api.logging.and
import com.thunderhead.android.api.oneConfigureLogging
// rest of imports
oneConfigureLogging {
levels = LogLevel.ERROR and LogLevel.WARN
components = mutableSetOf(Component.ANY)
levels = mutableSetOf(LogLevel.VERBOSE)
components = mutableSetOf(LogLevel.ANY)
}
```
`Java`
```java
import com.thunderhead.One;
import com.thunderhead.android.api.configuration.OneConfiguration;
import com.thunderhead.android.api.logging.Component;
import com.thunderhead.android.api.logging.LogLevel;
import com.thunderhead.android.api.logging.OneLoggingConfiguration;
// rest of imports
final OneLoggingConfiguration oneLoggingConfiguration = OneLoggingConfiguration.builder()
.log(LogLevel.ERROR)
.log(LogLevel.WARN)
.log(LogLevel.VERBOSE)
.log(Component.ANY)
.build();
One.setLoggingConfiguration(oneLoggingConfiguration);
```
*Combination of VERBOSE (IE everything) for just Networking and Database Components of the Thunderhead SDK.*
#### Turn specific logs on
*Example of configuring logging to combination of ERROR and WARN levels for just NETWORKING and DATABASE Components of the Thunderhead SDK.*
`Kotlin`
```kotlin
Expand All @@ -1775,22 +1747,21 @@ import com.thunderhead.android.api.oneConfigureLogging
// rest of imports
oneConfigureLogging {
levels = mutableSetOf(LogLevel.VERBOSE)
levels = LogLevel.ERROR and LogLevel.WARN
components = Component.NETWORKING and Component.DATABASE
}
```
`Java`
```java
import com.thunderhead.One;
import com.thunderhead.android.api.configuration.OneConfiguration;
import com.thunderhead.android.api.logging.Component;
import com.thunderhead.android.api.logging.LogLevel;
import com.thunderhead.android.api.logging.OneLoggingConfiguration;
// rest of imports
final OneLoggingConfiguration oneLoggingConfiguration = OneLoggingConfiguration.builder()
.log(LogLevel.VERBOSE)
.log(LogLevel.ERROR)
.log(LogLevel.WARN)
.log(Component.NETWORKING)
.log(Component.DATABASE)
.build();
Expand Down Expand Up @@ -1830,8 +1801,6 @@ class CustomLogger : LogWriter() {
`Java`
```java
import com.thunderhead.One;
import com.thunderhead.android.api.configuration.OneConfiguration;
import com.thunderhead.android.api.logging.Component;
import com.thunderhead.android.api.logging.LogLevel;
import com.thunderhead.android.api.logging.OneLoggingConfiguration;
Expand Down Expand Up @@ -1861,7 +1830,7 @@ static class CustomLogger extends LogWriter {
}
```
*To log the Thunderhead SDK initialization process*
#### Turn logs for the Thunderhead SDK initialization process on
The Thunderhead SDK performs initialization processes in an Android Content Provider which is instantiated before
the Application is created. This means the log configuration API cannot be invoked before the Thunderhead SDK
Expand All @@ -1873,7 +1842,7 @@ a meta data element must be added to the android manifest. If the metadata eleme
`name` : `com.thunderhead.android.InitLogLevel`
`value`: Comma separated list of `com.thunderhead.android.api.logging.LogLevel`
*Example logging verbose and above logs:*
*Example for logging VERBOSE and above logs:*
```xml
<application>
Expand All @@ -1885,26 +1854,47 @@ a meta data element must be added to the android manifest. If the metadata eleme
</application>
```
*Example logging only ERROR and WARN logs:*
```xml
<application>
<!--Other application elements-->
<meta-data
android:name="com.thunderhead.android.InitLogLevel"
android:value="ERROR,WARN" />
</application>
```
**Recommendation**
We recommend including the above metadata only in `DEBUG` builds to ensure no unnecessary logging
occurs in release. Therefore, only include this metadata in the `DEBUG` variant
`AndroidManifest.xml` and _NOT_ in the main `AndroidManifest.xml`. To learn more about how manifests
are merged, please see the [Android Documentation](https://developer.android.com/studio/build/manifest-merge).
#### Turn all logs off
To turn off logging, pass a set to logLevel and a set to logComponent with the values of NONE
*Example of turning logging off*
`Kotlin`
```kotlin
import com.thunderhead.android.api.logging.Component
import com.thunderhead.android.api.logging.LogLevel
import com.thunderhead.android.api.logging.and
import com.thunderhead.android.api.oneConfigureLogging
// rest of imports
oneConfigureLogging {
levels = mutableSetOf(LogLevel.NONE)
components = mutableSetOf(Component.NONE)
}
```
`Java`
```java
import com.thunderhead.android.api.logging.Component;
import com.thunderhead.android.api.logging.LogLevel;
import com.thunderhead.android.api.logging.OneLoggingConfiguration;
// rest of imports
final OneLoggingConfiguration oneLoggingConfiguration = OneLoggingConfiguration.builder()
.log(LogLevel.NONE)
.log(Component.NONE)
.build();
One.setLoggingConfiguration(oneLoggingConfiguration);
```
*Note:*
- By default, the Thunderhead SDK for Android logs ERROR and WARN messages for ANY component.
- The `com.thunderhead.android.InitLogLevel` `AndroidManifest.xml` metadata value is only honored
for the Thunderhead SDK initialization process. After initialization has finished, the logging
configuration reverts to a default configuration mentioned above. If more logging is desired then use the logging
Expand Down Expand Up @@ -1949,7 +1939,7 @@ To completely remove the codeless identity transfer functionality for Android, m
1. Open the **top-level** `build.gradle` file and remove the following dependency reference.

```gradle
classpath 'com.thunderhead.android:orchestration-plugin:4.0.0'
classpath 'com.thunderhead.android:orchestration-plugin:5.0.0'
```

2. Open the **app-level** `build.gradle` file and remove the following references.
Expand All @@ -1968,3 +1958,4 @@ _For Salesforce Marketing Cloud Interaction Studio questions, please submit a su

### Thunderhead ONE support
_The Thunderhead team is available 24/7 to answer any questions you have. Just email onesupport@thunderhead.com or visit our docs page for more detailed installation and usage information._

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Thunderhead](../../index.md) / [com.thunderhead.android.api.logging](../index.md) / [Component](index.md) / [FILELOGGING](./-f-i-l-e-l-o-g-g-i-n-g.md)

# FILELOGGING

`FILELOGGING`
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Thunderhead](../../index.md) / [com.thunderhead.android.api.logging](../index.md) / [Component](index.md) / [NONE](./-n-o-n-e.md)

# NONE

`NONE`
2 changes: 2 additions & 0 deletions docs/com.thunderhead.android.api.logging/-component/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ the Thunderhead SDK will log.
| [NETWORKING](-n-e-t-w-o-r-k-i-n-g.md) | |
| [DATABASE](-d-a-t-a-b-a-s-e.md) | |
| [STATE](-s-t-a-t-e.md) | |
| [FILELOGGING](-f-i-l-e-l-o-g-g-i-n-g.md) | |
| [NONE](-n-o-n-e.md) | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Thunderhead](../../index.md) / [com.thunderhead.android.api.logging](../index.md) / [LogLevel](index.md) / [NONE](./-n-o-n-e.md)

# NONE

`NONE`

Nothing is logged.

Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ The Level (IE severity) of a Thunderhead SDK Log Message.
| [WARN](-w-a-r-n.md) | Warnings might be logged. |
| [INFO](-i-n-f-o.md) | Info details might be logged. |
| [ASSERT](-a-s-s-e-r-t.md) | Errors might be logged and based on system configuration terminate the application. |
| [NONE](-n-o-n-e.md) | Nothing is logged. |
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# components

`var components: MutableSet<`[`Component`](../../-component/index.md)`>`
`var components: MutableSet<`[`Component`](../../-component/index.md)`>?`

A `Set` of [Component](../../-component/index.md)s. Components are a feature or technical concept
such as Networking or Database.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ Builder to create a [OneLoggingConfiguration](../index.md).

| Name | Summary |
|---|---|
| [components](components.md) | A `Set` of [Component](../../-component/index.md)s. Components are a feature or technical concept such as Networking or Database. Use the [Component.ANY](../../-component/-a-n-y.md) component to log messages for all of the SDK in conjunction with the log level.`var components: MutableSet<`[`Component`](../../-component/index.md)`>` |
| [levels](levels.md) | A `Set` of [LogLevel](../../-log-level/index.md)s. If a singular level is set then the SDK will log messages of that level and above in conjunction with the [components](components.md). The order from bottom up is VERBOSE, DEBUG, ERROR, WARN, INFO, ASSERT. *Example*: Setting VERBOSE will log all messages. *Example*: Setting INFO will log only INFO and ASSERT messages.`var levels: MutableSet<`[`LogLevel`](../../-log-level/index.md)`>` |
| [components](components.md) | A `Set` of [Component](../../-component/index.md)s. Components are a feature or technical concept such as Networking or Database. Use the [Component.ANY](../../-component/-a-n-y.md) component to log messages for all of the SDK in conjunction with the log level.`var components: MutableSet<`[`Component`](../../-component/index.md)`>?` |
| [levels](levels.md) | A `Set` of [LogLevel](../../-log-level/index.md)s. If a singular level is set then the SDK will log messages of that level and above in conjunction with the [components](components.md). The order from bottom up is VERBOSE, DEBUG, ERROR, WARN, INFO, ASSERT. *Example*: Setting VERBOSE will log all messages. *Example*: Setting INFO will log only INFO and ASSERT messages.`var levels: MutableSet<`[`LogLevel`](../../-log-level/index.md)`>?` |
| [logWriters](log-writers.md) | A `Set` of custom loggers ([LogWriter](../../-log-writer/index.md)).`var logWriters: MutableSet<`[`LogWriter`](../../-log-writer/index.md)`>` |

### Functions

| Name | Summary |
|---|---|
| [build](build.md) | Create a [OneLoggingConfiguration](../index.md) based on builder options.`fun build(): `[`OneLoggingConfiguration`](../index.md) |
| [log](log.md) | Add a desired [Component](../../-component/index.md) to log information about.`fun log(component: `[`Component`](../../-component/index.md)`): Builder`<br>Add a desired [LogLevel](../../-log-level/index.md) to log information about.`fun log(level: `[`LogLevel`](../../-log-level/index.md)`): Builder`<br>Add a multiple desired [Component](../../-component/index.md)s to log information about.`fun log(vararg component: `[`Component`](../../-component/index.md)`): Builder`<br>Add a multiple desired [LogLevel](../../-log-level/index.md)s to log information about.`fun log(vararg level: `[`LogLevel`](../../-log-level/index.md)`): Builder` |
| [log](log.md) | Add a desired [Component](../../-component/index.md) to log information about.`fun log(component: `[`Component`](../../-component/index.md)`): Builder`<br>Add a desired [LogLevel](../../-log-level/index.md) to log information about.`fun log(level: `[`LogLevel`](../../-log-level/index.md)`): Builder`<br>Add multiple desired [Component](../../-component/index.md)s to log information about.`fun log(vararg component: `[`Component`](../../-component/index.md)`): Builder`<br>Add multiple desired [LogLevel](../../-log-level/index.md)s to log information about.`fun log(vararg level: `[`LogLevel`](../../-log-level/index.md)`): Builder` |
| [logTo](log-to.md) | Add a custom logger to write logs to.`fun logTo(logWriter: `[`LogWriter`](../../-log-writer/index.md)`): Builder`<br>Add a set of custom loggers to write logs to.`fun logTo(logWriters: Set<`[`LogWriter`](../../-log-writer/index.md)`>): Builder` |
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# levels

`var levels: MutableSet<`[`LogLevel`](../../-log-level/index.md)`>`
`var levels: MutableSet<`[`LogLevel`](../../-log-level/index.md)`>?`

A `Set` of [LogLevel](../../-log-level/index.md)s. If a singular level is set
then the SDK will log messages of that level and above in conjunction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Add a desired [LogLevel](../../-log-level/index.md) to log information about.

`fun log(vararg component: `[`Component`](../../-component/index.md)`): Builder`

Add a multiple desired [Component](../../-component/index.md)s to log information about.
Add multiple desired [Component](../../-component/index.md)s to log information about.

`fun log(vararg level: `[`LogLevel`](../../-log-level/index.md)`): Builder`

Add a multiple desired [LogLevel](../../-log-level/index.md)s to log information about.
Add multiple desired [LogLevel](../../-log-level/index.md)s to log information about.

Loading

0 comments on commit b29c8d7

Please sign in to comment.