App to Cast videoconference (zoom, skype, telegram) - android

Lets imagine i want to build some app for videoconferences or videomeeting that is chromecast-compatible.
So i can use my android device to connect meeting, after that i just click something like "cast to device" and get audio and video on my TV.
Also i noticed that skype, zoom, discord and all apps like this has not bulid-in chromecast support. So maybe it is impossible?
I tried to find something about that but but found nothing useful. I found zoom sdk, and chromecasst sdk, but not seen what actually i shoud cast. As i understood chromecast can send only media-content to reciever, but zoom sdk not actually provide some media-like links for conversation(videoconference).
So i want to know what are my steps to build my own chromecast-compatible meeting app and what may i want to use to develop app like that?
Or maybe someone know how can i use Zoom sdk to achive what i want?

When a sender device connects to a Chromecast, it has a limited set of "commands" it can send to the device.
There is no immediate way to send data other than those messages from the sender to the device - there is a 'custom' message, but that too only includes stringified JSON
The way this would have to work is too set up a stream of the screen/app you want to display via Chromecast and send a LOAD message to the Chromecast which will connect back to the sender (or a third party server where the video can be streamed from) and play it.
I'm not too confident this is going to work as intended though - there will be a significant delay between the sender and the Chromecast, and since the Chromecast has no mic, you will also have to use the mic of the sender and deal with the acoustic feedback.

Related

Starting playback on a remote Android device

Let's assume I have two androide devices. An AndroidTV and a smartphone.
On both devices I have installed my app, that is capable of video playback streamed from a server.
I want, similar to chromecast, to delegate the playback from my smartphone to the AndroidTV via my app.
How would I do that?
My starting point is this: Media Router here I go for Remote Playback.
If I understand this correctly,
the app on my AndroidTV device would be a MediaRoute Provider,
the app on my phone would use a MediaRoute to launch a CATEGORY_REMOTE_PLAYBACK-intent on the MediaRoute Provider?
This also means, that the callbacks handle all communication, so that I could differentiate via callbacks between passing the url and let the receiver app fetch title and images themself or let it be passed from the sender app?
Or am I on the wrong track?
the app on my AndroidTV device would be a MediaRoute Provider
No. MediaRouteProvider goes on the device that is the user's controller, which in this case would be the phone.
the app on my phone would use a MediaRoute to launch a CATEGORY_REMOTE_PLAYBACK-intent on the MediaRoute Provider?
You can do that. The advantage of using MediaRouteProvider is that any app on that phone that supports RemotePlaybackClient can now support your setup. If you only want your app to do this, you could skip MediaRouteProvider.
Then, either your app or your MediaRouteProvider is responsible for getting the request over to the Android TV device, and your app on it, by some means (WiFiDirect, Bluetooth, GCM over the Internet, whatever). There is nothing in the Android SDK that specifically addresses this -- you're on your own for rolling whatever protocol and connectivity you want. On the plus side, there's no built-in assumption in MediaRouteProvider about any particular way to deliver that information, meaning that you could be connecting to something that is not running Android at all.

Register Android app for voice broadcast intents

