Remote control Samsung TV from iOS app - ios

I wonder what are requirements for developing iOS app that can be used as a remote controller for Samsung TV.
It's obvious that the TV needs to be connected to the network and be equipped in SMART TV feature. I would like to know if it's possible without modifying the TV software/firmware.
I didn't find any information about public APIs or iOS SDK from Samsung that could handle communication. As far as I understand the SDKs available on Samsung developer website are for creating apps that can be installed on the TV. However, I noticed several "remote controller" application on the AppStore, but don't have access to Samsung TV to check if they are working. I guess they have to use some official solutions in order to pass AppStore Review process.
Perhaps if there is no official SDK, some kind of universal protocol of can be used to connect with the TV and remotely change channel or retrieve currently watched channel info.
Looking forward to get some hints from people experienced in that topic, as I never did anything connected with TVs. Also, if you have knowledge about remote controlling other brands TV - please let me know how it looks like.

Yes, you can do that.
You will need to download the Samsung SmartTV SDK. The Development Guide has all the instructions to create a Javascript application with Websockets (or even to let you create a C/C++ TCP Socket app)

Related

How can i create an app for Samsung smart tv Remote in iOS programming?

I need to create a remote control app in ios for samsung tvs. I did google too but i can not able to get exact solution. I have seen this SDK link
https://developer.samsung.com/tv/develop/extension-libraries/smart-view-sdk/sender-apps/ios-sender-app
But is it still allowing me to connect latest tv models also ?
I have seen codes provided in github but none of them are working for me.
https://github.com/SamsungDForum/SmartViewSDKIntegrateSample
I have also seen that there is TIZEN platform to do it but i am not aware with that also.
I am still confused that is its control code need to write in swift or objective c or it will be done via web APIS? because i have seen node.js reference as well for this.
https://github.com/Toxblh/samsung-tv-control
https://github.com/piu130/samsung-tv-remote-interface
https://github.com/piu130/samsung-tv-remote-interface-keys
I have seen smartthings link too but it also not giving me any hint from which i can start.
https://smartthings.github.io/
However i have seen there are many apps available to operate samsung tvs. I wonder how they did the connection and operate the remote keys ?
I have seen http://connectsdk.com/. And this is available in objective c and working for LG tv. I have tried and tested in lg tv but it is not working in samsung tv.
Thank you.
You can create a samsung remote easily using websockets. Take a look at this project.
https://github.com/Ape/samsungctl
The code is in python and it contains two methods.
Websockets
Legacy
I prefer to use websockets and it is actually quite easy. By looking at the websockets section in this project you will get an idea of how to use websockets to connect to samsung TV and control it by sending commands.
You can create a Samsung remote easily using WebSockets.
It's Quite Easy to work with this Library, Only need some basic knowledge about Socket.
https://github.com/daltoniam/Starscream
without needing any Server Side Support.

iOS - Screen sharing in Perfecto Mobile

We were exploring various test suites for mobile automated testing and ran into this company called Perfecto Mobile. One of the features that blew me away was they are able to (without jailbreaking) effectively perform a "Remote desktop" on a physical iPad.
So, the iPad's screen is mirrored within a web application, it can register touch / swipe events on the web app and perform them on the device. The only relevant technical detail I have is that all this is being performed using commands sent over the USB cable.
I'm really curious as to how this is implemented and details on relevant Private APIs if any.
Thanks,
Teja
I'm not familiar with PerfectoMobile, but I can give you a few pointers on how this can be accomplished:
For the mirroring, one way would be to look at using AirPlay, the APIs are pretty well documented, but not to do what we're talking about which would require some serious reverse engineering, but it's definitely possible, these guys have done it. A different approach would be to run a background app that would periodically take snapshots of the main screen, and send them over a socket connection to a client. You could do this as a VNC server, and to incorporate the remote view in a web app, you could use noVNC. As far using a USB connection, in the case of the background app talking to a client over TCP, you could to a port forward.
To actually perform on the device the touch events sent from your remote viewer, most people have been using the GSEvent group of functions from the GraphicsServices private framework without needing to jailbreak the device. Again, a background app would receive over a socket an instruction such as "Tap there", instantiate the GSEvent, and inject it so it gets processed in the run loop of the most front app.
These few possibilities, at least, have been implemented successfully in different iOS apps up to iOS 6.1 (iOS7 is a different animal). You won't find any such app in the App Store, since Apple clearly prohibits the use of private frameworks in 3rd party apps, instead people deploy them in-house using Enterprise and ad-hoc provisioning profile. On Android however, there's VMLite available in the Play Store.
If you looking to share screen from ios / android, check out skreen.me. They have sample apps you can try out, also they provide libs for mobile app integration.

