Can anymote protocol be used to communicate between two android devices? - google-tv

I am trying to control one android device using another. And for doing this I want to include the ANYMOTE protocol in my implementation.
As per my understanding I can use the already existing "Google TV android remote" app as my client on one of the devices.
But what I am stuck up with is,that do I need to implement the server side by my self ??
OR
Is there an existing implementation (The one used in Google TV) of the same, freely availbale, which I can integrate in my android device and customize it

Google has not open-sourced the server side of their Anymote implementation for Google TV. However, the protocol is fully documented: https://developers.google.com/tv/remote/docs/anymote
Anymote was designed for IP remote controls. So, depending on your use case, it might not necessarily be the way to control one Android device from another. Also, the Anymote server needs to do system-level touch and key event injection which is not allowed by third-party apps, only by system-level apps signed by Google.

Related

iPhone bluetooth

Is it possible to identify devices around me that have their bluetouth enabled?
I don't need to communicate with them, just know they are there.
I am looking for something similar to android's BluetouthDevice.startDiscovery()
Is something like this possible?
Apple turns out to be very restrictive about Bluetooth communications for iOS platform.
Focusing about a native application with Xcode (but not PhoneGap based - PhoneGap is a Xcode plugin that allows web apps to be converted into native ones; btw it gives a quite nice but limited access to underlying hardware resources) for a iOS device to communicate with bluetooth devices (even with discovery actions) the following conditions have to be met:
-) The device you're trying to discover must be equipped with Apple Bluetooth authentication chip (you can ask to Apple directly for the MFi program);
-) Internally your app must declare a protocol name (e.g.: net.yourcompany.proto0) which the devices you connect with must conform to;
-) You must use Apple's External Accessory Framework to establish communication with such devices.
In short, by this procedure Apple guarantees that the only Bluetooth communications an iOS device can establish are just with authorized and certified Bluetooth devices.
I've gone 400 Mph about this thing but I hope it can give you some pointer to start your search.
The topic is too wide to be treated here in its full length.
One thing you might want to look into is Bonjour and NSNetServiceBrowser.
You can publish a service and also search for other services around you. There are ways to run Bonjour in the background (http://stackoverflow.com/questions/6345554/bonjour-in-the-background).
The only limitation with this approach is that everyone else would also need to be running the app as well. Also, by default Bonjour discovers over both WiFi and Bluetooth, something else you would probably need to look into.

Application that receives DVB-H broadcast signal

DVB-H is a fairly new broadcasting medium. One purpose it is used for is to broadcast TV channels to TV phones and mobile decoders.
The software supplied by the service provider for windows does the job, but the display is small. I want to explore the possibilities of creating my own software that receives the signal and displays it to the screen. Also perhaps create an application to do the same on Blackberry and Android phones.
Anyone with any leads as to where I can get more info on coding with for DVB-H Broadcasts?
If you are working with Linux, you can probably best use Linux API (see this) under the LinuxTV project.
Alternatively, in J2ME based platforms you can follow JSR272 to access the DVB-H receiver. See this and this for more reference.
Unfortunately DVB-H based devices are specialized, so you need to specify which devices you want to support.

App communication in nearby devices without user intervention

Is it possible to communicate two instances of an app:
In nearby devices (Android or iPhone)
Without user intervention (aside from starting the app once)
Without internet (but not network) connection?
How?
Android to Android?
iPhone to iPhone?
Android to iPhone and vice-versa?
Let us ignore the issues associated with implementing the network communication at the application level and focus on the system design problem your question raises.
You want an application on one device to connect to another associated application on another device without any user intervention/interaction beyond launching the device. In order for this to work your system is going to need a 3rd party separate from the two devices/applications that provides a lookup service.
What will need to happen is each application will need to communicate with this service, ask for the data regarding other device it should connect to, if it exists, and then attempt that connection. This is basically how a bittorrent tracker works.
Keep in mind that there's quite a bit more involved in the implementation than that simple scenario suggests. For example, the proper registering/unregistering of devices, registration timeouts, security, etc.
Unless I misunderstand your question, you should be able to just use standard sockets (TCP or UDP depending on your needs) for communication between any/all devices. For iPhone, you could probably use the NSStream classes and for Android you'd use the Socket classes.
Can the new NFC feature be an answer to this?

How to do peer-to-peer communication in an iPhone app?

I'm trying to write a simple chat application for the iPhone (as an experiment). Is there a simple way for two devices to discover each others' IP addresses, and given the addresses is there a simple API or protocol that would let me send text messages back and forth?
I've investigated SIP (specifically Sofia and eXosip), but these tools exist as C libraries and are beyond my current ability to port them to the iPhone.
Update: I'm trying to connect two devices over the Internet (i.e. not over Bluetooth or a local wireless network, which is what GameKit does).
You're going to need a server that provides the match making service. Game Center makes this pretty easy, but your users will have to have Game Center accounts.
Alternatively, you can set up an XMPP (formerly Jabber, it's what powers Google Chat) server (I've never done this, but there are several available) and use the XMPP Framework for Cocoa. There are instructions for using it in iPhone apps here.
I'm sure there are other chat servers and client source also available. IRC and Mobile Colloquy come to mind.
Finally, you could write your own server using your favorite server language / framework. This isn't too hard (I've done it myself), but it's far from what I'd call simple, and I wouldn't use it for a production system.
There is support for exactly this kind of ad-hoc peer-to-peer networking in GameKit. Have a look at the second half of the GameKit documentation for details:
http://developer.apple.com/library/ios/#documentation/...
NSNetService is a good option.
Take a look at WebRTC Datachannels. WebRTC is a newer option with native iOS support a standard that is still being finalized, but it is more flexible should the iOS app need to communicate with browser or even android peers

Is there a API for the new apple remote app?

The new apple remote app on iPhone and iPad is pretty cool. I'm wondering is there a public API to use?
Since the remote app is not a server, so it's not like other "control itunes" apps or programs. I'm wondering is there any API or service exposed on PC/Mac side so that other apps can use it to control itunes?
Ultimately, I'd like to build my own app(on iPhone) or PC program to control the iTunes.
There is no API, but the protocol used by iTunes, called DAAP, is well understood. If you don't mind dropping down to handling it directly via the network protocol there are some decent resources that explain it pretty well. Take a look at:
Digital Audio Access Protocol (Wikipedia)
DAAP protocol - Tapjam
TunesRemote: Android DACP/iTunes Remote Control