/developers/samples/android/deprecated/wearable/wear/RecipeAssistant/Application/src/main/java/com/example/android/wearable/recipeassistant/ |
D | Recipe.java | 45 bundle.putString(Constants.RECIPE_FIELD_STEP_TEXT, stepText); in toBundle() 46 bundle.putString(Constants.RECIPE_FIELD_STEP_IMAGE, stepImage); in toBundle() 52 recipeStep.stepText = bundle.getString(Constants.RECIPE_FIELD_STEP_TEXT); in fromBundle() 53 recipeStep.stepImage = bundle.getString(Constants.RECIPE_FIELD_STEP_IMAGE); in fromBundle() 66 recipe.titleText = json.getString(Constants.RECIPE_FIELD_TITLE); in fromJson() 67 recipe.summaryText = json.getString(Constants.RECIPE_FIELD_SUMMARY); in fromJson() 68 if (json.has(Constants.RECIPE_FIELD_IMAGE)) { in fromJson() 69 recipe.recipeImage = json.getString(Constants.RECIPE_FIELD_IMAGE); in fromJson() 71 JSONArray ingredients = json.getJSONArray(Constants.RECIPE_FIELD_INGREDIENTS); in fromJson() 75 … + ingredients.getJSONObject(i).getString(Constants.RECIPE_FIELD_TEXT) + "\n"; in fromJson() [all …]
|
D | RecipeListAdapter.java | 57 JSONObject jsonObject = AssetUtils.loadJSONAsset(mContext, Constants.RECIPE_LIST_FILE); in loadRecipeList() 67 JSONArray items = json.getJSONArray(Constants.RECIPE_FIELD_LIST); in parseJson() 71 parsed.name = item.getString(Constants.RECIPE_FIELD_NAME); in parseJson() 72 parsed.title = item.getString(Constants.RECIPE_FIELD_TITLE); in parseJson() 73 if (item.has(Constants.RECIPE_FIELD_IMAGE)) { in parseJson() 74 String imageFile = item.getString(Constants.RECIPE_FIELD_IMAGE); in parseJson() 77 parsed.summary = item.getString(Constants.RECIPE_FIELD_SUMMARY); in parseJson()
|
D | RecipeService.java | 53 if (intent.getAction().equals(Constants.ACTION_START_COOKING)) { in onStartCommand() 61 mRecipe = Recipe.fromBundle(intent.getBundleExtra(Constants.EXTRA_RECIPE)); in createNotification() 83 Constants.NOTIFICATION_IMAGE_WIDTH, Constants.NOTIFICATION_IMAGE_HEIGHT, false); in createNotification() 94 mNotificationManager.notify(Constants.NOTIFICATION_ID, notification); in createNotification()
|
/developers/samples/android/deprecated/wearable/wear/SynchronizedNotifications/Wearable/src/main/java/com/example/android/wearable/synchronizednotifications/ |
D | NotificationUpdateService.java | 29 import com.example.android.wearable.synchronizednotifications.common.Constants; 68 if (Constants.ACTION_DISMISS.equals(action)) { in onStartCommand() 71 int notificationId = intent.getIntExtra(Constants.KEY_NOTIFICATION_ID, -1); in onStartCommand() 72 if (notificationId == Constants.BOTH_ID) { in onStartCommand() 95 String content = dataMap.getString(Constants.KEY_CONTENT); in onDataChanged() 96 String title = dataMap.getString(Constants.KEY_TITLE); in onDataChanged() 97 if (Constants.WATCH_ONLY_PATH.equals(dataEvent.getDataItem().getUri().getPath())) { in onDataChanged() 99 } else if (Constants.BOTH_PATH.equals(dataEvent.getDataItem().getUri().getPath())) { in onDataChanged() 106 if (Constants.BOTH_PATH.equals(dataEvent.getDataItem().getUri().getPath())) { in onDataChanged() 109 .cancel(Constants.WATCH_ONLY_ID); in onDataChanged() [all …]
|
/developers/samples/android/wearable/wear/RuntimePermissionsWear/Application/src/main/java/com/example/android/wearable/runtimepermissions/ |
D | IncomingRequestPhoneService.java | 27 import com.example.android.wearable.runtimepermissions.common.Constants; 57 if (messagePath.equals(Constants.MESSAGE_PATH_PHONE)) { in onMessageReceived() 60 int requestType = dataMap.getInt(Constants.KEY_COMM_TYPE, 0); in onMessageReceived() 62 if (requestType == Constants.COMM_TYPE_REQUEST_PROMPT_PERMISSION) { in onMessageReceived() 65 } else if (requestType == Constants.COMM_TYPE_REQUEST_DATA) { in onMessageReceived() 78 dataMap.putInt(Constants.KEY_COMM_TYPE, in promptUserForStoragePermission() 79 Constants.COMM_TYPE_RESPONSE_USER_APPROVED_PERMISSION); in promptUserForStoragePermission() 103 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithStorageInformation() 104 Constants.COMM_TYPE_RESPONSE_PERMISSION_REQUIRED); in respondWithStorageInformation() 130 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithStorageInformation() [all …]
|
D | MainPhoneActivity.java | 34 import com.example.android.wearable.runtimepermissions.common.Constants; 115 dataMap.putInt(Constants.KEY_COMM_TYPE, Constants.COMM_TYPE_REQUEST_DATA); in onClickWearBodySensors() 161 this, Constants.CAPABILITY_WEAR_APP); in onResume() 165 .getCapability(Constants.CAPABILITY_WEAR_APP, CapabilityClient.FILTER_REACHABLE); in onResume() 177 capabilityName.equals(Constants.CAPABILITY_WEAR_APP); in onResume() 213 dataMap.putInt(Constants.KEY_COMM_TYPE, in onActivityResult() 214 Constants.COMM_TYPE_REQUEST_PROMPT_PERMISSION); in onActivityResult() 231 if (messagePath.equals(Constants.MESSAGE_PATH_PHONE)) { in onMessageReceived() 234 int commType = dataMap.getInt(Constants.KEY_COMM_TYPE, 0); in onMessageReceived() 236 if (commType == Constants.COMM_TYPE_RESPONSE_PERMISSION_REQUIRED) { in onMessageReceived() [all …]
|
/developers/samples/android/wearable/wear/RuntimePermissionsWear/Wearable/src/main/java/com/example/android/wearable/runtimepermissions/ |
D | IncomingRequestWearService.java | 28 import com.example.android.wearable.runtimepermissions.common.Constants; 65 if (messagePath.equals(Constants.MESSAGE_PATH_WEAR)) { in onMessageReceived() 68 int requestType = dataMap.getInt(Constants.KEY_COMM_TYPE); in onMessageReceived() 70 if (requestType == Constants.COMM_TYPE_REQUEST_PROMPT_PERMISSION) { in onMessageReceived() 73 } else if (requestType == Constants.COMM_TYPE_REQUEST_DATA) { in onMessageReceived() 88 dataMap.putInt(Constants.KEY_COMM_TYPE, in promptUserForSensorPermission() 89 Constants.COMM_TYPE_RESPONSE_USER_APPROVED_PERMISSION); in promptUserForSensorPermission() 109 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithSensorInformation() 110 Constants.COMM_TYPE_RESPONSE_PERMISSION_REQUIRED); in respondWithSensorInformation() 122 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithSensorInformation() [all …]
|
D | MainWearActivity.java | 35 import com.example.android.wearable.runtimepermissions.common.Constants; 153 dataMap.putInt(Constants.KEY_COMM_TYPE, in onClickPhoneStorage() 154 Constants.COMM_TYPE_REQUEST_DATA); in onClickPhoneStorage() 177 this, Constants.CAPABILITY_PHONE_APP); in onResume() 181 .getCapability(Constants.CAPABILITY_PHONE_APP, CapabilityClient.FILTER_REACHABLE); in onResume() 265 dataMap.putInt(Constants.KEY_COMM_TYPE, in onRequestPermissionsResult() 266 Constants.COMM_TYPE_RESPONSE_USER_APPROVED_PERMISSION); in onRequestPermissionsResult() 281 dataMap.putInt(Constants.KEY_COMM_TYPE, in onRequestPermissionsResult() 282 Constants.COMM_TYPE_RESPONSE_USER_DENIED_PERMISSION); in onRequestPermissionsResult() 294 if (messagePath.equals(Constants.MESSAGE_PATH_WEAR)) { in onMessageReceived() [all …]
|
/developers/samples/android/wearable/wear/XYZTouristAttractions/Application/src/main/java/com/example/android/xyztouristattractions/service/ |
D | UtilityService.java | 42 import com.example.android.xyztouristattractions.common.Constants; 146 intent.getBooleanExtra(EXTRA_TEST_MICROAPP, Constants.USE_MICRO_APP)); in onHandleIntent() 167 Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS); in addGeofencesInternal() 176 Log.e(TAG, String.format(Constants.GOOGLE_API_CLIENT_ERROR_MSG, in addGeofencesInternal() 197 showNotification(geofences.get(0).getRequestId(), Constants.USE_MICRO_APP); in geofenceTriggered() 224 Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS); in requestLocationInternal() 249 Log.e(TAG, String.format(Constants.GOOGLE_API_CLIENT_ERROR_MSG, in requestLocationInternal() 281 NotificationManagerCompat.from(this).cancel(Constants.MOBILE_NOTIFICATION_ID); in clearNotificationInternal() 296 Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS); in clearRemoteNotifications() 304 googleApiClient, itr.next(), Constants.CLEAR_NOTIFICATIONS_PATH, null); in clearRemoteNotifications() [all …]
|
D | ListenerService.java | 23 import com.example.android.xyztouristattractions.common.Constants; 39 if (Constants.CLEAR_NOTIFICATIONS_PATH.equals(messageEvent.getPath())) { in onMessageReceived() 42 } else if (Constants.START_ATTRACTION_PATH.equals(messageEvent.getPath())) { in onMessageReceived() 49 } else if (Constants.START_NAVIGATION_PATH.equals(messageEvent.getPath())) { in onMessageReceived() 53 Uri uri = Uri.parse(Constants.MAPS_NAVIGATION_INTENT_URI + Uri.encode(attractionQuery)); in onMessageReceived()
|
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/util/ |
D | SharedPreferencesHelper.java | 53 SharedPreferences sharedPreferences = context.getSharedPreferences(Constants.PREFS_NAME, 0); in readUserFromJsonPref() 54 String profileString = sharedPreferences.getString(Constants.PREFS_USER_KEY, null); in readUserFromJsonPref() 73 SharedPreferences sharedPreferences = context.getSharedPreferences(Constants.PREFS_NAME, 0); in writeUserToJsonPref() 75 editor.putString(Constants.PREFS_USER_KEY, gson.toJson(user)); in writeUserToJsonPref() 87 return getList(context, Profile.class, Constants.PREFS_CONTACTS_KEY); in readContactsFromJsonPref() 103 setList(context, contacts, Constants.PREFS_CONTACTS_KEY); in writeContactsToJsonPref() 115 return getList(context, Chat.class, Constants.PREFS_CHATS_KEY); in readChatsFromJsonPref() 130 setList(context, chats, Constants.PREFS_CHATS_KEY); in writeChatsToJsonPref() 142 return getList(context, Message.class, Constants.PREFS_MESSAGE_PREFIX + chatId); in readMessagesForChat() 158 setList(context, messages, Constants.PREFS_MESSAGE_PREFIX + chat.getId()); in writeMessagesForChatToJsonPref() [all …]
|
/developers/samples/android/deprecated/wearable/wear/Geofencing/Application/src/main/java/com/example/android/wearable/geofencing/ |
D | SimpleGeofenceStore.java | 19 import static com.example.android.wearable.geofencing.Constants.INVALID_FLOAT_VALUE; 20 import static com.example.android.wearable.geofencing.Constants.INVALID_INT_VALUE; 21 import static com.example.android.wearable.geofencing.Constants.INVALID_LONG_VALUE; 22 import static com.example.android.wearable.geofencing.Constants.KEY_EXPIRATION_DURATION; 23 import static com.example.android.wearable.geofencing.Constants.KEY_LATITUDE; 24 import static com.example.android.wearable.geofencing.Constants.KEY_LONGITUDE; 25 import static com.example.android.wearable.geofencing.Constants.KEY_PREFIX; 26 import static com.example.android.wearable.geofencing.Constants.KEY_RADIUS; 27 import static com.example.android.wearable.geofencing.Constants.KEY_TRANSITION_TYPE;
|
D | MainActivity.java | 19 import static com.example.android.wearable.geofencing.Constants.ANDROID_BUILDING_ID; 20 import static com.example.android.wearable.geofencing.Constants.ANDROID_BUILDING_LATITUDE; 21 import static com.example.android.wearable.geofencing.Constants.ANDROID_BUILDING_LONGITUDE; 22 import static com.example.android.wearable.geofencing.Constants.ANDROID_BUILDING_RADIUS_METERS; 23 import static com.example.android.wearable.geofencing.Constants.CONNECTION_FAILURE_RESOLUTION_REQUE… 24 import static com.example.android.wearable.geofencing.Constants.GEOFENCE_EXPIRATION_TIME; 25 import static com.example.android.wearable.geofencing.Constants.TAG; 26 import static com.example.android.wearable.geofencing.Constants.YERBA_BUENA_ID; 27 import static com.example.android.wearable.geofencing.Constants.YERBA_BUENA_LATITUDE; 28 import static com.example.android.wearable.geofencing.Constants.YERBA_BUENA_LONGITUDE; [all …]
|
/developers/samples/android/deprecated/wearable/wear/Timer/Wearable/src/main/java/com/example/android/wearable/timer/ |
D | TimerNotificationService.java | 28 import com.example.android.wearable.timer.util.Constants; 52 if (Constants.ACTION_SHOW_ALARM.equals(action)) { in onHandleIntent() 54 } else if (Constants.ACTION_DELETE_ALARM.equals(action)) { in onHandleIntent() 56 } else if (Constants.ACTION_RESTART_ALARM.equals(action)) { in onHandleIntent() 76 Intent intent = new Intent(Constants.ACTION_SHOW_ALARM, null, this, in deleteTimer() 90 notifyMgr.cancel(Constants.NOTIFICATION_TIMER_COUNTDOWN); in cancelCountdownNotification() 98 Intent restartIntent = new Intent(Constants.ACTION_RESTART_ALARM, null, this, in showTimerDoneNotification() 116 notifyMgr.notify(Constants.NOTIFICATION_TIMER_EXPIRED, notif); in showTimerDoneNotification()
|
/developers/samples/android/deprecated/wearable/wear/SynchronizedNotifications/Application/src/main/java/com/example/android/wearable/synchronizednotifications/ |
D | SynchronizedNotificationsFragment.java | 28 import com.example.android.wearable.synchronizednotifications.common.Constants; 77 Constants.PHONE_ONLY_ID, false); in onOptionsItemSelected() 81 Constants.WATCH_ONLY_PATH); in onOptionsItemSelected() 106 Intent dismissIntent = new Intent(Constants.ACTION_DISMISS); in buildLocalOnlyNotification() 107 dismissIntent.putExtra(Constants.KEY_NOTIFICATION_ID, Constants.BOTH_ID); in buildLocalOnlyNotification() 126 putDataMapRequest.getDataMap().putString(Constants.KEY_CONTENT, content); in buildWearableOnlyNotification() 127 putDataMapRequest.getDataMap().putString(Constants.KEY_TITLE, title); in buildWearableOnlyNotification() 158 buildWearableOnlyNotification(watchTitle, content, Constants.BOTH_PATH); in buildMirroredNotifications() 161 buildLocalOnlyNotification(phoneTitle, content, Constants.BOTH_ID, true); in buildMirroredNotifications()
|
D | DismissListener.java | 27 import com.example.android.wearable.synchronizednotifications.common.Constants; 62 if (Constants.BOTH_PATH.equals(dataEvent.getDataItem().getUri().getPath())) { in onDataChanged() 64 NotificationManagerCompat.from(this).cancel(Constants.BOTH_ID); in onDataChanged() 74 if (Constants.ACTION_DISMISS.equals(action)) { in onStartCommand() 77 int notificationId = intent.getIntExtra(Constants.KEY_NOTIFICATION_ID, -1); in onStartCommand() 78 if (notificationId == Constants.BOTH_ID) { in onStartCommand() 103 new Uri.Builder().scheme(WEAR_URI_SCHEME).path(Constants.BOTH_PATH).build(); in onConnected()
|
/developers/samples/android/wearable/wear/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/service/ |
D | ListenerService.java | 30 import com.example.android.xyztouristattractions.common.Constants; 60 && Constants.ATTRACTION_PATH.equals(event.getDataItem().getUri().getPath())) { in onDataChanged() 64 dataMapItem.getDataMap().getDataMapArrayList(Constants.EXTRA_ATTRACTIONS); in onDataChanged() 74 if (Constants.CLEAR_NOTIFICATIONS_PATH.equals(messageEvent.getPath())) { in onMessageReceived() 86 Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS); in showNotification() 89 Log.e(TAG, String.format(Constants.GOOGLE_API_CLIENT_ERROR_MSG, in showNotification() 96 intent.putExtra(Constants.EXTRA_ATTRACTIONS_URI, attractionsUri); in showNotification() 105 googleApiClient, attraction.getAsset(Constants.EXTRA_IMAGE)); in showNotification() 124 notificationManager.notify(Constants.WEAR_NOTIFICATION_ID, notification); in showNotification()
|
/developers/samples/android/ui/fonts/DownloadableFonts/app/src/main/java/com/example/android/downloadablefonts/ |
D | QueryBuilder.java | 52 if (width <= Constants.WIDTH_MIN) { in withWidth() 60 if (weight <= Constants.WEIGHT_MIN || weight >= Constants.WEIGHT_MAX) { in withWeight() 69 if (italic < Constants.ITALIC_MIN || italic > Constants.ITALIC_MAX) { in withItalic()
|
/developers/samples/android/wearable/wear/XYZTouristAttractions/Wearable/src/main/java/com/example/android/xyztouristattractions/ui/ |
D | AttractionsActivity.java | 40 import com.example.android.xyztouristattractions.common.Constants; 132 Uri attractionsUri = getIntent().getParcelableExtra(Constants.EXTRA_ATTRACTIONS_URI); in onCreate() 197 Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS); in doInBackground() 200 Log.e(TAG, String.format(Constants.GOOGLE_API_CLIENT_ERROR_MSG, in doInBackground() 212 dataMapItem.getDataMap().getDataMapArrayList(Constants.EXTRA_ATTRACTIONS); in doInBackground() 220 attraction.name = attractionData.getString(Constants.EXTRA_TITLE); in doInBackground() 222 attractionData.getString(Constants.EXTRA_DESCRIPTION); in doInBackground() 223 attraction.city = attractionData.get(Constants.EXTRA_CITY); in doInBackground() 225 attractionData.getString(Constants.EXTRA_DISTANCE); in doInBackground() 227 attractionData.getDouble(Constants.EXTRA_LOCATION_LAT), in doInBackground() [all …]
|
/developers/samples/android/wearable/wear/SpeedTracker/Shared/src/main/java/com/example/android/wearable/speedtracker/common/ |
D | Constants.java | 22 public class Constants { class 29 private Constants() {} in Constants() method in Constants
|
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/chat/ |
D | ReplyToMessageIntentService.java | 28 import com.example.android.wearable.wear.messaging.util.Constants; 59 if (intent.hasExtra(Constants.EXTRA_CHAT)) { in onHandleIntent() 61 if (Constants.ACTION_REPLY.equals(action)) { in onHandleIntent() 86 String chatId = intent.getStringExtra(Constants.EXTRA_CHAT); in extractChat() 96 return remoteInput.getCharSequence(Constants.EXTRA_REPLY); in getMessage()
|
/developers/samples/android/deprecated/wearable/wear/Geofencing/Wearable/src/main/java/com/example/android/wearable/geofencing/ |
D | Constants.java | 20 public final class Constants { class 22 private Constants() { in Constants() method in Constants
|
D | HomeListenerService.java | 19 import static com.example.android.wearable.geofencing.Constants.ACTION_CHECK_IN; 20 import static com.example.android.wearable.geofencing.Constants.ACTION_DELETE_DATA_ITEM; 21 import static com.example.android.wearable.geofencing.Constants.ANDROID_BUILDING_ID; 22 import static com.example.android.wearable.geofencing.Constants.KEY_GEOFENCE_ID; 23 import static com.example.android.wearable.geofencing.Constants.NOTIFICATION_ID; 24 import static com.example.android.wearable.geofencing.Constants.TAG; 25 import static com.example.android.wearable.geofencing.Constants.YERBA_BUENA_ID;
|
/developers/samples/android/deprecated/wearable/wear/Quiz/Wearable/src/main/java/com/example/android/wearable/quiz/ |
D | QuizListenerService.java | 19 import static com.example.android.wearable.quiz.Constants.ANSWERS; 20 import static com.example.android.wearable.quiz.Constants.CONNECT_TIMEOUT_MS; 21 import static com.example.android.wearable.quiz.Constants.CORRECT_ANSWER_INDEX; 22 import static com.example.android.wearable.quiz.Constants.NUM_CORRECT; 23 import static com.example.android.wearable.quiz.Constants.NUM_INCORRECT; 24 import static com.example.android.wearable.quiz.Constants.NUM_SKIPPED; 25 import static com.example.android.wearable.quiz.Constants.QUESTION; 26 import static com.example.android.wearable.quiz.Constants.QUESTION_INDEX; 27 import static com.example.android.wearable.quiz.Constants.QUESTION_WAS_ANSWERED; 28 import static com.example.android.wearable.quiz.Constants.QUESTION_WAS_DELETED; [all …]
|
/developers/samples/android/deprecated/wearable/wear/AgendaData/Wearable/src/main/java/com/example/android/wearable/agendadata/ |
D | Constants.java | 20 public final class Constants { class 22 private Constants() { in Constants() method in Constants
|