Connect iPhone app to access point

I'm trying to create an app that scans available wifi networks and if it is available accesses.
It's possible?
iOS 5 it is possible to scan the network list using private API on a jailbroken device only. This blog post states the following:
Last year Apple has blocked wifi scanners from App Store, however till
iOS5 it was still available for private usage via WiFiManager bundle.
In iOS5, WifiManager bundle no more exists however 80211 functions are
still available via IPConfiguration bundle.
The API you linked provides an open-source tool Stumbler which seems like something you were seeking. The tool is claimed to work under iOS 5.

Scanning and switching Wifi networks on iOS 4.0 and above

I am trying to find whether the private APIs listed at: http://code.google.com/p/iphone-wireless/wiki/Apple80211Functions still work with iOS 4.0 and above. I am trying to turn the wifi ON, scan the networks available and latch on to one of the networks. I am not going to put the application in appStore and it is just an experiment. I found many applications pulled down from the appStore but they seem to have been developed on iOS versions less than 3.0. I would also like to get an example if possible.
Please Help.
I needed the same thing as you, and after some research I must say that starting from iOS 5 it is possible to scan the network list using private API on a jailbroken device only. This blog post states the following:
Last year Apple has blocked wifi scanners from App Store, however till iOS5 it was still available for private usage via WiFiManager bundle.
In iOS5, WifiManager bundle no more exists however 80211 functions are still available via IPConfiguration bundle.
The API you linked provides an open-source tool Stumbler which seems like something you were seeking. The tool is claimed to work under iOS 5.
Tried stumbler for iOS5 via linking to framework
/System/Library/SystemConfiguration/IPConfiguration.bundle/IPConfiguration
I could link to Apple80211Open, Apple80211BindToInterface, Apple80211Scan. However, I only receive empty WiFi scan results on jailbroken iPhone4S / iOS 5.1.1
The folks from WifiFofum did a good job and have a app on cydia which runs on JB iOS 5.1.1 and does an excellent job for scanning WiFi networks (BSSID, link level, SSID, channels, ...).

IPhone Bluetooth Connectivity to Non IOS Devices

I was wondering, if there is a way to use IPhone as an HID device, with some other device like PS3. I checked out the Bluetooth specification and IOS Devices do support HID Profile. So I thought it would be easy to pair my iPhone using passkey mechanism and should be able to start using my iPhone as keyboard or mouse without much hassle. But I found very soon that this assumption is naive and I need to develop custom solution.
I was initially thinking about using GameKit framework, but I think it only works between two compatible IOS Devices. If I want to extend this capability, then I have to use iPhone External Accessory API .In my analysis, I also found that iPhone will only communicate and pair with devices that are licensed by Apple. (Made for iPhone\iPod program). Does it mean that, if I want to use iPhone with another device, I need to get that device approved by Apple. ( Which will not surprise me one bit). Also if someone could point me to more detailed documentation on this, that will also be helpful.( What is an MFI developer board ??)
I do not want a solution that needs me to jailbreak an iPhone. (or any solution that will disqualify my app by Apple).
So to summarize:
1- Please validate my findings, correct them if they are wrong?
2a- How does External Accessory API Work?
b- Can I use this to connect to third party accessories ? (or is this only for accessory developers).
3- Or is there a better solution without using External Accessory API?
Please provide supportive documentation or link if you can. Thank You.
You are unlikely to get on the External accessory program from apple unless you are a big company ( you can try, but I have read this a number of places) . iPhones use a proprietary Bluetooth interface that and hardware must also implement this interface, so not much chance of getting it to connect to any other hardware directly.
Most apps like this (Remote Mouse) for example, connect to your wifi network, and have another application installed on your computer. The iphone can then talk to this application over the wi-fi network, but not bluetooth. I would suggest that the only way I can see this would be possible to to create the server app that you install on a computer on the wi-fi network that then in turn controls the 3rd party device if there is an API that you can use from the desktop app to control the 3rd party device.
This is just what I have found when I researched about this for making an app for iPhone to control a bluetooth watch. I had to jailbreak in the end to replace the bluetooth stack on the iPhone with one that could connect to any hardware device. Not limited by apple.

Resources