Douglas Ritter@doug_ritterGitHub: dougritter
Código de exemplo
github.com/dougritter/TDC-Wear
Contexto
Pinterest Conferência
Comandos de voz
Ações
Resposta para o
usuário
Ações
Ações
Notificações contextuais
Executar automaticamente
Glanceable
Contextual
Baixa interação
Notificações
Apps
Por onde começar?
Notificações
#androidwear
SEM RETRABALH
O
#androidwear
SEM RETRABALH
O
ResponderPaginaçãoCards
Notificações
Apps
Enviar dados
Interface customizad
a
Comando de Voz
Node
Data
Message
PendingResult<GetConnectedNodesResult> getConnectedNodes(GoogleApiClient);client);
Method
public interface NodeListener { void onPeerConnected(Node peer); void onPeerDisconnected(Node peer);}
Listener
Node
PendingResult<SendMessageResult> sendMessage(GoogleApiClient client, String nodeId, String action, byte[] data);
Method
public interface MessageListener { void onMessageReceived(MessageEvent messageEvent);}
Listener
Message
PendingResult<DataItemResult>putDataItem(GoogleApiClient client,
PutDataRequest request);
PendingResult<DataItemResult>getDataItem(GoogleApiClient client, Uri uri);
Methods
public interface DataListener { void onDataChanged(DataEventBuffer dataEvents);}
Listener
Data
<service android:name=".MyListenerService" ><intent-filter>
<action android:name="com.google.android.gms.wearable.BIND_LISTENER" /> </intent-filter></service>
Intent Filter
public class MyListenerService extends WearableListenerService { ...}
Service
Enviar dados Interface customizada
Comandos de voz
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.google.android.support:wearable:+' compile 'com.google.android.gms:play-services-wearable:+'}
build.gradle
Send data
Custom UI
Voice Actions
<activity android:name="MyNoteActivity"><intent-filter>
<action android:name="android.intent.action.SEND" /><category
android:name="com.google.android.voicesearch.SELF_NOTE" /></intent-filter>
</activity>
System provided voice action
● Chamar um taxi
● Tomar nota
● Seta um alarme
● Setar um timer
● Iniciar viagem
de bicicleta
● Iniciar uma
corrida
● Iniciar um
exercício
● Mostrar
batimentos
cardíacos
● Mostrar
quantidade de
passos
<activity android:name="StartRunActivity" android:label="MyRunningApp">
<intent-filter><action android:name="android.intent.action.MAIN" /><category
android:name="android.intent.category.LAUNCHER" /></intent-filter>
</activity>
App provided voice action
private void displaySpeechRecognizer() {Intent intent = new
Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
startActivityForResult(intent, SPEECH_REQUEST_CODE);}
Speech Recognizer
#androidwear
Notificações
Apps
Links?Getting Started
with Android Weardeveloper.android.com/
wear
Design for Android Wear
developer.android.com/design/wear
Adaptado de @eduardoscostaGDG Porto Alegre
Douglas Ritter @doug_ritterGitHub: dougritter
Obrigado :)
Top Related