GithubHelp home page GithubHelp logo

jaumard / sms_autofill Goto Github PK

View Code? Open in Web Editor NEW
281.0 7.0 173.0 386 KB

Flutter plugin to provide SMS code autofill support

License: MIT License

Java 45.31% Ruby 6.21% Objective-C 3.03% Dart 43.50% Shell 1.96%

sms_autofill's Introduction

sms_autofill

pub package Flutter plugin to provide SMS code autofill support.

For iOS, this package is not needed as the SMS autofill is provided by default, but not for Android, that's where this package is useful.

No permission to read SMS messages is asked to the user as there no need thanks to SMSRetriever API.

Usage

You have two widgets at your disposable for autofill an SMS code, PinFieldAutoFill and TextFieldPinAutoFill.

Just before you sent your phone number to the backend, you need to let the plugin know that it needs to listen for the SMS with the code.

To do that you need to do:

await SmsAutoFill().listenForCode();

This will listen for the SMS with the code during 5 minutes and when received, autofill the following widget.

PinFieldAutoFill

PinFieldAutoFill

PinFieldAutoFill(
                decoration: // UnderlineDecoration, BoxLooseDecoration or BoxTightDecoration see https://github.com/TinoGuo/pin_input_text_field for more info,
                currentCode: // prefill with a code
                onCodeSubmitted: //code submitted callback
                onCodeChanged: //code changed callback
                codeLength: //code length, default 6
              ),

TextFieldPinAutoFill

TextFieldPinAutoFill

TextFieldPinAutoFill(
                decoration: // basic InputDecoration
                currentCode: // prefill with a code
                onCodeSubmitted: //code submitted callback
                onCodeChanged: //code changed callback
                codeLength: //code length, default 6
              ),

Android SMS constraint

For the code to be receive, it need to follow some rules as describe here: https://developers.google.com/identity/sms-retriever/verify

  • Be no longer than 140 bytes
  • Contain a one-time code that the client sends back to your server to complete the verification flow
  • End with an 11-character hash string that identifies your app

One example of SMS would be:

ExampleApp: Your code is 123456
FA+9qCX9VSu

Helper

PhoneFieldHint [Android only]

PhoneFieldHint is a widget that will allow you ask for system phone number and autofill the widget if a phone is choosen by the user.

Phone hint

Custom CodeAutoFill

If you want to create a custom widget that will autofill with the sms code, you can use the CodeAutoFill mixin that will offer you:

  • listenForCode() to listen for the SMS code from the native plugin when SMS is received, need to be called on your initState.
  • cancel() to dispose the subscription of the SMS code from the native plugin, need to be called on your dispose.
  • codeUpdated() called when the code is received, you can access the value with the field code.
  • unregisterListener() to unregister the broadcast receiver, need to be called on your dispose.

App Signature

To get the app signature at runtime just call the getter getAppSignature on SmsAutoFill. You can also find the sample code in example app.

sms_autofill's People

Contributors

adminixtrator avatar asashour avatar bedaut avatar ettaegbe avatar furaiev avatar gagan-garcha avatar grahamsmith avatar hasanm08 avatar iamatulkumar avatar jack24254029 avatar jaumard avatar jlahd avatar kduvnjak avatar knvpk avatar muhammad-usama-siddiqui avatar narhakobyan avatar plavelo avatar sahilmehra98 avatar shivam-modi avatar szprytny avatar vanyasem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sms_autofill's Issues

Dispose Issue

Hi, Thanks for this package and everything works great. But when dispose is called, I get this error in the console.

E/flutter (29786): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Receiver not registered: com.jaumard.smsautofill.SmsAutoFillPlugin$SmsBroadcastReceiver@9cc9569, null)

Any idea what it is and how to solve it?

unregisterReceiver not working

Version: 1.2.1
Platform: Android

How to simulate
Get the example project.
https://github.com/jaumard/sms_autofill/blob/master/example/lib/main.dart

Note that it does call unregisterReceiver inside dispose.

The following error will be thrown when back button is clicked to close the app.

E/ActivityThread(11979): Activity com.example.sms.MainActivity has leaked IntentReceiver com.jaumard.smsautofill.SmsAutoFillPlugin$SmsBroadcastReceiver@4b6602e that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(11979): android.app.IntentReceiverLeaked: Activity com.example.sms.MainActivity has leaked IntentReceiver com.jaumard.smsautofill.SmsAutoFillPlugin$SmsBroadcastReceiver@4b6602e that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(11979): at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:1498)
E/ActivityThread(11979): at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:1226)
E/ActivityThread(11979): at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1601)
E/ActivityThread(11979): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1574)
E/ActivityThread(11979): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1562)
E/ActivityThread(11979): at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:603)
E/ActivityThread(11979): at com.jaumard.smsautofill.SmsAutoFillPlugin$2.onSuccess(SmsAutoFillPlugin.java:104)
E/ActivityThread(11979): at com.jaumard.smsautofill.SmsAutoFillPlugin$2.onSuccess(SmsAutoFillPlugin.java:100)
E/ActivityThread(11979): at com.google.android.gms.tasks.zzn.run(Unknown Source:4)
E/ActivityThread(11979): at android.os.Handler.handleCallback(Handler.java:808)
E/ActivityThread(11979): at android.os.Handler.dispatchMessage(Handler.java:101)
E/ActivityThread(11979): at android.os.Looper.loop(Looper.java:166)
E/ActivityThread(11979): at android.app.ActivityThread.main(ActivityThread.java:7529)
E/ActivityThread(11979): at java.lang.reflect.Method.invoke(Native Method)
E/ActivityThread(11979): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
E/ActivityThread(11979): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
E/ActivityThread(11979): Activity com.example.sms.MainActivity has leaked IntentReceiver com.jaumard.smsautofill.SmsAutoFillPlugin$SmsBroadcastReceiver@7f3d2a9 that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(11979): android.app.IntentReceiverLeaked: Activity com.example.sms.MainActivity has leaked IntentReceiver com.jaumard.smsautofill.SmsAutoFillPlugin$SmsBroadcastReceiver@7f3d2a9 that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(11979): at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:1498)
E/ActivityThread(11979): at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:1226)
E/ActivityThread(11979): at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1601)
E/ActivityThread(11979): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1574)
E/ActivityThread(11979): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1562)
E/ActivityThread(11979): at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:603)
E/ActivityThread(11979): at com.jaumard.smsautofill.SmsAutoFillPlugin$2.onSuccess(SmsAutoFillPlugin.java:104)
E/ActivityThread(11979): at com.jaumard.smsautofill.SmsAutoFillPlugin$2.onSuccess(SmsAutoFillPlugin.java:100)
E/ActivityThread(11979): at com.google.android.gms.tasks.zzn.run(Unknown Source:4)
E/ActivityThread(11979): at android.os.Handler.handleCallback(Handler.java:808)
E/ActivityThread(11979): at android.os.Handler.dispatchMessage(Handler.java:101)
E/ActivityThread(11979): at android.os.Looper.loop(Looper.java:166)
E/ActivityThread(11979): at android.app.ActivityThread.main(ActivityThread.java:7529)
E/ActivityThread(11979): at java.lang.reflect.Method.invoke(Native Method)
E/ActivityThread(11979): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
E/ActivityThread(11979): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)

