Closed the-accidental-engineer closed 2 years ago
@Prateek0Srivastav I will take a look.
Could you provide steps with your script. What command is not working?
As of now only play and pause command work and all other command may cause app crash with above mentioned error get a clone of my repo and run flutter run --release and try play music. hey alan also not waking up the assistant
@Prateek0Srivastav Is it the same issue with debug build?
@snyuryev no this happen in the release only.
@Prateek0Srivastav
Please try to add additional params for release build type
shrinkResources false
minifyEnabled false
to your build.gradle file. It should be located
[your_app_folder]/android/app/build.gradle
As result you should have something similar to:
buildTypes {
release {
signingConfig signingConfigs.debug
shrinkResources false
minifyEnabled false
}
}
After that please try to run
@Prateek0Srivastav
Also updated version on plugin (3.3.0) is available. Please try this one.
Fixed with previous release. Please create a new issue if you need any additional help.
Error
E/AndroidRuntime(15726): FATAL EXCEPTION: main E/AndroidRuntime(15726): Process: com.example.ai_radio, PID: 15726 E/AndroidRuntime(15726): java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to com.alan.alansdk.events.EventParsed$ParsedEntity E/AndroidRuntime(15726): at com.alan.alansdk.button.AlanStateListener.onParsedEvent(:1) E/AndroidRuntime(15726): at com.alan.alansdk.d.run(:6) E/AndroidRuntime(15726): at android.os.Handler.handleCallback(Handler.java:790) E/AndroidRuntime(15726): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(15726): at android.os.Looper.loop(Looper.java:192) E/AndroidRuntime(15726): at android.app.ActivityThread.main(ActivityThread.java:6711) E/AndroidRuntime(15726): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(15726): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:549) E/AndroidRuntime(15726): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:826)
script AI_Radio_First_version_20211207_105241UTC.zip
repo link - https://github.com/Prateek0Srivastav/Radio-App if needed
code -
setUpAlan() { AlanVoice.addButton( "key/prod", buttonAlign: AlanVoice.BUTTON_ALIGN_RIGHT); AlanVoice.onCommand.add((command) { debugPrint("got new command ${command.toString()}"); _handleCommand(command.data); }); }
_handleCommand(Map<String, dynamic> response) { switch (response["command"]) { case "play": _playMusic(_selectedRadio!.url); break;
}