Jul 5, 2016
Qualcomm products mentioned within this post are offered by Qualcomm Technologies, Inc. and/or its subsidiaries.
LG has globally launched a variety of new accessories called LG Friends. Friend devices currently include cameras, a virtual reality (VR) headset, a wireless headset and a charging cradle, with more accessories on the way.
Qualcomm Technologies and LG are working together to help developers explore new features and technologies. With LG Friends come new opportunities for development on Snapdragon processors.
Ragina Jeon is a technical evangelist for Android-based LG mobile SDKs. She helps developers use LG mobile SDKs easily via lectures and online. She was able to share with us some information regarding the new feature sets and tools for LG Friends.
Ragina Jeon, LG Technical Evangelist
Developing for LG Friends and Snapdragon Processors
First, LG has released its Friends Camera SDK for developing apps for the LG 360 CAM, a camera that takes spherical images and records spherical video from connected mobile devices. The Friends Camera SDK package includes FriendsLink libraries, a developer guide and sample applications for shooting scenes, recording videos and downloading the files from the camera to the mobile device.
The main feature of the LG 360 CAM is shooting 360-degree pictures or videos with its two wide-angle lenses. That’s cool enough, but LG is going a step further with its newly announced Action CAMLTE, made for broadcasting life directly to sites like YouTube Live through a wide angle lens and waterproof body. Action CAMLTE has built-in LTE and can stream as a home monitoring camera or as an automobile dash camera.
Besides your access to the Friends Camera SDK, you have an advantage as a developer who has worked on devices powered by Snapdragon. The LG G5 is one of the first commercial modular smartphones and it runs the Qualcomm® Snapdragon™ 820 mobile processor. The Action CAMLTE is powered by the Snapdragon 650 mobile processor and the LG 360 CAM runs Qualcomm Technologies’ APQ8056 processor.
To open up commercial opportunities for your apps, LG Friends CAM devices work with the LG G5 as well as with non-LG, non-Android devices. They use the Open Spherical Camera (OSC) specification and connect over Wi-Fi, so any device that supports Wi-Fi and handles HTTP packets can easily connect to and control 360 CAMs and Action CAMs.
The LG Friends Camera SDK is now available for Android, with iOS coming soon. Use it when you want to control the 360 CAM or Action CAM in your own apps without using the official manager app.
LG Friends Camera SDK example
Here’s an example of implementing the SDK in a smartphone app to control the 360 CAM.
Let’s assume that you’ve already developed a VR viewer app. Now, you want to use the app to show live previews from a 360 CAM. Friends cameras come with a manager app, but in a VR application, nobody wants to remove their VR device, run the official manager app on their phone and tap an icon to get the live previews. With the LG Friends Camera SDK, they don’t have to do that, because you can implement direct control of the 360 CAM to your app.
To connect your app to the Friends camera, you make calls to the FriendsLink library in the SDK so your app can easily find and connect to the camera through Bluetooth Low Energy (BLE) and Wi-Fi. The library also includes APIs for scanning for nearby Friends devices including 360 CAMs, asking the selected 360 CAM to turn on its SoftAP and connecting to the 360 CAM through Wi-Fi.
The following figure shows the connection flow and API calls for each step.
Once your app connects, it calls camera.getLivePreview, an OSC API, to get live previews. Then the 360 CAM sends binary data in JPEG format loaded in an HTTP response packet, as shown below.
That’s an example for the 360 CAM. The OSC APIs also support the live streaming feature in the Action CAM, and LG plans to update the LG Friends Camera SDK accordingly.
LG Friends is your chance to get in on modular phones early and see what you can develop for them.