missing a call to unregisterReceiver()

Activity com.exampke.MainActivity has leaked IntentReceiver com.jaumard.smsautofill.SmsAutoFillPlugin$SmsBroadcastReceiver@409f50d that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(16479): android.app.IntentReceiverLeaked: Activity com.pocketpills.MainActivity has leaked IntentReceiver com.jaumard.smsautofill.SmsAutoFillPlugin$SmsBroadcastReceiver@409f50d that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(16479): at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:1333)
E/ActivityThread(16479): at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:1114)
E/ActivityThread(16479): at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1405)
E/ActivityThread(16479): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1378)
E/ActivityThread(16479): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1366)
E/ActivityThread(16479): at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:603)
E/ActivityThread(16479): at com.jaumard.smsautofill.SmsAutoFillPlugin$2.onSuccess(SmsAutoFillPlugin.java:102)
E/ActivityThread(16479): at com.jaumard.smsautofill.SmsAutoFillPlugin$2.onSuccess(SmsAutoFillPlugin.java:98)
E/ActivityThread(16479): at com.google.android.gms.tasks.zzn.run(Unknown Source:4)
E/ActivityThread(16479): at android.os.Handler.handleCallback(Handler.java:789)
E/ActivityThread(16479): at android.os.Handler.dispatchMessage(Handler.java:98)
E/ActivityThread(16479): at android.os.Looper.loop(Looper.java:164)
E/ActivityThread(16479): at android.app.ActivityThread.main(ActivityThread.java:6541)
E/ActivityThread(16479): at java.lang.reflect.Method.invoke(Native Method)
E/ActivityThread(16479): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
E/ActivityThread(16479): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
V/FA (16479): Inactivity, disconnecting from the service

setState() or markNeedsBuild() called during build.

This issue arises when I call setState in onChange button.
I'm using this widget inside a stateful widget.
PinFieldAutoFill( codeLength: 4, onCodeChanged: (v) { setState(() {}); print("code change $v"); }, onCodeSubmitted: (v) { print("code submitted $v"); setState(() { otpInput = v; }); }, ),

Another exception was thrown: setState() or markNeedsBuild() called during build.

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown building Container(margin: EdgeInsets(50.0, 0.0, 50.0, 0.0)):
setState() or markNeedsBuild() called during build.

This OtpPage widget cannot be marked as needing to build because the framework is already in the process of building widgets. A widget can be marked as needing to be built during the build phase only if one of its ancestors is currently building. This exception is allowed because the framework builds parent widgets before children, which means a dirty descendant will always be built. Otherwise, the framework might not visit this widget during this build phase.
The widget on which setState() or markNeedsBuild() was called was: OtpPage
state: _OtpPageState#73493
The widget which was currently being built when the offending call was made was: Container
margin: EdgeInsets(50.0, 0.0, 50.0, 0.0)
The relevant error-causing widget was:
Container file:///Users/eapple/git/ponasasa-doctor/lib/ui/auth/otp/otp_page.dart:117:25
When the exception was thrown, this was the stack:
#0 Element.markNeedsBuild. (package:flutter/src/widgets/framework.dart:4211:11)
#1 Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:4226:6)
#2 State.setState (package:flutter/src/widgets/framework.dart:1260:14)
#3 _OtpPageState.build.. (package:ponasasadoctor/ui/auth/otp/otp_page.dart:124:31)
#4 _PinFieldAutoFillState.codeUpdated (package:sms_autofill/sms_autofill.dart:134:29)

Is it not supported below api 21?

Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [:sms_autofill] E:\AndroidStudioProjects\Example\App\build\sms_autofill\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.jaumard.smsautofill" to force usage (may lead to runtime failures)

Showing Code error in Autosms

Hi,

please do cross-check the code, because I have been using SMS autofill for a while but this issue is new to me.
rsz_1rsz_screenshot_from_2020-09-05_15-40-28

The method '[]' was called on null.

Every time I Entered in OTP Screen, Below Exception has thrown.

