How can I communicate between a Unity application and a regular Android application?
Asked Answered
S

2

2

I'm an Android developer who is working with a Unity developer. Our goal is to create somehow a "bridge" communication to send messages between my Android background Service/thread to the Unity exported game (both running on the same device...)

For now, the only solution we've found to implement such communication is by directly by opening TCP Sockets between the two apps based on the localhost.

I know also that it's supposed to be possible to somehow create native C functions in Unity which can be reachable from my Android app, but I haven't found any good explanation of how to do that.

Is there a way to develop the Unity game to somehow expose the Android API? Is there any other way, besides the solution I've mentioned, to create this kind of communication?

Scummy answered 16/4, 2012 at 5:40 Comment(0)
L
1

Check Unity Building plugins for Android

Lenoir answered 24/5, 2012 at 14:50 Comment(0)
B
2

you can check my tutorial for your problem, might help you ! ;)

http://jeanmeyblum.weebly.com/1/post/2014/02/communication-between-an-android-app-and-unity.html

Biedermeier answered 18/2, 2014 at 2:15 Comment(1)
thanks, actually that what I eventually did at that time I asked the question. sending broadcasts that UnityActivity receives...Scummy
L
1

Check Unity Building plugins for Android

Lenoir answered 24/5, 2012 at 14:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.