jaumard / sms_autofill

Flutter plugin to provide SMS code autofill support
MIT License
282 stars 174 forks source link

not working all method in release mode #103

Open kamyar75 opened 3 years ago

kamyar75 commented 3 years ago

not working all method in release mode

04-01 00:43:39.333 14898-14939/? E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: MissingPluginException(No implementation found for method listenForCode on channel sms_autofill)

0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156)

<asynchronous suspension>
#1      SmsAutoFill.listenForCode (package:sms_autofill/sms_autofill.dart:34)
<asynchronous suspension>
kamyar75 commented 3 years ago

how to solve this problem ???

kevin997 commented 3 years ago

buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so flutter run --release works. signingConfig signingConfigs.debug

        minifyEnabled false
        shrinkResources false
    }
}

Try this in release mode
jaumard commented 3 years ago

Never got any issues in release mode... No sure what append, did you try to do a fresh clean of your project ?

rajeshpatil95 commented 3 years ago

yes same here, Functionality not working in release mode but works in debug mode "flutter build apk --release --flavor dev -t lib/main/main_dev.dart" try generating release build and test it...auto fill doesn't work

sms_autofill: ^2.0.0

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.0.4, on Linux, locale en_IN) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✓] Chrome - develop for the web [✓] Android Studio (version 4.0) [✓] VS Code (version 1.54.3) [✓] Connected device (2 available)

• No issues found!

prabuddaFernando commented 2 years ago

I have same problem. await SmsAutoFill().hint does not work at all

omkarpatil1024 commented 4 months ago

the reason for it is app signature id is different for debug and release application. to find the app signature id for release app please run following command .Please find the solution for generating app signature Id flutter run --release --dart-define=SMS_AUTOFILL_APP_SIGNATURE=<path/to/app-release.apk> for release application