══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
The following NoSuchMethodError was thrown during paint():
The method '[]' was called on null.
Receiver: null
Tried calling:

The relevant error-causing widget was:
PinFieldAutoFill

FLutter packages get | unsupported versions

This package is not supporting newest version of pin_input_text_field.

Because sms_autofill 1.1.1 depends on pin_input_text_field ^2.1.0 and no versions of sms_autofill match >1.1.1 <2.0.0, sms_autofill ^1.1.1 requires pin_input_text_field ^2.1.0.
So, because mobile_ve depends on both sms_autofill ^1.1.1 and pin_input_text_field ^3.0.1, version solving failed.

  sms_autofill: ^1.1.1
  pin_input_text_field: ^3.0.1

Dialog does not close and when 2nd time tap on dialog then shutting down VM

I want to read my device phone number. When I tap on the icon button to call the _askPhoneHint() method then the dialog box does not close and also not read the phone number. When I tap next time then the app crashed.

here is my error report:

Shutting down VM
E/AndroidRuntime(25390): FATAL EXCEPTION: main
E/AndroidRuntime(25390): Process: com.it_home.chat_demo, PID: 25390
E/AndroidRuntime(25390): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=11012, result=1001, data=Intent { }} to activity {com.it_home.chat_demo/com.it_home.chat_demo.MainActivity}: java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime(25390): at android.app.ActivityThread.deliverResults(ActivityThread.java:4453)
E/AndroidRuntime(25390): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4495)
E/AndroidRuntime(25390): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49)
E/AndroidRuntime(25390): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:113)
E/AndroidRuntime(25390): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:71)
E/AndroidRuntime(25390): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1858)
E/AndroidRuntime(25390): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(25390): at android.os.Looper.loop(Looper.java:201)
E/AndroidRuntime(25390): at android.app.ActivityThread.main(ActivityThread.java:6820)
E/AndroidRuntime(25390): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(25390): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/AndroidRuntime(25390): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:922)
E/AndroidRuntime(25390): Caused by: java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime(25390): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:139)
E/AndroidRuntime(25390): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:235)
E/AndroidRuntime(25390): at com.jaumard.smsautofill.SmsAutoFillPlugin$1.onActivityResult(SmsAutoFillPlugin.java:65)
E/AndroidRuntime(25390): at io.flutter.embedding.engine.FlutterEnginePluginRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEnginePluginRegistry.java:691)
E/AndroidRuntime(25390): at io.flutter.embedding.engine.FlutterEnginePluginRegistry.onActivityResult(FlutterEnginePluginRegistry.java:378)
E/AndroidRuntime(25390): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:619)
E/AndroidRuntime(25390): at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:584)
E/AndroidRuntime(25390): at android.app.Activity.dispatchActivityResult(Activity.java:7590)
E/AndroidRuntime(25390): at android.app.ActivityThread.deliverResults(ActivityThread.java:4446)
E/AndroidRuntime(25390): ... 11 more

[Querry] About AppSignature

Hi I hust have a querry that can i generate AppSignature for one Time and use it as a constant in my app Will it change for device to device or platform wise ? Will it remain constant after I built my App?

Facing issues in using this plugin

Hi,

I am a newbie in flutter and creating an app with OTP feature. I have placed the code in the my file as mentioned in the Readme, given the SMS received permission in Manifest, done many changes, I can still the app is unable to read the OTP.

My code is as follows:

/// Get signature code
_getAppSignature() async {
final signature = await SmsAutoFill().getAppSignature;
print("App Hash Key: $signature");
}

///ListeningSms Code
_startListeningSms() async {
await SmsAutoFill().listenForCode;
print("Listening started");
}

