Nowadays, wearable devices are one of the hot topics of technology. Google just released its Android Wear SDK and Google Glass is becoming more common in daily life. Until November 2013, only the developers that have Google glass device could develop applications for glass. But after November 2013 Google opened Mirror API for all developers.
You have two options to develop for glass:
Ps: Our demo application was developed by Mirror API, so rest of the blog is about Mirror API.
To develop applications on glass with Mirror API, Google serves us different libraries for .Net, Java, Javascript, Objective-C, Php, Python, Ruby, Dart, Go. if you need you can look into samples for each library.
Run Google Glass application on SAP Hana Cloud platform
Ps: I strongly recommend to you follow openSAP courses of thomas.jung and rui.nogueira about Hana Topic
In this blog scope we will use Java Quick Start Demo of Google. Google also serves demo projects in other platforms, i chose Java platform because Hana cloud platform can run java applications. I modified original demo to run on Hana Cloud Platform. In original demo project, Google uses Apache Maven to manage package dependencies. To prevent you fighting with packages, i export my modified demo in war file, so i suggest you to use attached war file.
At the end of the operations we will deploy demo to Hana Cloud Platform. Then users will authorize via created url on cloud platform. After successful login, current timestamp, name and location of user are saved to Hana Database and a timelinecard is posted with the last logged in users data.
Deploy Quick Start Demo:
There is two major task to deploy demo
Google has a detail tutorial to create a console project. You can follow the instructions.
The created client ID and client secret for my project:
Download attached .war file and import project into Hana studio. (If you want to try Quick start demo independently from Hana studio, please download .zip file, import it as archieve project into eclipse)
If everything is OK Then;
The modifications & new developments over original demo project;
After all the last operation is deploying project. To deploy on Sap Hana Cloud, in hana studio go to servers section, add a new Hana Cloud Portal Server and run your project on hana server.(For this step, You can find detail instructions on rui.nogueira openSap videos).
Ps:If you run project in eclipse, Download Tomcat(version is very important I tried with Tomcat7.0.52), add it as a new server in eclipse and run your project on Tomcat Server.
Test Your Project:
Open Hana Cloud cockpit and go to your deployed application details. There is a url to run your application. You can run my application via https://hanaonglass1p104935trial.hanatrial.ondemand.com to post yourself a timelinecard.
If you wonder how timelinecard will look on google glass device, you can use google playground application via https://developers.google.com/glass/tools-downloads/playground . In order to use the Playground with the Google Mirror API, you need to insert your project's client ID. To test my application paste "236007231554.apps.googleusercontent.com" to textbox and click authorize.
I’m living in Turkey and Google Glass hasn’t sold here yet. So i should say that i couldn’t try application on device. If someone who has glass maybe try application on device, and we will be very glad with feedbacks.
Update: (01.05.2014)
Thanks a lot to randy.middleton. He run demo on glass and send screenshots to us. Now we are sure that demo is working on device smoothly(Google Glass Explored XE16.11 - XE16.2). Nice collaboration in SCN Community !! :cool:
Update2: (29.08.2014)
Thanks a lot to ibm.gbs. He deployed the code to his own trial cloud account. Now we are sure that attached code can be deployed without defect and it is working on device with version XE 20.1 flawlessly.
Files:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 |