Connect android app to windows application

Hi everyone

I’m part of a virtual tour project and I’m building an OF windows application which shows some images to the user and allows him to navigate to the next/previous images.

What I want to do is to move the navigation part to an android device.
So for example the user can touch the next/previous buttons on his android and the images will change on the windows application display.

Could anyone guide me in the right direction please?

OSC might be a good option providing your devices have a shared network. Give the examples oscReceiveExample and oscSenderExample a look.

either OSC or websockets would be your best friend for this. you can do it with a web app and ofxHTTP and just run the web app in a full screen Android WebView

Thanks a lot guys.

I should’ve mentioned that the android device is also part of the system and directly connected to the PC that is running the app, so I think networking is not necessary since the connection between the android and the PC is not an issue.

The issue would only be how to make two separate windows in openframeworks, one on the PC and one on the Android, and make them communicate with each other.

An oF application running on Android and an oF application running on Windows, connected via OSC/WebSocket/Something-Custom-You-Write-Because-You-Want-To-Use-The-Direct-Connection?

1 Like

@poorya7 so if you are saying they are directly connected via the USB cable? So when you plugin your micro USB from your device to your computer and use the platform tools it actually does a TCP over USB link which just a network.

You probably won’t be able to do what you wanna do, which is sync two devices together, without using some form of TCP/UDP networking.

Android doesn’t really support what you want to do… If you look at the documentation it only supports communicating via the USB as either USB Host, which means you plugin an external device like a sound card or a usb ethernet dongle, or devices that follow the Android Accessory Development Kit and uses the Android Accessory Protocol. Someone might have implemented a way to emulate an Android Accessory on a PeeeCeee and that would be worth researching.

You should really look at my ofxOSCSync addon. Its made for sharing data and common time between two devices reallllly quickly. I have an Android Example I build a couple weeks ago when Golan gave me 18 phones. I’ll clean it up and push it up for you to use. I used it to sync 5 mac minis and create a unified projection surface made up of 12 projectors for this lexus commercial last summer.

1 Like

@theDANtheMAN Cool I’ll start with it and report here how it went.
Thank you very much.

I just pushed a bunch of updates so you might want to run a git pull.

great addon !!!

so basically one could also use : getCommonTimeOscObj() to sync multple ofVideoPlayers ?