PinFieldAutoFill(
//decoration: UnderlineDecoration(
// textStyle: TextStyle(fontSize: 20, color: Colors.black)),
currentCode: _code,
onCodeSubmitted: (code) {
},
onCodeChanged: (code) {
if (code.length == 6) {
vm.validateOTP(buildContext, code);

. }

Plugin version : sms_autofill: ^1.2.3

I have called the _getAppSignature in init method and _startListeningSms on A button press while sending the phone number to backend. Below is the PinFieldAutoFill which should detect and fill the code. But the SMS not detected. The SMS format is:

<#> 123445 is your OTP to Sign-In to Test App. It's valid for 30 mins. Don't share it with anyone. rfrr54yE3aZ

Can anyone suggest, what I am doing wrong. Any help would be appreciated as I am stuck in this for 2 days now.
Thanks

support for FragmentActivity

I'm extending FlutterFragmentActivity rather than FlutterActivity for MainActivity.
And when an activity starts from fragment(not activity), request code should be in 0 ~ 65535.

So when I request phone number hint, it throws error because of the request code.

While installing the app in latest version giving error

On the latest version sms_autofill: ^1.2.5 I run the code and gives me an error in PinFieldAutoFill for the color builder cannot be null. So I added a line of code
colorBuilder:
PinListenColorBuilder(Colors.cyan, Colors.green),
),
Which works perfectly please implement this.

cant change default code length

Incoming code length is always 6, tho i send longer code. I've tried to change code length from code, but nothing happens.

Build error when add sms auto fill

Here is the error log I think the error is clear and doesn't need any further explanation

/home/danial/Android/flutter/.pub-cache/hosted/pub.dartlang.org/sms_autofill-1.0.0/android/src/main/java/com/jaumard/smsautofill/SmsAutoFillPlugin.java:13: error: cannot find symbol
import androidx.annotation.NonNull;
                          ^
  symbol:   class NonNull
  location: package androidx.annotation
/home/danial/Android/flutter/.pub-cache/hosted/pub.dartlang.org/sms_autofill-1.0.0/android/src/main/java/com/jaumard/smsautofill/SmsAutoFillPlugin.java:105: error: cannot find symbol
                    public void onFailure(@NonNull Exception e) {
                                           ^
  symbol: class NonNull
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sms_autofill:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 32s
Finished with error: Gradle task assembleDebug failed with exit code 1
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.
*******************************************************************************************

please update to support androidx

If I migrate android (flutter) proj to AndroidX and try to run in release mode on android device build fails - Execution failed for task ':sms_autofill:verifyReleaseResources'.

Doesnt retrieve FirebaseAuth Otps

Hi,

I'm using Firebase for authentication and it doesnt push notifications in the exact way you mentioned in the requirements.
Is there a workaround to picking up the code automatically?

sms code not been correctly picked up

Takin from the example at https://pub.dev/packages/sms_autofill/example if I use it as it is with a MaterialApp, it works

... @override Widget build(BuildContext context) { return MaterialApp( theme: ThemeData.light(), home: Scaffold( ...

but if I return any other that that, like the inner scaffold it does not pick the code and its calls the code change function 3 times

... @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( ...

any reason for it, or is in fact a bug?

How to fill selected phone number in my textfield using requestPhoneHint.

Explain how to fill selected phone number in my textfield using requestPhoneHint hint method.

void initState(){
focusNode.addListener(() async {
if (focusNode.hasFocus && !_hintShown) {
_hintShown = true;
final completePhoneNumber = await _autoFill.hint;
print("Autofill");
print(completePhoneNumber);
}
});
super.initState();

}

TextField(
autofocus: false,
focusNode: focusNode,
decoration: InputDecoration(
suffixIcon: Platform.isAndroid
? IconButton(
icon: Icon(Icons.phonelink_setup),
onPressed: () async {
final completePhoneNumber = await _autoFill.hint;
//print("Autofill2");
//print(completePhoneNumber);
},
)
: null,
),
controller: controller,
keyboardType: TextInputType.phone,
onChanged: (val){
print(val);
},
),

IoS support

Hello
Does this support IoS devices also?
If no how it works for Ios actually

Thanks beforehand

How to resize UnderlineDecoration?

My code like this:

PinFieldAutoFill(
            keyboardType: TextInputType.phone,
            autofocus: true,
            codeLength: 4,
//            currentCode: _code,
            decoration: UnderlineDecoration(
              color: color_text_grey,
              textStyle: TextStyle(
                fontSize: MediaQuery.of(context).size.width / 10,
                color: color_text_black,
                fontWeight: FontWeight.bold,
              ),
            ),
          ),

And the result like this:

Screen Shot 2019-08-13 at 14 26 44

How to resize property "UnderlineDecoration" ?

support androidx

Since last topic was closed Ill open a new one -

Unfortunately issue is not fixed. My CI still fails because of sms_autofill.
Did you try increasing project compileSdkVersion to 28?

* What went wrong:
Execution failed for task ':sms_autofill:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  Output:  /Users/vagrant/git/build/sms_autofill/intermediates/res/merged/release/values/values.xml:197: error: resource android:attr/fontVariationSettings not found.
  /Users/vagrant/git/build/sms_autofill/intermediates/res/merged/release/values/values.xml:198: error: resource android:attr/ttcIndex not found.
  error: failed linking references.
  Command: /Users/vagrant/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/e3f1f324de2b8ea5e50a4a207f40f4e0/aapt2-3.2.1-4818971-osx/aapt2 link -I\
          /Users/vagrant/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-27/android.jar\
          --manifest\
          /Users/vagrant/git/build/sms_autofill/intermediates/aapt_friendly_merged_manifests/release/processReleaseManifest/aapt/AndroidManifest.xml\
          -o\
          /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/aapt-3803257974810333648-out\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_common_google_signin_btn_text_dark_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_action_tombstone.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ur_values-ur.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_notification_icon_background.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-pa_values-pa.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-pt-rBR_values-pt-rBR.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-as_values-as.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xxhdpi-v4_googleg_disabled_color_18.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-fi_values-fi.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_icon_dark.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-uk_values-uk.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_template_big_media_narrow_custom.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_template_part_time.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ka_values-ka.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-iw_values-iw.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_notify_panel_notification_icon_bg.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-bs_values-bs.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_googleg_standard_color_18.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-mk_values-mk.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_notification_bg_low.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-in_values-in.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-zu_values-zu.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-mr_values-mr.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_notification_bg_low_normal.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-hr_values-hr.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-en-rAU_values-en-rAU.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-sk_values-sk.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_text_light.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_action.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-v21_notification_action_background.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-th_values-th.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-sr_values-sr.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-km_values-km.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-af_values-af.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-pt_values-pt.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_googleg_standard_color_18.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-es-rUS_values-es-rUS.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-fr-rCA_values-fr-rCA.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-gl_values-gl.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-watch-v20_values-watch-v20.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-watch-v20_common_google_signin_btn_text_disabled.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout-v21_notification_action_tombstone.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-gu_values-gu.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-kk_values-kk.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_common_google_signin_btn_icon_dark_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_template_media_custom.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-zh-rHK_values-zh-rHK.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_googleg_disabled_color_18.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-te_values-te.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_template_big_media_narrow.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_template_media.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ml_values-ml.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ky_values-ky.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ar_values-ar.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xxhdpi-v4_common_google_signin_btn_icon_light_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_notify_panel_notification_icon_bg.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_icon_disabled.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_template_lines_media.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-en-rIN_values-en-rIN.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-da_values-da.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_icon_dark_focused.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_common_google_signin_btn_text_light_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/color_common_google_signin_btn_text_dark.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_media_cancel_action.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-am_values-am.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ms_values-ms.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-zh-rTW_values-zh-rTW.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xxhdpi-v4_googleg_standard_color_18.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-en-rGB_values-en-rGB.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_media_action.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-hy_values-hy.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-zh-rCN_values-zh-rCN.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-nl_values-nl.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_template_part_chronometer.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ro_values-ro.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout-v21_notification_template_icon_group.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-my_values-my.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-lv_values-lv.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-pl_values-pl.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xxhdpi-v4_common_google_signin_btn_icon_dark_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-lo_values-lo.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_template_big_media.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_common_google_signin_btn_text_dark_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values_values.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-bg_values-bg.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-watch-v20_common_google_signin_btn_text_light_normal.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_icon_light_normal.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xxhdpi-v4_common_google_signin_btn_text_light_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-sl_values-sl.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-v21_values-v21.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-en-rCA_values-en-rCA.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-hu_values-hu.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_googleg_disabled_color_18.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_common_google_signin_btn_icon_light_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_googleg_standard_color_18.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_text_light_focused.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-vi_values-vi.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-en-rXC_values-en-rXC.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ru_values-ru.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout-v21_notification_template_custom_big.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_notification_bg_normal.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_text_disabled.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_common_full_open_on_phone.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-pt-rPT_values-pt-rPT.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-fr_values-fr.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-v24_values-v24.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_common_google_signin_btn_icon_light_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-et_values-et.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-bn_values-bn.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ca_values-ca.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_notification_bg_low_pressed.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-is_values-is.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_notification_bg_normal_pressed.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-sv_values-sv.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-tl_values-tl.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_icon_dark_normal.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_common_google_signin_btn_text_light_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_template_icon_group.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-fa_values-fa.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-uz_values-uz.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/color_common_google_signin_btn_text_light.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-watch-v20_common_google_signin_btn_text_dark_normal.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_text_dark_normal.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ko_values-ko.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_notify_panel_notification_icon_bg.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_common_full_open_on_phone.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-hi_values-hi.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_common_google_signin_btn_icon_dark_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_notification_bg_normal_pressed.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-b+sr+Latn_values-b+sr+Latn.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/color_common_google_signin_btn_tint.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_notification_bg_normal.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-si_values-si.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ne_values-ne.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xxhdpi-v4_common_google_signin_btn_text_dark_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_common_google_signin_btn_icon_light_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-it_values-it.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-de_values-de.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout-v21_notification_action.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ta_values-ta.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-es_values-es.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout_notification_template_big_media_custom.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_notification_bg.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_googleg_disabled_color_18.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-el_values-el.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_text_dark_focused.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_notification_bg_low_pressed.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_common_google_signin_btn_icon_dark_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-mn_values-mn.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/layout-v16_notification_template_custom_big.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-eu_values-eu.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_notification_tile_bg.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-cs_values-cs.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-nb_values-nb.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_notification_bg_low_normal.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-az_values-az.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-v16_values-v16.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_text_light_normal.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-be_values-be.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_text_dark.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_common_google_signin_btn_text_dark_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-sw_values-sw.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_icon_light_focused.xml.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_notification_bg_normal.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_common_google_signin_btn_text_light_normal_background.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-tr_values-tr.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-mdpi-v4_notification_bg_low_pressed.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-or_values-or.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-sq_values-sq.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-kn_values-kn.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-lt_values-lt.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-hdpi-v4_notification_bg_low_normal.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/values-ja_values-ja.arsc.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable-xhdpi-v4_notification_bg_normal_pressed.9.png.flat\
          -R\
          /Users/vagrant/git/build/sms_autofill/intermediates/res/compiled/release/drawable_common_google_signin_btn_icon_light.xml.flat\
          --auto-add-overlay\
          --non-final-ids\
          -0\
          apk\
          --no-version-vectors
  Daemon:  AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 7s
Running Gradle task 'assembleRelease'...                          129.3s (!)
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.
*******************************************************************************************
Gradle task assembleRelease failed with exit code 1
Failed to build Android platform, error: exit status 1
|                                                                              |
+---+---------------------------------------------------------------+----------+
| x | [email protected] (exit code: 1)                            | 363 sec  |
+---+---------------------------------------------------------------+----------+
| Issue tracker: ...thub.com/bitrise-steplib/bitrise-step-flutter-build/issues |
| Source: https://github.com/bitrise-steplib/bitrise-step-flutter-build        |
+---+---------------------------------------------------------------+----------+

Unable to change textborder for PinFieldAutoFill when global theme for textfield defined

Hi,

I am using the PinFieldAutoFill widget for OTP functionality. But, because of the global theme, I defined it is effecting this Widget too.

Decoration Defined for InputDecoration

InputDecorationTheme inputDecorationTheme() {
  OutlineInputBorder outlineInputBorder = OutlineInputBorder(
    borderRadius: BorderRadius.circular(28),
    borderSide: BorderSide(color: bsTextColor),
    gapPadding: 10,
 );
 return InputDecorationTheme(
    contentPadding: const EdgeInsets.symmetric(
       horizontal: 42,
       vertical: 20,
    ),
    enabledBorder: outlineInputBorder,
    focusedBorder: outlineInputBorder,
    border: outlineInputBorder,
 );
}

Inside the MaterialApp I've defined it as following

theme: ThemeData(
    inputDecorationTheme: inputDecorationTheme(),
)

But this is effecting the PinFieldAutoFill widget with BoxLooseDecoration and causes something like below

image

See those grey lines above and below after each text box.. How can override the parent theme for this widget?

java.lang.IllegalStateException: Reply already submitted

If I run these lines of code then doing a navigation to another screen and go back again, I get some android related errors.

Code snippet:

final _autoFill = SmsAutoFill();
final completePhoneNumber = await _autoFill.hint;

This issue seems be similar to this issue described here: flutter/flutter#29092 "java.lang.IllegalStateException: Reply already submitted" However I am not sure whats going on there.

Errors I receive:

D/AndroidRuntime(32542): Shutting down VM
E/AndroidRuntime(32542): FATAL EXCEPTION: main
E/AndroidRuntime(32542): Process: app.xxx, PID: 32542
E/AndroidRuntime(32542): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=11012, result=0, data=Intent {  }} to activity {app.xxx/app.xxx.MainActivity}: java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime(32542): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:5097)
E/AndroidRuntime(32542): 	at android.app.ActivityThread.handleSendResult(ActivityThread.java:5138)
E/AndroidRuntime(32542): 	at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
E/AndroidRuntime(32542): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(32542): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(32542): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2147)
E/AndroidRuntime(32542): 	at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(32542): 	at android.os.Looper.loop(Looper.java:237)
E/AndroidRuntime(32542): 	at android.app.ActivityThread.main(ActivityThread.java:7811)
E/AndroidRuntime(32542): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(32542): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(32542): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1076)
E/AndroidRuntime(32542): Caused by: java.lang.IllegalStateException: Reply already submitted
E/AndroidRuntime(32542): 	at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:139)
E/AndroidRuntime(32542): 	at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.success(MethodChannel.java:231)
E/AndroidRuntime(32542): 	at com.jaumard.smsautofill.SmsAutoFillPlugin$1.onActivityResult(SmsAutoFillPlugin.java:68)
E/AndroidRuntime(32542): 	at io.flutter.app.FlutterPluginRegistry.onActivityResult(FlutterPluginRegistry.java:204)
E/AndroidRuntime(32542): 	at io.flutter.app.FlutterActivityDelegate.onActivityResult(FlutterActivityDelegate.java:127)
E/AndroidRuntime(32542): 	at io.flutter.app.FlutterActivity.onActivityResult(FlutterActivity.java:139)
E/AndroidRuntime(32542): 	at android.app.Activity.dispatchActivityResult(Activity.java:8292)
E/AndroidRuntime(32542): 	at android.app.ActivityThread.deliverResults(ActivityThread.java:5090)
E/AndroidRuntime(32542): 	... 11 more
I/Process (32542): Sending signal. PID: 32542 SIG: 9

ProgressDialog does not close

I am developing a flutter app in which I am using sms_autofill package that has an event named onCodeChanged. I am doing an http async method to fetch data from an api. Before initiating the http fetch, I justed progressDialog.show(). It shows the dialog when clicked but after the data is successfully fetched, I want to close the progressDialog but it does not close; it continues showing a message 'Verying...'.

If I do perform the same task using RaisedButton onPressed event, it works fine.

here is the code:

`import 'dart:async';
import 'dart:convert';
import 'package:beatplan/model/timer_button.dart';
import 'package:beatplan/ui/bottombar/viewpages.dart';
import 'package:beatplan/ui/pages/homepage.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:sms_autofill/sms_autofill.dart';
import 'package:flushbar/flushbar.dart';
import 'package:http/http.dart';
import 'package:progress_dialog/progress_dialog.dart';

ProgressDialog progressDialog;

class ValidateOTP extends StatefulWidget {

final String mobile;

ValidateOTP({Key key, @required this.mobile}) : super(key: key);
@OverRide
_ValidateOTPState createState() => _ValidateOTPState();
}
class _ValidateOTPState extends State {
signIn() async {
Fluttertoast.showToast(
msg: "otp",
backgroundColor: Colors.black,
textColor: Colors.white,
gravity: ToastGravity.BOTTOM,
toastLength: Toast.LENGTH_SHORT,
);
}
bool Hide = true;
var otpno = '';
//FocusNode myFocusNode = new FocusNode();
Future validateOTP() async {
String check = 'my api url';
Response response = await get(check);
if (response.statusCode == 200){
Map<String, dynamic> resp = jsonDecode(response.body);
if (resp['HasError'] == true) {
progressDialog.hide().whenComplete((){
Flushbar(
message: resp['Message'],
duration: Duration(seconds: 5),
)..show(context);
});
}else{
progressDialog.hide().whenComplete((){
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ViewPages()));
});
}
}
else{
print(response.statusCode);
progressDialog.hide().whenComplete((){});
}
}
@OverRide
void initState() {
super.initState();
SmsAutoFill().listenForCode;
}
final _formKey = GlobalKey();
var percentage =0.0;

@OverRide
Widget build(BuildContext context) {
progressDialog = ProgressDialog(context, type: ProgressDialogType.Normal, isDismissible: true);
progressDialog.style(message: 'Verifying...', messageTextStyle: TextStyle(fontSize: 16), progressWidget: CircularProgressIndicator());
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown
]);
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // status bar colo
));

return Scaffold(
  body: SingleChildScrollView(
    child: Column(
      children: <Widget>[
        Container(
          width: MediaQuery.of(context).size.width,
          height:330,
          decoration: BoxDecoration(
              color: Colors.deepPurple,
              borderRadius: BorderRadius.only(
                bottomLeft: Radius.circular(60),
              )
          ),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              Material(
                elevation: 10.0,
                borderRadius: BorderRadius.all(Radius.circular(100)),
                child: (Image.asset('assets/images/icons/otp.png',width: 95,)
                ),
              ),
              Padding(
                padding: EdgeInsets.symmetric(vertical: 10.0),
                child:Text(
                  'Verification',
                  style: TextStyle(
                      fontSize: 25,
                      fontWeight: FontWeight.w500,
                      color: Colors.white.withOpacity(0.9)),
                ),
              ),
              RichText(
                text: TextSpan(
                    style: TextStyle(
                      fontSize: 15,
                      color: Colors.white.withOpacity(0.5),
                    ),
                    children: [
                      TextSpan(text: 'Enter the OTP sent to '),
                      TextSpan(
                        text: widget.mobile,
                        style: TextStyle(
                            fontWeight: FontWeight.w500,
                            color: Colors.white),
                      ),
                    ]),
              ),
            ],
          ),
        ),
        Column(
          children: <Widget>[
        Padding(
          padding: EdgeInsets.only(top:90.0,left: 15.0,right: 15.0),
           child: PinFieldAutoFill(
            codeLength: 6,
            decoration: BoxLooseDecoration(
              solidColor: Colors.grey.withOpacity(0.1),
              strokeColor: Colors.grey.withOpacity(0.3),
            ),
            onCodeSubmitted: (value){
              progressDialog.hide().then((v){
                progressDialog.hide();
              });
            },
            onCodeChanged: (codec){
              if(codec!=null)
                {
                  otpno = codec;
                  if(codec.length==6) {
                    progressDialog.show();
                    validateOTP();
                  }

                }
              },
          ),
          ),
            SizedBox(
              height: 30,
            ),
            Visibility(
              visible: Hide,
              child: Row(
                mainAxisAlignment: MainAxisAlignment.center,
                children: <Widget>[
                  Text('Didn\'t receive OTP?'),
                  TimerButton(
                    label: 'Resend',
                    timeOutInSeconds: 30,
                    onPressed: (){
                      signIn();
                      setState(() {
                        Hide = false;
                      });
                    },
                  ),
                ],
              ),
            ),
          ],
        ),
      ],
    ),
  ),
);

}
}`

CodeAutoFill mixin issue while listening for code

There is a issue in the CodeAutoFill mixin. The docs says:

listenForCode() to listen for the SMS code from the native plugin when SMS is received, need to be called on your initState.

but after some tests it seems that this is not enough. If you just do this code will not get detected. In order to start listening for the OTP you need to call both in the initState:

  @override
  void initState() {
    super.initState();
   
    listenForCode();
    SmsAutoFill().listenForCode;
  }

If you do not call SmsAutoFill().listenForCode; after listenForCode() you will never receive the OTP code in the Flutter app.

missing a call to unregisterReceiver()

Activity com.exampke.MainActivity has leaked IntentReceiver com.jaumard.smsautofill.SmsAutoFillPlugin$SmsBroadcastReceiver@409f50d that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(16479): android.app.IntentReceiverLeaked: Activity com.pocketpills.MainActivity has leaked IntentReceiver com.jaumard.smsautofill.SmsAutoFillPlugin$SmsBroadcastReceiver@409f50d that was originally registered here. Are you missing a call to unregisterReceiver()?
E/ActivityThread(16479): at android.app.LoadedApk$ReceiverDispatcher.(LoadedApk.java:1333)
E/ActivityThread(16479): at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:1114)
E/ActivityThread(16479): at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1405)
E/ActivityThread(16479): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1378)
E/ActivityThread(16479): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1366)
E/ActivityThread(16479): at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:603)
E/ActivityThread(16479): at com.jaumard.smsautofill.SmsAutoFillPlugin$2.onSuccess(SmsAutoFillPlugin.java:102)
E/ActivityThread(16479): at com.jaumard.smsautofill.SmsAutoFillPlugin$2.onSuccess(SmsAutoFillPlugin.java:98)
E/ActivityThread(16479): at com.google.android.gms.tasks.zzn.run(Unknown Source:4)
E/ActivityThread(16479): at android.os.Handler.handleCallback(Handler.java:789)
E/ActivityThread(16479): at android.os.Handler.dispatchMessage(Handler.java:98)
E/ActivityThread(16479): at android.os.Looper.loop(Looper.java:164)
E/ActivityThread(16479): at android.app.ActivityThread.main(ActivityThread.java:6541)
E/ActivityThread(16479): at java.lang.reflect.Method.invoke(Native Method)
E/ActivityThread(16479): at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
E/ActivityThread(16479): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
V/FA (16479): Inactivity, disconnecting from the service

