Chromecast receiving input from multiple devices on RemoteCast - android

I realize that it is possible to create a Custom receiver in order to receive messages from multiple devices.
Is it possible to use the Remotecast (https://developers.google.com/cast/docs/remote) API in order to run an application on the Chromecast which receives input from multiple devices?

When using Remote Display, you are running a special receiver on the cast device which only communicates with the device that set it up, so other devices cannot communicate with that receiver directly. The workaround is to communicate with the sender device that set up the remote display to influence the experience on the cast device.

Related

Android BLE Notification

I'm developing an android application using BLE. I've implemented all the basic operations like discovery, connection, and data transfer.
Now I was looking for BLE notifications, Is it possible to receive notification from BLE device when the application is not running (not even in background).
What I want to implement is the notification similar to GCM/FCM, we receive notifications in our app even though app is not running.
So want to check if similar notification mechanism is supported by BLE devices and Android framework.
I've searched for few hours now but didn't get any proper result.
If anyone can just tell me if it is supported or not?
Now I was looking for BLE notifications, Is is possible to receive notification from BLE device when the application is not running (not even in background).
BLE is just a communication protocol. When someone talks, someone has to listen.
What I want to implement is the notification similar to GCM/FCM, we receive notifications in our app even though app is not running. So want to check if similar notification mechanism is supported by BLE devices and Android framework.
GCM/FCM works because Google Play Services is running on the device listening for messages.
I can imagine two possible cases based on your question:
If by "receive notification" you mean a change in a Bluetooth characteristic - well your app should be running already. Only you know how to talk to the BLE device.
If you want to implement a location aware beacon type behavior with BLE you may be able to leverage the existing Google Nearby feature to achieve the desired effect.
I would say no. You need to have the app running to get Bluetooth callbacks. You should simply set up a Foreground Service in your process and that will keep the app running in the background.
If you want to receive notification event if your app is not running, you should implement Android service that continuously scan for BLE frames and ones it catch some frame that is met some parameters (for example for iBeacon it will be specific Major and Minor values; for Eddystone URL -- some specific URL etc.) -- just send intend to start your application.

Wearable to Wearable communiction

is it possible to send data (e.g. a textfile) directly from one android wearable to another wearable - for example via bluetooth? Or is it required to communicate over the two associated handhelds?
Many thanks!
Henriette
Yes, it is possible since Android Wear fully support the Bluetooth library. You may not use the Android Wear Library that for NOW only connect ONE Wearable to ONE Smartphone.
You need to implement a wearable application managing bluetooth discovery and pairing, then by opening a connection socket you can exchange the data you want.
From the second part of your question, it seems you are referring to two wearable devices that are paired with two separate phones. In that case, there is no connectivity or association between these two devices and you can only achieve communication between them by, say, using the phones and handling the communication over there; that may happen in a variety of ways depending on your requirements

Using BroadcastReceiver Without GCM?

I need that my app will send a string to another android device and on the receiving android device side i want to make something with that string.
How can I use BroadcastReceiver with the callback OnReceive() just to program the string that he will get Without using the GCM if it is possible.
Thanks.
BroadcastReceivers are for intra- or inter- application communications on a single device. To send messages between discrete devices without a cloud-based solution (such as GCM) then you'll be looking at using the Bluetooth stack for ah-hoc networks or the NetworkServiceDiscovery APIs for devices on the same local network.
Depending on your use case, there are examples to get you going under each of the provided links.

a few basic questions about NFC, NDEF and NFC enabled android phones

I want to start android programming to be able to transfer data between a NFC enabled smartphone and a custom device, but I am not able to find clear information about a few things
For example, my custom device has to be able to send data to the smartphone as well as receive from it. But from what I have read it is not currently possible for two way communication using NFC
How to send data between two devices using NFC in android?
or the more recent,
NFC enabled phone act as a NFC tag
But the Android developers website itself says that we can use Beam to perform peer to peer communication between two android phones, so two way communication should be possible shouldn't it?
Android Beam allows simple peer-to-peer data exchange between two
Android-powered devices. The application that wants to beam data to
another device must be in the foreground and the device receiving the
data must not be locked. When the beaming device comes in close enough
contact with a receiving device, the beaming device displays the
"Touch to Beam" UI. The user can then choose whether or not to beam
the message to the receiving device.
http://developer.android.com/guide/topics/connectivity/nfc/nfc.html#p2p
Secondly, can I use an android NFC phone as a tag writer (instead of just a reader)? That is, just send data to my custom device (or a passive NFC tag)?
The keyword in "simple peer-to-peer data exchange" is simple. Currently (Android 4.2), apps cannot do 2-way communication over Beam. However, a custom device can send multiple messages over Beam. All of these will be received by the Android device without problems, but the Android app can only send one message. You can trick the Android device, however, by resetting the RF field in your custom device. It will appear to the Android device as if a new device has appeared and it will show the "Touch to Beam" UI again.
Android NFC devices can act as both tag reader and writer.

Regarding Bluetooth Protocol

Can Android app installed in tablet show alert for in-coming Call or SMS of any other device (Nokia,iPhone,Window) with it is paired by blue-tooth ?
What i am able to do -
I can pair android device with any other device (Nokia,iPhone,Window) by blue-tooth protocol.
Now how can detect that there is In-coming call or SMS on device which is paired with ?
Anybody has idea for similar feature in android ?
One way of implementing it is to write two applications one for each device which will communicate via bluetooth.
You will have to define and implement a protocol between the two devices.
The application on the phone will register to listen for Intents for incoming call and incoming SMS. For example look at http://www.krvarma.com/2010/08/detecting-incoming-and-outgoing-calls-in-android/
and
Once you receive these intents on the device then send information to other device through the defined prtotocol using bluetooth. For example you can use XML to communicate.
And then on the other device application you will show notifications using Activity.
I hope this helps

Categories

Resources