Connection between Samsung Smart TV and iOS app - iphone

I got a Samsung Smart TV UE40D8000 (Apparently from 2011 series ?) and an iOS device.
I'd like to make them both exchange information (most likely small chunks of text), via a dedicated app on both sides;
Now, it turns out the best way would be to use the Convergence API : I've built a basic TV App that looks an awefull lot like the sample code they give, and an iOS App for UPnP discovery and sending POST requests onto the TV. UPnP discovery works great.
But on the actual device, I can't seem to be able to manage to connect : the requests to /ws/app/{appID}/connect fail (with an actual appID of course) as if there would be no server.
Is the Convergence API available for my TV ? (there does not seem to have a compatibility list anywhere) Is there a way to upgrade to a 2012 platform if it is indeed a 2011 one ?
Can we test that API on a simulator ? My simulator runs under Windows 7 in a VM on my Mac (there is not Mac version of their dev tools...)
Is there really anything I can do to have a more precise diagnostic ? like logs from the appilcation running on the TV ?
Thanks

This Convergence page sounds like existence of MultiScreenService UPnP service equals the capability of Convergence API calls. So if you say "UPnP discovery works great" (given that you do an ST-limited M-SEARCH per example, not an unrestricted UPnP discovery), it should mean that your particular TV supports Convergence. Have you tried querying the TV simply with telnet? Are you sure about the port number on which the TV listens? Here the doc claims that it should be 80 for the TV and 8008 for the simulator, but i for one am very interested in the UPnP description.xml served by the TV for MultiScreenService. You could even discover some UPnP functions for diagnostic there...
Disclaimer: i have no experience in Convergence, only UPnP in general and unfortunately Samsung in general too. The fact that Samsung pushes such half-baked proprietary mockup reminds me of my short bloody disgusting career as Bada developer. Only Sony can sustain pushing proprietary mockups with dignity :)

Your year model is 2011 and you can't upgrade to 2012.
2012 models uses API v3.5 and 2011 models uses API v2.5
So this what you try to do won't work at your device as Convergence API is in API v3.5.
Check this one
http://www.samsungdforum.com/Guide/View/Developer_Documentation/Samsung_SmartTV_Developer_Documentation_2.5/API_Reference/JavaScript_APIs/Interactive_API
It gives you possibility to communicate between devices, so maybe it will fit your needs.

Finishing answering my own question:
like #Dobiatowski mentions, I'm screwed for Convergence API and 2012 platform
The Interactive API's documentation is not clear, and virtually non-fonctionnal despite 3 days of my best effort. Half of the sentence in the documentation don't actually make sense.
Still did not manage to make the interactivity simulator to work, Looks like it's not possible on Win7
Basic answer is : not possible

Related

How to completely access android bluetooth using progressive web app

I have tried web Bluetooth API to access,but it is only for battery status, heart rate etc.., I need to access complete functionality of Bluetooth. Is there any option or API available
I think there is no other available API for this bluetooth function, The Web Bluetooth API is your only option, but it is not finalized yet.
According to this documentation, until now, the ability to interact with bluetooth devices has been possible only for native apps. The Web Bluetooth API aims to change this and brings it to web browsers as well. Alongside efforts like Physical Web, people can walk up to and interact with devices straight from the web.
And even though it is not finalized yet, the Chrome Team is actively looking for enthusiastic developers to try out this work-in-progress API and give feedback on the spec and feedback on the implementation.
Just take note that Web Bluetooth
API is currently
available to be enabled experimentally on your origin in Origin
Trials, or locally on your machine using an experimental flag. The
implementation is partially complete and currently available on Chrome
OS, Chrome for Android M, Linux, and Mac.
For more information, just read these documentation and video. You can also check the updates of the documents here.

Where can I find the Miracast specification?

