gsssrao / UnityAndroidSpeechRecognition

This repository is a Unity plugin for Android Speech Recognition (based on Java implementation)
GNU General Public License v3.0
87 stars 29 forks source link

Combining multiple plug-ins #4

Closed houda96 closed 6 years ago

houda96 commented 6 years ago

Hi,

We are trying to integrate your code with Google Tango, which means there are two plugins. Combining the two manifest files has failed and the mentioned resources did also not work. Do you happen to already fixed this issue or do you have some markers on it?

gsssrao commented 6 years ago

Hi @houda96,

Yes, if you have two different plugins both extending unity player activity and two manifests then you will face issues.

Do you have android development experience using Android Studio? If yes, then a simple way to solve this issue is to include the speech recognition code into the tango plugin and re-creating the jar. Basically, your tango plugin too would have a jar or aar file in the plugins folder in which there would be a java class which extends UnityPlayerActivity. So instead of having this file you just need to append parts of it into tango java class which extends UnityPlayerActivity. And then you can have a separate class file to call it like this one.

Once you do this, you just need to the recreate the jar file and replace it with the original tango jar file in Unity (To understand how the jar creation and inclusion in Unity work, you can probably start from here ).

Note: If you change names of the java files or their functions, you will have to modify the code in the csharp files in Unity as well to match those names.

houda96 commented 6 years ago

Hi,

Thank you for the answer. Sadly, we do not have experience with android development. Since, we are using this as part of a four week course, we do not have time to explore this more in depth. We found a work around to process this in Python. We will definitely keep this in mind, when we would upgrade the app when more time is available. It may be of use for others.

gsssrao commented 6 years ago

Sure.