/development/samples/browseable/RuntimePermissionsWear/Application/src/com.example.android.wearable.runtimepermissions/ |
D | IncomingRequestPhoneService.java | 61 DataMap dataMap = DataMap.fromByteArray(messageEvent.getData()); in onMessageReceived() local 62 int requestType = dataMap.getInt(Constants.KEY_COMM_TYPE, 0); in onMessageReceived() 79 DataMap dataMap = new DataMap(); in promptUserForStoragePermission() local 80 dataMap.putInt(Constants.KEY_COMM_TYPE, in promptUserForStoragePermission() 82 sendMessage(nodeId, dataMap); in promptUserForStoragePermission() 104 DataMap dataMap = new DataMap(); in respondWithStorageInformation() local 105 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithStorageInformation() 107 sendMessage(nodeId, dataMap); in respondWithStorageInformation() 131 DataMap dataMap = new DataMap(); in respondWithStorageInformation() local 132 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithStorageInformation() [all …]
|
D | MainPhoneActivity.java | 129 DataMap dataMap = new DataMap(); in onClickWearBodySensors() local 130 dataMap.putInt(Constants.KEY_COMM_TYPE, Constants.COMM_TYPE_REQUEST_DATA); in onClickWearBodySensors() 131 sendMessage(dataMap); in onClickWearBodySensors() 190 DataMap dataMap = new DataMap(); in onActivityResult() local 191 dataMap.putInt(Constants.KEY_COMM_TYPE, in onActivityResult() 193 sendMessage(dataMap); in onActivityResult() 270 DataMap dataMap = DataMap.fromByteArray(messageEvent.getData()); in onMessageReceived() local 272 int commType = dataMap.getInt(Constants.KEY_COMM_TYPE, 0); in onMessageReceived() 302 String storageDetails = dataMap.getString(Constants.KEY_PAYLOAD); in onMessageReceived() 324 private void sendMessage(DataMap dataMap) { in sendMessage() argument [all …]
|
/development/samples/browseable/RuntimePermissionsWear/Wearable/src/com.example.android.wearable.runtimepermissions/ |
D | IncomingRequestWearService.java | 69 DataMap dataMap = DataMap.fromByteArray(messageEvent.getData()); in onMessageReceived() local 71 int requestType = dataMap.getInt(Constants.KEY_COMM_TYPE); in onMessageReceived() 90 DataMap dataMap = new DataMap(); in promptUserForSensorPermission() local 91 dataMap.putInt(Constants.KEY_COMM_TYPE, in promptUserForSensorPermission() 93 sendMessage(dataMap); in promptUserForSensorPermission() 111 DataMap dataMap = new DataMap(); in respondWithSensorInformation() local 112 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithSensorInformation() 114 sendMessage(dataMap); in respondWithSensorInformation() 124 DataMap dataMap = new DataMap(); in respondWithSensorInformation() local 125 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithSensorInformation() [all …]
|
D | MainWearActivity.java | 167 DataMap dataMap = new DataMap(); in onClickPhoneStorage() local 168 dataMap.putInt(Constants.KEY_COMM_TYPE, in onClickPhoneStorage() 170 sendMessage(dataMap); in onClickPhoneStorage() 348 DataMap dataMap = new DataMap(); in onRequestPermissionsResult() local 349 dataMap.putInt(Constants.KEY_COMM_TYPE, in onRequestPermissionsResult() 351 sendMessage(dataMap); in onRequestPermissionsResult() 364 DataMap dataMap = new DataMap(); in onRequestPermissionsResult() local 365 dataMap.putInt(Constants.KEY_COMM_TYPE, in onRequestPermissionsResult() 367 sendMessage(dataMap); in onRequestPermissionsResult() 380 DataMap dataMap = DataMap.fromByteArray(messageEvent.getData()); in onMessageReceived() local [all …]
|
/development/samples/browseable/Quiz/Application/src/com.example.android.wearable.quiz/ |
D | MainActivity.java | 164 DataMap dataMap = new DataMap(); in onStop() local 165 dataMap.putInt(NUM_CORRECT, mNumCorrect); in onStop() 166 dataMap.putInt(NUM_INCORRECT, mNumIncorrect); in onStop() 171 dataMap.putInt(NUM_SKIPPED, mNumSkipped); in onStop() 173 sendMessageToWearable(QUIZ_EXITED_PATH, dataMap.toByteArray()); in onStop() 246 DataMap dataMap = request.getDataMap(); in toPutDataRequest() local 247 dataMap.putString(QUESTION, question); in toPutDataRequest() 248 dataMap.putInt(QUESTION_INDEX, questionIndex); in toPutDataRequest() 249 dataMap.putStringArray(ANSWERS, answers); in toPutDataRequest() 250 dataMap.putInt(CORRECT_ANSWER_INDEX, correctAnswerIndex); in toPutDataRequest() [all …]
|
/development/samples/browseable/Quiz/Wearable/src/com.example.android.wearable.quiz/ |
D | QuizListenerService.java | 96 DataMap dataMap = DataMapItem.fromDataItem(dataItem).getDataMap(); in onDataChanged() local 97 if (dataMap.getBoolean(QUESTION_WAS_ANSWERED) in onDataChanged() 98 || dataMap.getBoolean(QUESTION_WAS_DELETED)) { in onDataChanged() 103 String question = dataMap.getString(QUESTION); in onDataChanged() 104 int questionIndex = dataMap.getInt(QUESTION_INDEX); in onDataChanged() 106 String[] answers = dataMap.getStringArray(ANSWERS); in onDataChanged() 107 int correctAnswerIndex = dataMap.getInt(CORRECT_ANSWER_INDEX); in onDataChanged() 175 DataMap dataMap = DataMap.fromByteArray(messageEvent.getData()); in onMessageReceived() local 176 int numCorrect = dataMap.getInt(NUM_CORRECT); in onMessageReceived() 177 int numIncorrect = dataMap.getInt(NUM_INCORRECT); in onMessageReceived() [all …]
|
D | UpdateQuestionService.java | 82 DataMap dataMap = putDataMapRequest.getDataMap(); in onHandleIntent() local 87 dataMap.putInt(QUESTION_INDEX, questionIndex); in onHandleIntent() 88 dataMap.putBoolean(CHOSEN_ANSWER_CORRECT, chosenAnswerCorrect); in onHandleIntent() 89 dataMap.putBoolean(QUESTION_WAS_ANSWERED, true); in onHandleIntent()
|
D | DeleteQuestionService.java | 76 DataMap dataMap = putDataMapRequest.getDataMap(); in onHandleIntent() local 77 dataMap.putBoolean(QUESTION_WAS_DELETED, true); in onHandleIntent()
|
/development/samples/browseable/SpeedTracker/Application/src/com.example.android.wearable.speedtracker/db/ |
D | UpdateService.java | 80 DataMap dataMap = DataMapItem.fromDataItem(dataEvent.getDataItem()) in onDataChanged() local 82 double longitude = dataMap.getDouble(Constants.KEY_LONGITUDE); in onDataChanged() 83 double latitude = dataMap.getDouble(Constants.KEY_LATITUDE); in onDataChanged() 84 long time = dataMap.getLong(Constants.KEY_TIME); in onDataChanged()
|
/development/samples/browseable/SynchronizedNotifications/Wearable/src/com.example.android.wearable.synchronizednotifications/ |
D | NotificationUpdateService.java | 94 DataMap dataMap = DataMapItem.fromDataItem(dataEvent.getDataItem()).getDataMap(); in onDataChanged() local 95 String content = dataMap.getString(Constants.KEY_CONTENT); in onDataChanged() 96 String title = dataMap.getString(Constants.KEY_TITLE); in onDataChanged()
|
/development/samples/browseable/DataLayer/Application/src/com.example.android.wearable.datalayer/ |
D | MainActivity.java | 330 PutDataMapRequest dataMap = PutDataMapRequest.create(IMAGE_PATH); in sendPhoto() local 331 dataMap.getDataMap().putAsset(IMAGE_KEY, asset); in sendPhoto() 332 dataMap.getDataMap().putLong("time", new Date().getTime()); in sendPhoto() 333 PutDataRequest request = dataMap.asPutDataRequest(); in sendPhoto()
|
/development/samples/browseable/XYZTouristAttractions/Application/src/com.example.android.xyztouristattractions/service/ |
D | UtilityService.java | 475 PutDataMapRequest dataMap = PutDataMapRequest.create(Constants.ATTRACTION_PATH); in sendDataToWearable() local 476 dataMap.getDataMap().putDataMapArrayList(Constants.EXTRA_ATTRACTIONS, attractionsData); in sendDataToWearable() 477 dataMap.getDataMap().putLong(Constants.EXTRA_TIMESTAMP, new Date().getTime()); in sendDataToWearable() 478 PutDataRequest request = dataMap.asPutDataRequest(); in sendDataToWearable()
|