speech-and-text-unity-ios-android
speech-and-text-unity-ios-android copied to clipboard
IsShowPopup bool = false crashe error
Hi !
On Unity2020.1.17f1, the Speechtotext functionality of the package work as intended , except for the ability to desactivate the popup display on android:
As soon as the flag is passed to false, the android build crash when calling the method Start Recording & stop recording: it seems to be provoked by the inability to cast the currentActivity to a UnityMainActivity type( the current activity seems to be the Bridge one ) .
Am I missing something in order to make this functionality work properly, or has the unity android activity evolved in some way that would create an incompatibility between the most recent version of unity & this very useful piece of code ?
Thank you for your attention , i'm looking forward to you answer !
Im using Unity 2021.1 and all works fine. Try to find problem on your side
Hi, I am getting this same error. Unity 2020.3.11f1
AndroidJavaException: java.lang.ClassCastException: com.unity3d.player.UnityPlayerActivity cannot be cast to com.starseed.speechtotext.MainActivity java.lang.ClassCastException: com.unity3d.player.UnityPlayerActivity cannot be cast to com.starseed.speechtotext.MainActivity at com.starseed.speechtotext.Bridge.StopRecording(Bridge.java:36)
hey, any solution?
@rama142694, some are able to overcome this exception by adding the following to their AndroidManifest.xml:
<queries> <package android:name="com.google.android.googlequicksearchbox"/> </queries>
See this link for details.
@carlohortega hi, i add that line to AndroidManifest.xml, but it still doesnot work with out ticking popup display on android
still doesn't work without ticking popup display on android,any solution?
Hello! Any solution?
Please check https://github.com/j1mmyto9/speech-and-text-unity-ios-android/issues/58#issuecomment-1657227651 for temporary fix