• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
LG Developer Event 2013 in San Francisco

LG Developer Event 2013 in San Francisco



LG Developer Event 2013 in San Francisco

LG Developer Event 2013 in San Francisco
Introduction to LG QRemote SDK



Total Views
Views on SlideShare
Embed Views



8 Embeds 92

http://developer.lge.com 59
http://dv.developer.lge.com 15
http://localhost 7
http://www.innoditor.com 4
http://dv.adm.developer.lge.com 4
http://qa.developer.lge.com 1
http://qa.adm.developer.lge.com 1
http://adm.developer.lge.com 1



Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    LG Developer Event 2013 in San Francisco LG Developer Event 2013 in San Francisco Presentation Transcript

    • LG G2 1
    • LG Developer Program • What does LG Developer do for developers? • LG’s New Developer Program
    • LG Developer Program • LG Developer accelerates the development and delivery of great 3rd party applications on LG smart devices. ’15 ’14 ’13, Aug ’12, Sep G2 ’11, Nov ’11, Apr G Pad 8.3 Optimus 3D Cube ’10, Aug ’09, Jun Optimus 3D ’08, Oct 3
    • LG’s New Developer Program Are you creating an app for LG smart devices? But don’t have a device to test your app on? Borrow an LG smart device through the LG Device Loaner Program! November 4th, 2013 4
    • LG Device Loaner Program How to borrow an LG Device Registration Register as a member of the LG Device Loaner Program. Order Receive Click Order and submit your order form. Receive the LG device and test your app on it. Return Return the LG device to us within the loan period. Order form Security deposit Test your app on LG devices Pack the device and return 5
    • LG Device Loaner Program Available Devices • G2 Verizon (VS980) • G2 AT&T (D800) • Optimus G Pro AT&T (E980) • Optimus L9 T-Mobile (P769) • ENACT Verizon (VS890) 6
    • LG Device Loaner Program For more information • http://developer.lge.com One-stop resource for all developer requirements for LG smart devices 7
    • QuickRemote • App Intro
    • LG Quick Series UX QuickRemote QuickMemo QSlide QuickTranslator üRecognition for 43 languages and translate to 64 languages with Camera. Qvoice(voicemate) üYou can control TV, Cable box, Airconditioner and so on üYou can Memo and scrap through Quick button every screen. ex) During calling, you can Memo with Qmemo üInnovative Multitasking for Multiscreen and Multiaction. Ex) During Videos, you can see DMB or Memo. üYou can check Dictionary, Searching, Schedule, calling with voice. 9
    • Why use LG QuickRemote? At home, you have remote control for your TV, air conditioner, stereo and fan.. but they are not always there when you need them, are they? - QuickRemote features - QRemote SDK Learning - Feedback from You • throughout • networking • forum http://developer.lge.com/ Control home electronics from TV to air conditioner, all with QuickRemote 10
    • QuickRemote: What do? http://g2-event.lgmobile.com/ QuickRemote Control various home electronics 11
    • QuickRemote: Why quick? • Auto display at home • Noti-bar and Lockscreen widgets Knows when you are at home 12
    • QuickRemote: Rich functionality Enjoy diversity of devices. Adjust devices to your personal space. Multiple devices Space profile Learning function Magic remote Control from the bottom of your heart. Control smart content. 13
    • QuickRemote: TV/Cable-box features Simple control Macro button Favorite channels 14
    • QuickRemote: Setup flow 15
    • LG QRemote SDK • Overview • Sample App & API • Developer tips • Supporting devices • LG Developer site • Suggestions for SDK use cases
    • What can we do with LG QRemote SDK? Realize your Brilliant apps! • Customized UX design • Adding new features • Imagine you can do like this: from Template Review Articles of QuickRemote 17
    • Overview of LG QRemote SDK Content Provider LG QuickRemote 3rd Party App Device ID Device info QRemote APIs LG QRemote SDK IR Element IR Blaster IR Services Control Service * 3rd party app can access to Setup Service * accessible only through QuickRemote 18
    • Sample App & Major APIs Sample App UI Major APIs Device List Function List Adding device. Result: Success LG à TV à Power On à Success Log TextView Add/Delete a Device 19
    • Sample App & Major APIs Sample App UI Major APIs class IRBlaster Interface IRBlasterCallback getIRBlaster() IRBlasterReady() getDevices() newDeviceId() Device List Function List addDevices() sendIR() stopIR() Adding device. Result: Success LG à TV à Power On à Success close() TextView Log Refer to LG QRemote API Reference at http://developer.lge.com 20
    • Basic workflow Application • Creating a IRBlaster instance and binding IR Service: getIRBlaster() • Getting the Device information: getDevices() IRBlaster Class getIRBlaster() IR Services bindService() IRBlasterReady() getDevices() [list of devices] • Select a device and show a corresponding layout [list of devices] [select device] • Handling supported functions by a selected Device IControl.getDevice() [match functions]* sendIR() • Sending the IRSignals: sendIR() • Unbinding IR Service: close() [result] IControl.sendIR() [lresult] close() unbindService() * IRFunctionLabels in Revision 2 21
    • Match functions • Every device and brand may have different set of functions • Fake function Names: ex. Air-conditioner Real behavior: Temperature UP Raw function names: Skip Forward IRFunctionLabels in Revision 2 public public public public public public public static static static static static static static final final final final final final final String String String String String String String IR_FUNCTION_LABEL_TEMP_UP_AIRCON = "SKIP FORWARD"; IR_FUNCTION_LABEL_TEMP_DOWN_AIRCON = "SKIP REVERSE"; IR_FUNCTION_LABEL_FAN_AIRCON = "BLUE"; IR_FUNCTION_LABEL_FAN_UP_AIRCON = "PAGE -"; IR_FUNCTION_LABEL_FAN_DOWN_AIRCON = "FAVORITE"; IR_FUNCTION_LABEL_HORIZONTAL_SWING_AIRCON = "PIP INPUT"; IR_FUNCTION_LABEL_VERTICAL_SWING_AIRCON = "PIP ON"; VS 22
    • Match functions • Every device and brand may have different set of functions • Fake function Names: ex. Air-conditioner IRBlaster Class Application Buttons[i].Name == KeyFunctions[j].Name getDevices() [list of devices] Buttons[] View.setTag() [select Device] Buttons[i].Id = KeyFunctions[j].Id [match functions] Device +Id: int +KeyFunctions: list 0..1 KeyFunctions 0..* getFunctionKeyCode() public class IRFunctionLabels { public static final String IR_FUNCTION_LABEL_VOLUME_DOWN_TV = "VOLUME -"; public static final String IR_FUNCTION_LABEL_MUTE_TV = "MUTE"; … public static final String IR_FUNCTION_LABEL_POWER_TV = "POWER"; public static final String IR_FUNCTION_LABEL_POWER_ON_TV = "POWER ON"; IRFunction +Name: String +Id: int sendIR(…) [result] 23
    • Add device • Add device through QuickRemote and receive a notification through the registered callback: newDevice() • Handle relevant devices getIRBlaster(..) IRBlasterCallback +IRBlasterReady() +newDeviceId(int Id) public IRBlasterCallback mIrBlasterReadyCallback = new IRBlasterCallback() { @Override public void IRBlasterReady() { final Runnable r = new Runnable() { public void run() { getDevices(); } }; mHandler.post(r); mIR_ready = true; } @Override public void newDeviceId(int id) { Toast.makeText(…).show(); } }; IRBlaster Class Application IRBlasterReady() addDevice() newDevice(Id) [store Id] 24
    • Error handling retry • public static final int SUCCESS = 0; retry or warn • public static final int ERROR = 1; • public static final int SERVICES_NOT_READY = 9; if (resultCode == ResultCode.SERVICES_NOT_READY) { if (mRetries < MAXRETRIES /*3*/) { // wait for services ready try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } retries++; getIRBlaster(); } else { retries = 0; showFatalError(); } } • public static final int OUT_OF_MEMORY = 7; • public static final int ERROR_OPENING_DATABASE = 11; clean RAM/ROM ask a user to delete • public static final int MAXIMUM_DEVICES_REACHED = 8; devices warn: can’t delete • public static final int INVALID_AUTHENTICATION_KEY = 10; this device • public static final int DELETE_DEVICE_ERROR = 17; 25
    • Developer tips • Wait IRBlasterCallback.IRBlasterReady() • sendIR with 0 (continuous) or >250ms (~300ms) duration • Always call stopIR after sendIR with 0 duration • sendIR/stopIR in Handler • Handle multi-touch android:splitMotionEvents="false" • Portrait mode android:screenOrientation="portrait“ • Maximum devices allowed 96 (including 24 of QuickRemote) 26
    • Supporting Devices To be added... 27
    • Introduction LG DEVELOPER SITE 28
    • LG Developer Web Site • One-stop resource for all developer requirements for LG smart devices • http://developer.lge.com 29
    • SDK use cases OPPORTUNITIES 30
    • Open APIs sample • Make a difference using open APIs which provide useful information. What song is it? Useful info from web What programs on TV? Open APIs • Macros - One click, more actions - Call sendIRList() - Create your own macros! Eject tray TV on DVD on 31
    • Hybrid app sample • Reach web technologies + powerful phone features - Web UI can use LG QRemote APIs through Apache Cordova plugin • Development - Develop a web application with cordova.js - Call cordova.exec() to fetch QRemote APIs (If plugin is already ready) - Import the web application files into an Android application - Run the Android application on a LG phone 32
    • Widget sample <receiver android:name= AndroidManifest.xml "com.lge.example.sdkwidgettest.RemoteAppWidgetProvider"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> </intent-filter> <intent-filter> <action android:name="com.lge.example.sdkwidgettest.remote_widget_button_click"/> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/remote_appwidget_info"/> </receiver> remote_appwidget_info.xml <?xml version="1.0" encoding="utf-8"?> <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" android:minWidth="360dp" Widget can be added in android:minHeight="110dp" android:updatePeriodMillis="0" Keyguard or Home screen android:previewImage="@drawable/widget_preview" android:widgetCategory="keyguard" android:configure="com.lge.qremote.appwidget.RemoteAppWidgetDummyActivity" android:initialLayout="@layout/lockscreen_remocon_loading" > </appwidget-provider> RemoteAppWidgetProvider.java @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { RemoteViews views = new RemoteViews(context.getPackageName(), Widget main layout xml file R.layout.widget_main); Intent powerClickIntent = new Intent(WidgetApplication.BUTTON_CLICK); powerClickIntent.putExtra(BUTTON_TYPE, POWER); ... } 33
    • Partner’s use case 34
    • Suggestions for SDK use cases • Flexible UI (learn user behaviors) • Integrates SNS • Use full range of functions • Auto detection (camera) • Voice commands • Context aware apps – (geo-location): get local favorite channels – activity: adjust environment – auto-launch device specific layout 35
    • Going further • SDK revision 2 • Improvements
    • Fixes: Revision 2 • Add function label (IRFunctionLabels class) • Clean up unused API • Improve API description 37
    • Improvements • Quick setup • Learned functions • Export Content Provider • Hybrid app development guide 38