Unable to change decoration in PinFieldAutoFill

please just add next line to lib/sms_autofill.dart

export 'package:pin_input_text_field/pin_input_text_field.dart'

or just export some class like

export 'package:pin_input_text_field/pin_input_text_field.dart' show BoxLooseDecoration, BoxTightDecoration

otherwise it's no way to access custom decorations when only import sms_autofill

deprecation API warning

i am having latest version in pubspec.yaml
Screenshot 2020-07-30 at 9 10 17 PM

and i am getting this warning some times
Screenshot 2020-07-30 at 9 09 21 PM

how can i change the code to avoid such errors.

getAppSignature returning null

So await SmsAutoFill().getAppSignature was working until I changed the package name / bundle id, and is now returning null. I tried to look into the code for the plugin, but was having a hard time finding the issue. The only notable change with the package name that I can think of is the fact that the package name / bundle id is com.something rather than com.something.somethingelse. Is this still an acceptable format for this feature?

Getting Exit code 65 while installing package

hi,
I am getting exit code 65 while installing on fresh app plz help I have tried much time on fresh apps but not installed this package

`[sms_autofill] flutter packages get
Running "flutter pub get" in sms_autofill...
Error on line 22, column 3 of pubspec.yaml: A package may not list itself as a dependency.

22 │ sms_autofill: ^1.1.1
│ ^^^^^^^^^^^^


pub get failed (65; ╵)
exit code 65`

