diff --git a/QRGenearator/src/main/java/androidmads/library/qrgenearator/QRGEncoder.java b/QRGenearator/src/main/java/androidmads/library/qrgenearator/QRGEncoder.java index 3942dff..098c832 100644 --- a/QRGenearator/src/main/java/androidmads/library/qrgenearator/QRGEncoder.java +++ b/QRGenearator/src/main/java/androidmads/library/qrgenearator/QRGEncoder.java @@ -79,7 +79,7 @@ private void encodeQRCodeContents(String data, Bundle bundle, String type) { switch (type) { case QRGContents.Type.TEXT: if (data != null && data.length() > 0) { - contents = data; + contents = data.replace("\\n", "\n"); displayContents = data; title = "Text"; } @@ -279,7 +279,7 @@ private String guessAppropriateEncoding(CharSequence contents) { return "UTF-8"; } } - return null; + return "UTF-8"; // Default encoding } private String trim(String s) { diff --git a/app/build.gradle b/app/build.gradle index 52cf3fc..02b3e47 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,11 +1,11 @@ apply plugin: 'com.android.application' android { - compileSdkVersion 33 + compileSdkVersion 34 defaultConfig { applicationId "androidmads.example" - minSdkVersion 14 + minSdkVersion 19 targetSdkVersion 33 versionCode 1 versionName "1.0" @@ -24,7 +24,7 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.5.1' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' testImplementation 'junit:junit:4.13.2' -// implementation project(':QRGenearator') - implementation 'com.github.androidmads:QRGenerator:1.0.1' + implementation project(':QRGenearator') +// implementation 'com.github.androidmads:QRGenerator:1.0.1' }