Skip to content

Commit

Permalink
Merge pull request #8 from SumiMakito/develop
Browse files Browse the repository at this point in the history
Issue #7 fixed.
  • Loading branch information
sumimakito authored May 4, 2017
2 parents 26e48f7 + 7a601b1 commit 4b9320f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ allprojects {
Then, add below lines in build.gradle of your app module:
```
dependencies {
compile 'com.github.SumiMakito:AwesomeQRCode:1.0.2'
compile 'com.github.SumiMakito:AwesomeQRCode:1.0.3'
}
```

Expand Down Expand Up @@ -67,6 +67,10 @@ public static Bitmap create(

### Changelog, 更新日志

#### 1.0.3
Added CHARACTER_SET => UTF-8 to QR code's hints before encoding.
Fixed an encoding issue mentioned in [#7](https://github.com/SumiMakito/AwesomeQRCode/issues/7).

#### 1.0.2
Added an optional parameter which enables the data dots to appear as filled circles.

Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
defaultConfig {
minSdkVersion 9
targetSdkVersion 25
versionCode 3
versionName "1.0.2"
versionCode 4
versionName "1.0.3"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import com.google.zxing.qrcode.encoder.QRCode;

import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;

public class AwesomeQRCode {
Expand Down Expand Up @@ -293,7 +294,8 @@ private static QRCode getProtoQRCode(String contents, ErrorCorrectionLevel error
if (contents.isEmpty()) {
throw new IllegalArgumentException("Found empty contents");
}
Map<EncodeHintType, ErrorCorrectionLevel> hintMap = new HashMap<>();
Hashtable<EncodeHintType, Object> hintMap = new Hashtable<>();
hintMap.put(EncodeHintType.CHARACTER_SET, "UTF-8");
hintMap.put(EncodeHintType.ERROR_CORRECTION, errorCorrectionLevel);
return Encoder.encode(contents, errorCorrectionLevel, hintMap);
}
Expand Down

0 comments on commit 4b9320f

Please sign in to comment.