Here is below flutter doctor
`D:\Flutter\Tutorials\sms_autofill>flutter doctor -v
[√] Flutter (Channel master, v1.14.2-pre.51, on Microsoft Windows [Version 10.0.18363.592], locale en-IN)
• Flutter version 1.14.2-pre.51 at D:_FlutterSDK
• Framework revision ec1044a877 (26 hours ago), 2020-01-17 19:19:33 -0800
• Engine revision ecc74c966d
• Dart version 2.8.0 (build 2.8.0-dev.3.0 f96c48307d)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at D:_AndroidSDK
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = D:_AndroidSDK
• ANDROID_SDK_ROOT = D:_AndroidSDK
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
• All Android licenses accepted.

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.4.3)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.4.29709.97

[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.41.1)
• VS Code at C:\Users\MithiMili\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.7.1

[√] Connected device (2 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• Windows • Windows • windows-x64 • Microsoft Windows [Version 10.0.18363.592]

• No issues found!`

AndroidX versions broken

This is a great plugin and 0.0.1 (before move to AndroidX) works perfectly. I've tried all the versions post the AndroidX migration (1.0.0. 1.0.1, 1.1.1), and none of them work. The Phone Hint feature crashes the app and the SMS retrieval doesn't happen. I'm willing to help fix this. Any pointers, @jaumard?