I want to develop a Miracast application for Mac OS X. (i.e. something to display imagery to a miracast-enabled device) The only problem I'm having right now is that I can't find the official specification for this.
Is it possible that you need to be a member of the wi-fi alliance to get this specification? Is this even an open standard?
Or better: Is there a (open-source) miracast library I can use?
Thanks!
Have you seen this? http://www.freedesktop.org/wiki/Software/openwfd/
As for the wi-fi alliance, you don't need to be a member but it will cost you $199: https://www.wi-fi.org/wi-fi-display-technical-specification-v11
The Wifi Display spec is currently free (as in 0.0$). The download still requires agreeing to a license agreement and does not seem free to redistribute.
Also, WDS is a new but fairly complete implementation for linux and should be easy to port to other platforms as it tries very hard to keep agnostic with respect to the stacks used to handle media playback and Wi-Fi Direct. That said, the most difficult bit in Miracast seems to be Wi-Fi Direct so if your platform does not support that well, you're pretty much out of luck...
Disclaimer: I used to work on the WDS project.
As #Constantinos said you will have to pay 200$ for getting the specifications via wi-fi alliance.
Or, as you ask, you can look at the following implementation available on the internet:
Java
or C
I think there is enough example here to do what you want.

How can I integrate CalDAV and CardDAV

I am trying to allow people (from a URL) to connect to a calender/contacts from their iPhone, Blackbury or Android phone - what is the best way to do this?
I've had a bit of a read and it seems that CalDAV and CardDAV are the best way to integrate calenders/contacts, but how exactly can I do this? The internet seems to lack a standard way of how you can integrate this into a number of devices.
Which mobile devices support them? And is it possible to just provide a URL and then the calender/contacts just automatically sync!?
All of this assumes you have some sort of Groupware server setup somewhere which acts as the repository for this information.
For opensource you might want to look at a product called Sogo. Apple also do a caldav/carddav server written in python. They expect you to buy a mac server but you can download the code and run it from a pc or linux box. There's a heap of paid-for groupware.
You might want to check out the "opensource" client software written by the same kids who develop Sogo caled funambol. This claims to be x-mobile (all the ones youve mentioned anyway).
The idea behind all the *DAV protocols is that yes everything is done by Uri (this was actually specced by Tim Berners Lee in his draft for the web).
I've just been through this very same process and found only emerging standards, of which *DAV are the de facto ones IMO. HTC use MS active sync on my HD2 to sync my Gmail. Go figure!
Bedework is CalDAV/CardDAV server that allows you to hook your iPhone/iCal calendar and events.
I have used it and it gives you an url to sign in with in you phone calendar. The Bedework is a server you could install on you machine (it is provided with documentation; this is a good point to start with).
Android natively does not support Bedework. In order for Android to support the CalDAV you have to install an application that supports CalDAV, but I do not know if they work with Bedewrok or not.
In the case of android you could try using the CalendarProvider and the ContactProvider. You could refer to this : http://developer.android.com/guide/topics/providers/calendar-provider.html

How do you get the charge status of a connected iPhone from the Mac?

In iTunes, you can see the charge status of the iPhone currently connected:
This updates as the phone charges, and even shows when the phone is done charging.
Is there a way I can discover the charge status programmatically from the Mac? Any programming language or API is fine.
I would recommend setting up a bonjour service in an App on the iOS device to communicate with the computer. The app will then communicate the changes in the batter status using the batteryMonitoringEnabled property of UIDevice. Take a look at the samples code here.
BatteryStatus Sample Code
And here is the class reference
UIDevice Class Reference
And finally Bonjour programming
Bonjour programming guide
As far as I know, the only official way to communicate with the iPhone over USB/Bluetooth is by signing up to the "Made for iPhone" program:
http://developer.apple.com/programs/mfi/
Unfortunately the documentation seems to be closed to registered members so I can't find out if the API for this is public or private. You could contact Apple to check before applying.
UPDATE : As mentioned, this might not work for Mac/PC <-> iPhone communication over USB. There are several apps that do things with the phone over USB (although usually for reading/writing files). I'd start by looking at the source code of those:
http://code.google.com/p/iphonedisk
This should put you at least in a position where you have a connection to the device and are able to send/receive commands. Everyone who's ever done this sort of thing has had to spend time reverse engineering the thing :) The jailbreak community might be able to provide some insight too, although having to actually jailbreak the device is probably unacceptable.

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