Building a simple control panel for an array of Chromecast devices - sdk

Background: My company is moving into new offices and we would like to control all of the LCD TVs on our walls (around 50 screens) using Chromecast Ultra devices, such that each will display a different webpage. So that's 50 Chromecasts that will be connected via Ethernet to our local network.
I reviewed the Cast SDK documentation on how to build a custom receiver application, but to my understanding this is for sending a message to a single device every time. I wish to build a simple control panel (can be either a web app or an Android app), where I can select a number of Chromecast devices and send all of them a message (with a URL to load).
Can a message be sent to multiple Chromecast devices at once, without having to send the message to each device manually?

No; using the Cast SDK, you have to send a message to each device manually by establishing a connection to that device and sending your message. Alternatively, your receiver running on your chromecast devices can communicate with your backend server and you can use a PUSH mechanism to send messages to your receivers from your server; that, however, is outside of the Cast SDK.

Related

Offline Message

I have been thinking about this for a while. We know some games can be played through hotspots. While playing the games we can even send message. An example is the Doodle army mini militia. I was thinking of building an app where only my friends can send messages at a short distance if they are connected to the hotspot.
I did an experiment today. I set up a hotspot. I connected two phones to the same hotspot with the internet. (three phones. one phone only to open the hotspot. The other two just to connect to the hotspot) So, now I tried to send a message to the other phone through what's app. I sent the message through the second phone to the third phone. The message was successfully sent to the third phone. We knew this would work. It is a very simple process. Now my question is below.
When I disconnected the data connection on the first phone. Remember the hotspot is still on. The only thing is that there is no internet. Now I sent a message again from the second phone to the third phone. This time the message did not go through. I knew the message would not go through. The question is why does there have to be a proper data connection with the internet for the message to go through? Well, there is already a connection where phones have the path to send the message. We also know some games can send messages while connected to hotspots without the internet.
No, your assumption regarding sending of messages through Whatsapp is completely wrong.
When you send a message from one device to another device, the message is first send to Whatsapp Databases. It will be stored there unless the device which you've sent to has got an internet connection (There's a limit for the storage on database, like 1 year or something.)
The thing is that Whatsapp is not connecting devices directly, they are being connected together under Whatsapp , Whatsapp is the Intermediate in the Process of messaging.

how to send messages to different instances of my application over the local network with iOS

I would like my application to send a message to another instance of the same application. This another instance would run (obviously) on a different device. Both device (sender and receiver) are connected to the same local network (which may or may not be connected to the Internet).
I would prefer a server-free solution (i.e. point-to-point) if possible i.e. with only the mobile devices involved.
What API/framework do you recommend to do this ? (Apple iOS SDK, open source ...)
Thanks !
Definitely Multipeer Connectivity Framework

iPhone app development. How does an app like snapchat send data from user to user?

I'm just starting to get into app development and have just been learning the uses of Xcode and Objective-C language. Just wondering how an app like snapchat or any other app can send data from one user to another. General answers would suffice just to better my understanding.
How do they test this functionality?
How can they connect peer to peer and send data from one phone to another? Is it all accessed in one database that the app connects to everytime that it pulls down?
When you sign up for an app like this with a registered account is that information stored on the iphone?
Well there are two ways data can be sent to a device. One is the device polls the main server periodically. This can be seen in a pull to refresh scenario. The other is the server can send a push notification to the specific phone and app which causes the data to be received by the device and displayed however the programmer wants. So device to device is essentially one person sending something through a web service call to your server. Your server them packages that information into a Json payload and sends a push notification to the recipient. It seems like its device to device because its so quick, but it requires that you have a server in the middle and of course your server is really sending the push notification to Apple's push server, so there really are two servers involved.
How do they test this functionality?
I would try to do this with real devices, and/or using a network sniffer tool to inspect the send packets.
How can they connect peer to peer and send data from one phone to another? Is it all accessed in one database that the app connects to everytime that it pulls down?
Someones sends you a snap
your app will ask the database every ...min or when you reload if there's something new to load, and gets it from the database if there is something new
When you sign up for an app like this with a registered account is that information stored on the iphone?
Connect to snapchat
get a snap from someone and wait till you can view it
start airplane mode and see if it loads, if it does there are files (temporarily) stored on your iPhone.

Chat between two iphones

I am looking to create a chat app so that two iphones/mobile can chat with each other.
Can someone please head me in the right direction ?
1. Should I try to connect two devices directly using HTTP or TCP
2. Or should the communication pass through a server i.e. one phone sends the message to the server and server then push the message to other phone ?
If you can tell me any libraries/api that I should use, that would be greatly helpful too.
Or should the communication pass through a server i.e. one phone sends the message to
the server and server then push the message to other phone ?
That's the usual approach. A server with a known address is easy to find; mobile phones that move from one network to another and frequently change their addresses are not. Also, you can keep a server running all the time, so that when one device sends a message, the server receives it and stores it until the other device becomes available. If you were to try to run your chat program on the phones all the time, you'd quickly deplete the batteries.

Is it possible to build socket connection between 2 iOS devices

Is it possible to build a socket connection between 2 iOS devices connected to the same network (Without net)?
if it's possible .. Is (CocoaAsyncSocket project) useful for me?
I just want to send a message from Device A to Device B which put the app in background .. when Device B receive the message should show notification to return the app to foreground.
It's not for the App Store, so I don't care if Apple would reject the app because of this behavior.
Yes, you can do it, and yes, CocoaAsyncSocket would be useful. If you don't have to worry about the carrier network's firewalls and filters, then you should certainly be able to build a client-server app running on two iOS devices. One opens the server socket to listen, and the other one (the client) connects, via the Wi-Fi network.
Trying searching on Google (e.g. "CocoaAsyncSocket iPhone iOS site:stackoverflow.com") or directly here on Stack Overflow.
Here's somebody who seems to have accomplished this
Another link
And a post from Robbie Hanson himself, referring you to the EchoServer projects in the github repository
EchoServer project
You may have to use a static IP address for the server device (I'm not sure how much control you have over the Wi-Fi network's configuration), or use some other mechanism for letting the two devices discover each other.

Resources