Samsung Gear SDK

Post on 15-May-2015

3.657 views 3 download

Tags:

description

Read more: http://j.mp/1d73ZEN

Transcript of Samsung Gear SDK

PART 01

PART 02

PART 03

PART 04

Wearable Application Development Guide

API Reference and Programming Guides accesssory.jar

Integration Guidelines

UI Guidelines for Web App Development

HelloGear

SDK

SDK

SDK

PART 02

Gear

SA.initialize()

SAAgent.findPeerAgents()

SAAgent.onFindPeerAgentResponse()

SAAgent.requestServiceConnection()

SASocket.send()

SASocket.close()

SA.initialize()

SAAgent.onServiceConnectionResponse()

SASocket.onReceive()

<uses-permission

android:name />

<tizen:privilege name=

"http://developer.samsung.com

/privilege/accessoryprotocol"/>

function () {

window.addEventListener( 'tizenhwkey', function( ev ) {

if( ev.keyName == "back" ) {

var page = document.getElementsByClassName( 'ui-page-active' )[0],

pageid = page ? page.id : "";

if( pageid === "main" ) {

tizen.application.getCurrentApplication().exit();

} else {

window.history.back();

}

}

} );

}

API set includes device specific (sensors), industry standard (media), and UI widgets

Jquery.js, Hammer.js, etc

PART 03

% sdb devices % sdb shell % sdb help

PART 04

Android App != Gear App

Take advantage of swiping motions

Build for Offline Mode

PART 01

PART 02

PART 03

PART 1

PART 02

PART 03

C U P

Gear Fit Application (Android API)

TextClock DatePicker TimePicker

Slider ThumbnailListBox Media Controller

Button Graph Spinner

Label ProgressBar ListBox

public class FirstDialog extends ScupDialog { private RankingDialog mRankingDialog; private MyMovieDialog myDialog; private final Context mContext; public FirstDialog(Context context) { super(context); mContext = context; } public void onCreate() { super.onCreate(); setControlAlignment(ScupDialog.CONTROL_ALIGN_HORIZONTAL_CENTER | ScupDialog.CONTROL_ALIGN_VERTICAL_CENTER); ScupButton button1 = new ScupButtonControl(this); button1.setIcon(R.drawable.reserve_click); button1.setText(“Booking"); button1.setTextSize(6); button1.setAlignment(ScupButton.ALIGN_ICON_ABOVE); button1.setClickListener(new ScupButton.ClickListener() { public void onClick(ScupButton button) { if (mRankingDialog != null) { mRankingDialog.finish(); } // Create movie selection dialog mRankingDialog = new ScupDialog(mContext); … } }; button1.show(); … } }

ScupButton button1 = new ScupButtonControl(this); button1.setIcon(R.drawable.reserve_click); button1.setText(“Booking"); button1.setTextSize(6); button1.setAlignment(ScupButton.ALIGN_ICON_ABOVE); button1.setClickListener(new ScupButton.ClickListener() {

public class FirstDialog extends ScupDialog { private RankingDialog mRankingDialog; private MyMovieDialog myDialog; private final Context mContext; public FirstDialog(Context context) { super(context); mContext = context; } public void onCreate() { super.onCreate(); setControlAlignment(ScupDialog.CONTROL_ALIGN_HORIZONTAL_CENTER | ScupDialog.CONTROL_ALIGN_VERTICAL_CENTER); ScupButton button1 = new ScupButtonControl(this); button1.setIcon(R.drawable.reserve_click); button1.setText(“Booking"); button1.setTextSize(6); button1.setAlignment(ScupButton.ALIGN_ICON_ABOVE); button1.setClickListener(new ScupButton.ClickListener() { public void onClick(ScupButton button) { if (mRankingDialog != null) { mRankingDialog.finish(); } // Create movie selection dialog mRankingDialog = new ScupDialog(mContext); … } }; button1.show(); … } }

// Create movie selection dialog mRankingDialog = new ScupDialog(mContext); ...