L8 SDK

 

INTRO

The L8’s SDK v0.1 is simple but very sturdy and powerful. Despite we have a clearly defined roadmap to add methods and functionalities to it, we want to also know about your opinion and needs to include them in our development stream.

By means of the files below, you can start playing around and testing everything you will, in fact, be able to do with your real L8.

So far, we have developed our SDK for Java to be used with Android devices and for iOS using Obective-C for Apple devices.

We will be realeasing, based on our community needs, more SDKs for additional programming languages.

While each of you are receiving your corresponding L8 (very soon) we have also developed a Web simulator for the L8, that we have also set Open Source to enable our community to customize it.

 

 

Instructions to use the SDK

 


  • Requirements: Xcode
  • Download the .zip file and unzip it into a folder: Obj C SDK v1.0
  • Double click on lib-sdk-objc.xcodeproj and the project will automatically be opened in Xcode.
  • You’ll see 2 modules, each of them has its corresponding target:
  • L8-sdk-objc: SDK code for Objective-C. Generate libl8-sdk-objc.a
  • L8SDKTest: example of a minimal application for iPhone using the SDK, with small samples of SDK invocations. Generate L8SDKTest.app
  • To create the SDK’s library, choose the target: lib-sdk-objc and the destination: iOS Device. In Products, the file: libl8-sdk-objc.a is generated. Right click over it and choose Show in Finder, there you can find the file
  • By default it’s compiled in DEBUG mode

  • Requirements: Eclipse
  • Download the .zip file and unzip it into a folder: Java SDK v1.0
  • In Eclipse: File > Import > General | Existing projects into workspace, and choose in “select root directory” the previously downloaded and unziped folder
  • To Execute, you have to uncomment the method: L8Manager
  • And, if you want to use it for your own project, to create the SDK’s library, generate the .jar file from: File > Export > Java | JAR file


 

In both projects a list of available methods can be found, and furthermore there are several sample codes commented, to show you simple uses of the available methods so far.

 

Simulator

At the moment, the Simulator is simple, but it’s enough to start playing around and testing. We will be extending its functionalities taking into account your comments and suggestions and integrating features we are currently working on.

The Simulator is a Web page with its own API. To use it, first you need to generate a Token. This Token can be used for every try out you want, or to generate new ones. To generate a Token, it’s needed a post call to:

http://l8pre.develappers.es/l8-server-simulator/l8s

To make post calls, we use the Google Chrome’s plugin: Postman. Although maybe some of you already have your favourite tools ;)

An ID like this will be generated: {“id”:”d37df1c47e0448cec8022402c59fa155″} to be appended in the URL, giving you the chance to load it in a web browser and to make use of the simulator for your own. In this way:

http://l8pre.develappers.es/l8-server-simulator/l8s/d37df1c47e0448cec8022402c59fa155

Currently, and this is something we are improving, both SDKs generate new Tokens each time you invoke them. You can know the generated Token created in each execution by invoking, as you will see, in the samples: “l8.getId()

Nevertheless, you can also change the code to use always the same Token, up to you!

There are several methods, but you have samples to see how the work the main ones in:
L8SDKTest, inside the Objective-C SDK.
L8Manager, inside the bundle: “com.l8smartlight.sdk”.