I realize this question has been asked in the past but the latest one I can find is from 2011 so I thought it was applicable to bring this up again. Let me explain my requirement in question through an example.
Our company makes relay control boards which you can operate from android. You can take a look at them here.
We have Bluetooth, WiFi, and Ethernet relay boards which you can operate from android using our free app here.
Sorry if this is starting to sound like a sales pitch just trying to put things into context. These relays could be used for something such as opening a garage door.
My friend recently got an Android watch which supports the OK Google voice commands. We thought it would be cool to run a background service started from the application which could register a receiver for voice activated broadcast intents. So if the speech command matched a string such as "OK Google Open garage door", which the user could edit in the app, we could connect to the relay board and and turn it on momentarily which would result in opening the garage door.
So is this possible? If not why the heck not? Sounds like something we as Android developers should have access to and could open up a whole world of possibilities.
Google Now fires intents in response to voice commands, see http://developer.android.com/guide/components/intents-common.html#Now
This is not quite what you're asking but it's new since 2011, so it's worth mentioning.
Starting with API level 21 there is also an AlwaysOnHotwordDetector API (https://developer.android.com/reference/android/service/voice/package-summary.html), which might allow you to implement your own customized hotword detector if Google Now does not provide the required functionality. (I haven't experimented with it myself yet.)

how to send notification from one device to another

Currently I am trying to implement a feature where if I do some action in my app on one android device (changing channel on android tv), it should trigger my another android device in close proximity to launch one of its application.
I was just wondering which could be the easiest way to prototype it? Should I need to send some kind of push notification or another simple solution is possible? I just need it for prototyping as of now.
Thanks
You can use GCM with XMPP protocol that allows device-to-cloud connection. In the documentation you will find examples, just read it through.
This technique is very often called device to device but it's actually about upstreaming to the server and telling the server to push notification.
Requirement for both apps would be to use the same GCM sender ID.
Since this is a prototype you don't actually need to check if device is close to you or not. Otherwise, you could frequently update device's location on the server.
I think you want to develop a application like airdroid
https://play.google.com/store/apps/details?id=com.sand.airdroid&hl=en
As i know it set up small http server in one phone. And Send request from an another device. As you want. This sample help you to create such kind of http server. There is one restriction both device must be in same network.
https://github.com/NanoHttpd/nanohttpd.

Best practice for AVRCP on Android (sending meta-data to bluetooth device)

I want to send meta-data to a bluetooth device, via an Android 4.3+ device.
The solution that I came across, and that works, is sending an intent to google.android.music (the google music app), informing it about the meta-data, as seen here: send track informations via A2DP/AVRCP. I might be wrong, but this does not seem to be the way AVRCP should work on android.
As far as I understood, the best practice would be to use RemoteControlClient.MetadaDataEditor like so:
mRemoteControlClient.editMetadata(true)
.putString(MediaMetadataRetriever.METADATA_KEY_ARTIST, playingItem.getArtist())
This is actually advised by google themselves as the best practice: http://youtu.be/EC5-cEbr520?t=25m18s
The problem is that I cannot make my app to send meta-data to the bluetooth device with the advised RemoteControlClient.MetadaDataEditor class, but using the intent to the google music app it works.
Does anybody know why this happens? What is the most correct way to send meta-data to the bluetooth device? Thanks!
The solution is to use METADATA_KEY_ALBUMARTIST instead.

can't find chromecast device using Google's sample app

Using this code, https://github.com/googlecast/cast-android-sample, I build android chromecast sample sender application.
And I also modified the code to use my appID, and uploaded whitelisted URL (already registered to Google).
But I can't find the chromecast device from this sample app. I mean, onDeviceAvailable() is not getting called. And I don't see any suspicious error / log while i am running the app.
is there anything that i need to try to see why i can't find the chromecast device?
(BTW, youtube app in the same device can find the chromecast device)
another question, which may not be related to the main question.
registering the device to have app_id, and whitelisted url is not mandatory step to find the chromecast device from app. right? I guess that registration step is needed for media stream not for device discovery.
can anyone share working sampleapp code / receiver.html? (for me to make sure that i didn't make a mistake..)
Thanks!
Did you try the Tic-tac-toe Android sample too? These two apps are using different ways of displaying the list of ChromeCast devices to the user.
Both sample apps work just fine for me. I used the default reciever.html and only added my own app id.
Technically it is not necessary to register the device to discover it on the network. You can try this app to find all DIAL devices: https://github.com/entertailion/DIAL
However, the Google Cast API wraps the DIAL discovery and they might be enforcing the app id requirement.
Ok, I think i found the cause (with help of you guys, thank you), but that does not mean that i can solve this.
TicTacToe is working because it does not need my app id. it's using something generally working (like what youtube / netflix is using).
I tried "TicTacToe" as app id for cast-android-sample app, and now it can see the chromecast device.
I tried my app id to TicTacToe and it can't show the web page on the screen. (of course i modified my receiver page that is whitelisted)
From above 2 test results, i am confident that there is something wrong with my app id.
How to solve? should i reply to "nobody#google.com" who gave me the app id? or should i register my device again? (is this ok?) i am not sure.... can anyone tell?
Assuming that you've also changed the settings on the Chromecast to send the serial to Google, then you may just need to wait a few hours after doing so. I was having the same issue where my device wouldn't show up with the sample app, after waiting a few hours after changing that setting it showed up just fine.
Did you try rebooting your device by going into your Chromecast settings via the Chromecast Android app or the Chromecast app for your computer?
I spoke to the Chromecast support team because I was having the same issue, and the reboot got it working.
To make sure that your device is whitelisted, you should be able to access this page from chrome (from a computer on the same network as your chromecast device):
<IP address of chromecast>:9222
If you can access that page, then it should work!

Categories

Resources