Cannot manually enter the text(pin)

hey,

In the worst case if I won't receive SMS i have enabled call option in which it should enable inputting the value.
here I am not able to edit or input the value even though setting the controller: TextController()

Flutter app for iOS and Android

Hi @jaumard.

We send to our application a SMS as an OTP.
With sms_autofill all goes well with Android.
But on iOS the autofill doesn't work.
I added Push Notification capabilities to the app.
What I miss?
Thank for the help!

If you set custom TextField the function hint dissappear

Hi @jaumard this is a very good plugin ! i found an issue,
If you using PhoneFieldHint and assign child TextField customized, the functionality of Hint dissappear, check this code

builder: (_, snapshot) => PhoneFieldHint( autofocus: true, child: TextField( decoration: InputDecoration( hintText: 'Tu Número', errorText: snapshot.error, errorStyle: SignUpConfiguration.getErrorFormStyle(context), ), onChanged: bloc.onPhoneNumberChanged, keyboardType: TextInputType.phone, autocorrect: false, style: TextStyle( fontFamily: 'Roboto', fontSize: Utils.getFontSize(context, 20.0), ), ), )

E/MethodChannel#sms_autofill(17327): Failed to handle method call

E/MethodChannel#sms_autofill(17327): Failed to handle method call
E/MethodChannel#sms_autofill(17327): java.lang.IllegalArgumentException: Receiver not registered: com.jaumard.smsautofill.SmsAutoFillPlugin$SmsBroadcastReceiver@2709f01
E/MethodChannel#sms_autofill(17327): at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:1297)
E/MethodChannel#sms_autofill(17327): at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1522)
E/MethodChannel#sms_autofill(17327): at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:659)
E/MethodChannel#sms_autofill(17327): at com.jaumard.smsautofill.SmsAutoFillPlugin.onMethodCall(SmsAutoFillPlugin.java:119)
E/MethodChannel#sms_autofill(17327): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:222)
E/MethodChannel#sms_autofill(17327): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:96)
E/MethodChannel#sms_autofill(17327): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:656)
E/MethodChannel#sms_autofill(17327): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#sms_autofill(17327): at android.os.MessageQueue.next(MessageQueue.java:326)
E/MethodChannel#sms_autofill(17327): at android.os.Looper.loop(Looper.java:160)
E/MethodChannel#sms_autofill(17327): at android.app.ActivityThread.main(ActivityThread.java:6863)
E/MethodChannel#sms_autofill(17327): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#sms_autofill(17327): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
E/MethodChannel#sms_autofill(17327): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
I/flutter (17327): ResendOTPButtonWidget :: disposed

