Home
last modified time | relevance | path

Searched refs:mGoogleApiClient (Results 1 – 25 of 33) sorted by relevance

12

/development/samples/browseable/DelayedConfirmation/Application/src/com.example.android.wearable.delayedconfirmation/
DMainActivity.java44 private GoogleApiClient mGoogleApiClient; field in MainActivity
50 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
60 if (!mGoogleApiClient.isConnected()) { in onResume()
61 mGoogleApiClient.connect(); in onResume()
67 if (mGoogleApiClient.isConnected()) { in onDestroy()
68 mGoogleApiClient.disconnect(); in onDestroy()
75 Wearable.MessageApi.addListener(mGoogleApiClient, this); in onConnected()
80 Wearable.MessageApi.removeListener(mGoogleApiClient, this); in onConnectionSuspended()
110 Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).setResultCallback( in onStartWearableActivityClick()
115 Wearable.MessageApi.sendMessage(mGoogleApiClient, node.getId(), in onStartWearableActivityClick()
/development/samples/browseable/WatchFace/Application/src/com.example.android.wearable.watchface/
DFitDistanceWatchFaceConfigActivity.java55 private GoogleApiClient mGoogleApiClient; field in FitDistanceWatchFaceConfigActivity
78 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
92 if ((mFitEnabled) && (mGoogleApiClient != null)) { in onStart()
97 mGoogleApiClient.connect(); in onStart()
110 if ((mGoogleApiClient != null) && (mGoogleApiClient.isConnected())) { in onStop()
111 mGoogleApiClient.disconnect(); in onStop()
141 if (!mGoogleApiClient.isConnecting() && !mGoogleApiClient.isConnected()) { in onActivityResult()
142 mGoogleApiClient.connect(); in onActivityResult()
203 if ((mGoogleApiClient != null) && (!mGoogleApiClient.isConnected())) { in onSwitchClicked()
204 mGoogleApiClient.connect(); in onSwitchClicked()
[all …]
DDigitalWatchFaceCompanionConfigActivity.java59 private GoogleApiClient mGoogleApiClient; field in DigitalWatchFaceCompanionConfigActivity
68 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
83 mGoogleApiClient.connect(); in onStart()
88 if (mGoogleApiClient != null && mGoogleApiClient.isConnected()) { in onStop()
89 mGoogleApiClient.disconnect(); in onStop()
103 Wearable.DataApi.getDataItem(mGoogleApiClient, uri).setResultCallback(this); in onConnected()
209 Wearable.MessageApi.sendMessage(mGoogleApiClient, mPeerId, PATH_WITH_FEATURE, rawData); in sendConfigUpdateMessage()
/development/samples/browseable/FindMyPhone/Wearable/src/com.example.android.wearable.findphone/
DDisconnectListenerService.java55 private GoogleApiClient mGoogleApiClient; field in DisconnectListenerService
60 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
70 if (mGoogleApiClient.isConnected()) { in onConnectedNodes()
72 } else if (!mGoogleApiClient.isConnecting()) { in onConnectedNodes()
73 mGoogleApiClient.connect(); in onConnectedNodes()
79 mGoogleApiClient, FIND_ME_CAPABILITY_NAME, in setOrUpdateNotification()
140 if (mGoogleApiClient.isConnected() || mGoogleApiClient.isConnecting()) { in onDestroy()
141 mGoogleApiClient.disconnect(); in onDestroy()
DFindPhoneService.java48 private GoogleApiClient mGoogleApiClient; field in FindPhoneService
57 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
66 mGoogleApiClient.blockingConnect(CONNECTION_TIME_OUT_MS, TimeUnit.MILLISECONDS); in onHandleIntent()
70 if (mGoogleApiClient.isConnected()) { in onHandleIntent()
75 DataItemBuffer result = Wearable.DataApi.getDataItems(mGoogleApiClient).await(); in onHandleIntent()
104 Wearable.DataApi.putDataItem(mGoogleApiClient, putDataMapRequest.asPutDataRequest()) in onHandleIntent()
110 mGoogleApiClient.disconnect(); in onHandleIntent()
/development/samples/browseable/Quiz/Wearable/src/com.example.android.wearable.quiz/
DDeleteQuestionService.java47 private GoogleApiClient mGoogleApiClient; field in DeleteQuestionService
56 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
65 mGoogleApiClient.blockingConnect(CONNECT_TIMEOUT_MS, TimeUnit.MILLISECONDS); in onHandleIntent()
67 if (!mGoogleApiClient.isConnected()) { in onHandleIntent()
73 mGoogleApiClient, dataItemUri).await(); in onHandleIntent()
80 Wearable.DataApi.putDataItem(mGoogleApiClient, request).await(); in onHandleIntent()
81 mGoogleApiClient.disconnect(); in onHandleIntent()
DUpdateQuestionService.java53 private GoogleApiClient mGoogleApiClient; field in UpdateQuestionService
62 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
71 mGoogleApiClient.blockingConnect(TIME_OUT_MS, TimeUnit.MILLISECONDS); in onHandleIntent()
73 if (!mGoogleApiClient.isConnected()) { in onHandleIntent()
79 mGoogleApiClient, dataItemUri).await(); in onHandleIntent()
92 Wearable.DataApi.putDataItem(mGoogleApiClient, request).await(); in onHandleIntent()
96 mGoogleApiClient.disconnect(); in onHandleIntent()
/development/samples/browseable/DataLayer/Wearable/src/com.example.android.wearable.datalayer/
DDataLayerListenerService.java45 GoogleApiClient mGoogleApiClient; field in DataLayerListenerService
50 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
53 mGoogleApiClient.connect(); in onCreate()
59 if (!mGoogleApiClient.isConnected() || !mGoogleApiClient.isConnecting()) { in onDataChanged()
60 ConnectionResult connectionResult = mGoogleApiClient in onDataChanged()
81 Wearable.MessageApi.sendMessage(mGoogleApiClient, nodeId, DATA_ITEM_RECEIVED_PATH, in onDataChanged()
DMainActivity.java91 private GoogleApiClient mGoogleApiClient; field in MainActivity
102 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
112 mGoogleApiClient.connect(); in onResume()
117 if ((mGoogleApiClient != null) && mGoogleApiClient.isConnected()) { in onPause()
118 Wearable.DataApi.removeListener(mGoogleApiClient, this); in onPause()
119 Wearable.MessageApi.removeListener(mGoogleApiClient, this); in onPause()
120 Wearable.CapabilityApi.removeListener(mGoogleApiClient, this); in onPause()
121 mGoogleApiClient.disconnect(); in onPause()
130 Wearable.DataApi.addListener(mGoogleApiClient, this); in onConnected()
131 Wearable.MessageApi.addListener(mGoogleApiClient, this); in onConnected()
[all …]
/development/samples/browseable/Geofencing/Application/src/com.example.android.wearable.geofencing/
DGeofenceTransitionsIntentService.java49 private GoogleApiClient mGoogleApiClient; field in GeofenceTransitionsIntentService
58 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
81 mGoogleApiClient.blockingConnect(CONNECTION_TIME_OUT_MS, TimeUnit.MILLISECONDS); in onHandleIntent()
93 if (mGoogleApiClient.isConnected()) { in onHandleIntent()
95 mGoogleApiClient, putDataMapRequest.asPutDataRequest()).await(); in onHandleIntent()
102 mGoogleApiClient.disconnect(); in onHandleIntent()
105 mGoogleApiClient.blockingConnect(CONNECTION_TIME_OUT_MS, TimeUnit.MILLISECONDS); in onHandleIntent()
106 Wearable.DataApi.deleteDataItems(mGoogleApiClient, GEOFENCE_DATA_ITEM_URI).await(); in onHandleIntent()
108 mGoogleApiClient.disconnect(); in onHandleIntent()
/development/samples/browseable/WatchFace/Wearable/src/com.example.android.wearable.watchface/
DDigitalWatchFaceConfigListenerService.java39 private GoogleApiClient mGoogleApiClient; field in DigitalWatchFaceConfigListenerService
59 if (mGoogleApiClient == null) { in onMessageReceived()
60 mGoogleApiClient = new GoogleApiClient.Builder(this).addConnectionCallbacks(this) in onMessageReceived()
63 if (!mGoogleApiClient.isConnected()) { in onMessageReceived()
65 mGoogleApiClient.blockingConnect(30, TimeUnit.SECONDS); in onMessageReceived()
73 DigitalWatchFaceUtil.overwriteKeysInConfigDataMap(mGoogleApiClient, configKeysToOverwrite); in onMessageReceived()
/development/samples/browseable/DataLayer/Application/src/com.example.android.wearable.datalayer/
DMainActivity.java95 private GoogleApiClient mGoogleApiClient; field in MainActivity
125 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
136 mGoogleApiClient.connect(); in onStart()
155 if (!mResolvingError && (mGoogleApiClient != null) && (mGoogleApiClient.isConnected())) { in onStop()
156 Wearable.DataApi.removeListener(mGoogleApiClient, this); in onStop()
157 Wearable.MessageApi.removeListener(mGoogleApiClient, this); in onStop()
158 Wearable.CapabilityApi.removeListener(mGoogleApiClient, this); in onStop()
159 mGoogleApiClient.disconnect(); in onStop()
179 Wearable.DataApi.addListener(mGoogleApiClient, this); in onConnected()
180 Wearable.MessageApi.addListener(mGoogleApiClient, this); in onConnected()
[all …]
/development/samples/browseable/AgendaData/Application/src/com.example.android.wearable.agendadata/
DMainActivity.java63 private GoogleApiClient mGoogleApiClient; field in MainActivity
81 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
92 mGoogleApiClient.connect(); in onStart()
98 if (mGoogleApiClient != null && mGoogleApiClient.isConnected()) { in onStop()
99 mGoogleApiClient.disconnect(); in onStop()
191 if (mGoogleApiClient.isConnected()) { in onDeleteEventsClicked()
192 Wearable.DataApi.getDataItems(mGoogleApiClient) in onDeleteEventsClicked()
217 if (mGoogleApiClient.isConnected()) { in deleteDataItems()
225 Wearable.DataApi.deleteDataItems(mGoogleApiClient, dataItemUri) in deleteDataItems()
274 mGoogleApiClient.connect(); in onConnectionFailed()
[all …]
/development/samples/browseable/DelayedConfirmation/Wearable/src/com.example.android.wearable.delayedconfirmation/
DMainActivity.java54 private GoogleApiClient mGoogleApiClient; field in MainActivity
65 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
75 if (!mGoogleApiClient.isConnected()) { in onResume()
76 mGoogleApiClient.connect(); in onResume()
82 if (mGoogleApiClient.isConnected()) { in onPause()
83 Wearable.CapabilityApi.removeCapabilityListener(mGoogleApiClient, this, in onPause()
85 mGoogleApiClient.disconnect(); in onPause()
133 Wearable.MessageApi.sendMessage(mGoogleApiClient, mConfirmationHandlerNode.getId(), in sendMessageToCompanion()
158 mGoogleApiClient, this, CONFIRMATION_HANDLER_CAPABILITY_NAME);
161 mGoogleApiClient, CONFIRMATION_HANDLER_CAPABILITY_NAME,
/development/samples/browseable/Geofencing/Wearable/src/com.example.android.wearable.geofencing/
DCheckInAndDeleteDataItemsService.java47 private GoogleApiClient mGoogleApiClient; field in CheckInAndDeleteDataItemsService
56 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
81 mGoogleApiClient.blockingConnect(CONNECTION_TIME_OUT_MS, TimeUnit.MILLISECONDS); in onHandleIntent()
83 if (mGoogleApiClient.isConnected()) { in onHandleIntent()
85 .deleteDataItems(mGoogleApiClient, dataItemUri).await(); in onHandleIntent()
96 mGoogleApiClient.disconnect(); in onHandleIntent()
/development/samples/browseable/WearVerifyRemoteApp/Wearable/src/com.example.android.wearable.wear.wearverifyremoteapp/
DMainWearActivity.java108 private GoogleApiClient mGoogleApiClient; field in MainWearActivity
130 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
143 if ((mGoogleApiClient != null) && mGoogleApiClient.isConnected()) { in onPause()
145 mGoogleApiClient, in onPause()
149 mGoogleApiClient.disconnect(); in onPause()
157 if (mGoogleApiClient != null) { in onResume()
158 mGoogleApiClient.connect(); in onResume()
168 mGoogleApiClient, in onConnected()
200 mGoogleApiClient, in checkIfPhoneHasApp()
/development/samples/browseable/RuntimePermissionsWear/Application/src/com.example.android.wearable.runtimepermissions/
DMainPhoneActivity.java91 private GoogleApiClient mGoogleApiClient; field in MainPhoneActivity
118 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
150 if ((mGoogleApiClient != null) && (mGoogleApiClient.isConnected())) { in onPause()
152 mGoogleApiClient, in onPause()
155 Wearable.MessageApi.removeListener(mGoogleApiClient, this); in onPause()
156 mGoogleApiClient.disconnect(); in onPause()
177 if (mGoogleApiClient != null) { in onResume()
178 mGoogleApiClient.connect(); in onResume()
204 mGoogleApiClient, in onConnected()
207 Wearable.MessageApi.addListener(mGoogleApiClient, this); in onConnected()
[all …]
/development/samples/browseable/AgendaData/Wearable/src/com.example.android.wearable.agendadata/
DDeleteService.java45 private GoogleApiClient mGoogleApiClient; field in DeleteService
54 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
63 mGoogleApiClient.blockingConnect(TIME_OUT, TimeUnit.MILLISECONDS); in onHandleIntent()
68 if (mGoogleApiClient.isConnected()) { in onHandleIntent()
70 .deleteDataItems(mGoogleApiClient, dataItemUri).await(); in onHandleIntent()
95 mGoogleApiClient.disconnect(); in onHandleIntent()
/development/samples/browseable/WearVerifyRemoteApp/Application/src/com.example.android.wearable.wear.wearverifyremoteapp/
DMainMobileActivity.java126 private GoogleApiClient mGoogleApiClient; field in MainMobileActivity
146 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
159 if ((mGoogleApiClient != null) && mGoogleApiClient.isConnected()) { in onPause()
162 mGoogleApiClient, in onPause()
166 mGoogleApiClient.disconnect(); in onPause()
174 if (mGoogleApiClient != null) { in onResume()
175 mGoogleApiClient.connect(); in onResume()
185 mGoogleApiClient, in onConnected()
231 mGoogleApiClient, in findWearDevicesWithApp()
256 Wearable.NodeApi.getConnectedNodes(mGoogleApiClient); in findAllWearDevices()
/development/samples/browseable/SpeedTracker/Wearable/src/com.example.android.wearable.speedtracker/
DWearableMainActivity.java108 private GoogleApiClient mGoogleApiClient; field in WearableMainActivity
194 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
205 if ((mGoogleApiClient != null) && (mGoogleApiClient.isConnected()) && in onPause()
206 (mGoogleApiClient.isConnecting())) { in onPause()
207 LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this); in onPause()
208 mGoogleApiClient.disconnect(); in onPause()
216 if (mGoogleApiClient != null) { in onResume()
217 mGoogleApiClient.connect(); in onResume()
356 .requestLocationUpdates(mGoogleApiClient, locationRequest, this) in requestLocation()
381 LocationServices.FusedLocationApi.removeLocationUpdates(mGoogleApiClient, this); in onConnectionSuspended()
[all …]
/development/samples/browseable/Quiz/Application/src/com.example.android.wearable.quiz/
DMainActivity.java102 private GoogleApiClient mGoogleApiClient; field in MainActivity
128 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
152 if (!mGoogleApiClient.isConnected()) { in onStart()
153 mGoogleApiClient.connect(); in onStart()
159 Wearable.DataApi.removeListener(mGoogleApiClient, this); in onStop()
160 Wearable.MessageApi.removeListener(mGoogleApiClient, this); in onStop()
182 Wearable.DataApi.addListener(mGoogleApiClient, this); in onConnected()
183 Wearable.MessageApi.addListener(mGoogleApiClient, this); in onConnected()
305 Wearable.DataApi.putDataItem(mGoogleApiClient, question.toPutDataRequest()); in addQuestionDataItem()
409 Wearable.DataApi.putDataItem(mGoogleApiClient, in askNextQuestionIfExists()
[all …]
/development/samples/browseable/SynchronizedNotifications/Application/src/com.example.android.wearable.synchronizednotifications/
DSynchronizedNotificationsFragment.java59 private GoogleApiClient mGoogleApiClient; field in SynchronizedNotificationsFragment
64 mGoogleApiClient = new GoogleApiClient.Builder(this.getActivity()) in onCreate()
124 if (mGoogleApiClient.isConnected()) { in buildWearableOnlyNotification()
130 Wearable.DataApi.putDataItem(mGoogleApiClient, request) in buildWearableOnlyNotification()
156 if (mGoogleApiClient.isConnected()) { in buildMirroredNotifications()
168 mGoogleApiClient.connect(); in onStart()
173 mGoogleApiClient.disconnect(); in onStop()
DDismissListener.java46 private GoogleApiClient mGoogleApiClient; field in DismissListener
51 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
97 mGoogleApiClient.connect(); in dismissWearableNotification()
108 mGoogleApiClient, dataItemUri).setResultCallback(this); in onConnected()
125 mGoogleApiClient.disconnect(); in onResult()
/development/samples/browseable/SpeedTracker/Application/src/com.example.android.wearable.speedtracker/db/
DUpdateService.java53 private GoogleApiClient mGoogleApiClient; field in UpdateService
62 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
67 mGoogleApiClient.connect(); in onCreate()
89 if (mGoogleApiClient.isConnected()) { in onDataChanged()
91 mGoogleApiClient, dataItemUri).setResultCallback(this); in onDataChanged()
111 mGoogleApiClient, dataItemUri).setResultCallback(this); in onConnected()
/development/samples/browseable/RuntimePermissionsWear/Wearable/src/com.example.android.wearable.runtimepermissions/
DMainWearActivity.java91 private GoogleApiClient mGoogleApiClient; field in MainWearActivity
136 mGoogleApiClient = new GoogleApiClient.Builder(this) in onCreate()
177 if ((mGoogleApiClient != null) && mGoogleApiClient.isConnected()) { in onPause()
179 mGoogleApiClient, in onPause()
182 Wearable.MessageApi.removeListener(mGoogleApiClient, this); in onPause()
183 mGoogleApiClient.disconnect(); in onPause()
191 if (mGoogleApiClient != null) { in onResume()
192 mGoogleApiClient.connect(); in onResume()
270 mGoogleApiClient, in onConnected()
273 Wearable.MessageApi.addListener(mGoogleApiClient, this); in onConnected()
[all …]

12