Skip to content

Commit

Permalink
Update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkistner committed Feb 11, 2020
1 parent 5a2470f commit 13440ad
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,11 @@ Features:

A sample application is available in [Releases](https://github.com/journeyapps/zxing-android-embedded/releases).

By default, Android SDK 24+ is required because of `zxing:core` 3.4.0.
To support SDK 14+, downgrade `zxing:core` to 3.3.0 -
see [instructions](#adding-aar-dependency-with-gradle). You'll also need this in your Android manifest:

```xml
<uses-sdk tools:overrideLibrary="com.google.zxing.client.android" />
```

No guarantees are made on support for older SDK versions - you'll have to test to make sure it's compatible.
By default, Android SDK 24+ is required because of `zxing:core` 3.4.0. To support SDK 14+, see [Older SDK versions](#older-sdk-versions).

## Adding aar dependency with Gradle

From version 4.0.2, only Android SDK 24+ is supported by default, and androidx is required.
From version 4.x, only Android SDK 24+ is supported by default, and androidx is required.

Add the following to your `build.gradle` file:

Expand All @@ -35,7 +27,7 @@ repositories {
}
dependencies {
implementation 'com.journeyapps:zxing-android-embedded:4.0.2'
implementation 'com.journeyapps:zxing-android-embedded:4.1.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
}
Expand All @@ -45,15 +37,17 @@ android {
```

For Android 14+ support, downgrade `zxing:core` to 3.3.0 or earlier:
## Older SDK versions

For Android SDK versions < 24, you can downgrade `zxing:core` to 3.3.0 or earlier for Android 14+ support:

```groovy
repositories {
jcenter()
}
dependencies {
implementation('com.journeyapps:zxing-android-embedded:4.0.2') { transitive = false }
implementation('com.journeyapps:zxing-android-embedded:4.1.0') { transitive = false }
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.zxing:core:3.3.0'
}
Expand All @@ -63,6 +57,13 @@ android {
}
```
You'll also need this in your Android manifest:

```xml
<uses-sdk tools:overrideLibrary="com.google.zxing.client.android" />
```

No guarantees are made on support for older SDK versions - you'll have to test to make sure it's compatible.

## Hardware Acceleration

Expand Down

0 comments on commit 13440ad

Please sign in to comment.