Sms Not automatically reading in live version

I have used this package in order to verify my user on login. and when i added it to the play store without recieve sms permission the app doesn't automatically filling the pin fields

While typing manually, text field resets

version: 1.2.0

While I am typing the OTP (manually), after started listening to code, the text field resets before I finish typing thr OTP.

The behaviour I am trying to implement: If SMS received, autofill & submit. If not received in the this phone, type it manually. Now when typing manually, the code resets in the textfield.

How can I set this functionality? May be while typing, not reseting the text field to empty.

3 errors I got when I tried installing sms_autofill

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'connectivity'.

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 31s

====================================================================

I have solved it using

$ export ANDROID_SDK_ROOT="/home/{user-name}/Android/Sdk"

$ export ANDROID_HOME=$ANDROID_SDK_ROOT

====================================================================

But I am getting two more error now.

FAILURE: Build failed with an exception.

  • Where:
    Build file '/home/suresh-kumara/projects/mobile-applications/flutter-sdk/1.2.1/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+3/android/build.gradle' line: 22

  • What went wrong:
    A problem occurred evaluating root project 'shared_preferences_macos'.

Failed to apply plugin [id 'com.android.library']
Minimum supported Gradle version is 5.4.1. Current version is 4.10.2. If using the gradle wrapper, try editing the distributionUrl in /home/suresh-kumara/projects/mobile-applications/flutter-sdk/1.2.1/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_macos-0.0.1+3/android/gradle/wrapper/gradle-wrapper.properties to gradle-5.4.1-all.zip

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s

The plugin shared_preferences_macos could not be built due to the issue above.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:preDebugBuild'.

Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.1.0) classpath. You should manually set the same version via DependencyResolution

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 32s

Not sure how to solve it.

The plugin connectivity could not be built due to the issue above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.