Send text strings from Android application/plugin to Unity application

258 Views Asked by At

I need to add non-Google offline voice control capability to a Unity3D project. I have started with snips.ai and successfully built an Android app following their tutorial and modified it to output the understood intent from snips to a text box on screen. What I really need is to get this text string to send to my Unity application.

I think I should be building a native Android Java plugin for Unity which will start at runtime and listen for voice commands. Every time it gets a listen event I need it to send a string of the captured intent to the Unity project which is always waiting for these strings.

I know I can use something like this https://gist.github.com/markcastle/a1530efd5278607862fec09df89e59db to make a static call to a native plugin, but I want to basically have Unity listening constantly to the plugin for strings which it can interpret.

Any help, as always, is much appreciated!

0

There are 0 best solutions below