/development/samples/browseable/RecipeAssistant/Application/src/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()
|
/development/samples/training/threadsample/src/com/example/android/threadsample/ |
D | DisplayActivity.java | 147 outState.putBoolean(Constants.EXTENDED_FULLSCREEN, mFullScreen); 179 Constants.BROADCAST_ACTION); 198 Constants.ACTION_VIEW_IMAGE); 209 displayerIntentFilter = new IntentFilter(Constants.ACTION_ZOOM_IMAGE); 247 new PhotoThumbnailFragment(), Constants.THUMBNAIL_FRAGMENT_TAG); 256 mFullScreen = stateBundle.getBoolean(Constants.EXTENDED_FULLSCREEN); 324 switch (intent.getIntExtra(Constants.EXTENDED_DATA_STATUS, 325 Constants.STATE_ACTION_COMPLETE)) { 328 case Constants.STATE_ACTION_STARTED: 329 if (Constants.LOGD) { [all …]
|
D | BroadcastNotifier.java | 53 localIntent.setAction(Constants.BROADCAST_ACTION); in broadcastIntentWithState() 56 localIntent.putExtra(Constants.EXTENDED_DATA_STATUS, status); in broadcastIntentWithState() 75 localIntent.setAction(Constants.BROADCAST_ACTION); in notifyProgress() 77 localIntent.putExtra(Constants.EXTENDED_DATA_STATUS, -1); in notifyProgress() 80 localIntent.putExtra(Constants.EXTENDED_STATUS_LOG, logData); in notifyProgress()
|
D | RSSPullService.java | 103 mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_STARTED); in onHandleIntent() 109 localHttpURLConnection.setRequestProperty("User-Agent", Constants.USER_AGENT); in onHandleIntent() 164 mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_CONNECTING); in onHandleIntent() 178 mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_PARSING); in onHandleIntent() 192 mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_WRITING); in onHandleIntent() 241 mBroadcaster.broadcastIntentWithState(Constants.STATE_ACTION_COMPLETE); in onHandleIntent()
|
/development/samples/browseable/RuntimePermissionsWear/Application/src/com.example.android.wearable.runtimepermissions/ |
D | IncomingRequestPhoneService.java | 26 import com.example.android.wearable.runtimepermissions.common.Constants; 59 if (messagePath.equals(Constants.MESSAGE_PATH_PHONE)) { in onMessageReceived() 62 int requestType = dataMap.getInt(Constants.KEY_COMM_TYPE, 0); in onMessageReceived() 64 if (requestType == Constants.COMM_TYPE_REQUEST_PROMPT_PERMISSION) { in onMessageReceived() 67 } else if (requestType == Constants.COMM_TYPE_REQUEST_DATA) { in onMessageReceived() 80 dataMap.putInt(Constants.KEY_COMM_TYPE, in promptUserForStoragePermission() 81 Constants.COMM_TYPE_RESPONSE_USER_APPROVED_PERMISSION); in promptUserForStoragePermission() 105 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithStorageInformation() 106 Constants.COMM_TYPE_RESPONSE_PERMISSION_REQUIRED); in respondWithStorageInformation() 132 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithStorageInformation() [all …]
|
D | MainPhoneActivity.java | 33 import com.example.android.wearable.runtimepermissions.common.Constants; 130 dataMap.putInt(Constants.KEY_COMM_TYPE, Constants.COMM_TYPE_REQUEST_DATA); in onClickWearBodySensors() 154 Constants.CAPABILITY_WEAR_APP); in onPause() 191 dataMap.putInt(Constants.KEY_COMM_TYPE, in onActivityResult() 192 Constants.COMM_TYPE_REQUEST_PROMPT_PERMISSION); in onActivityResult() 206 Constants.CAPABILITY_WEAR_APP); in onConnected() 213 Constants.CAPABILITY_WEAR_APP, in onConnected() 224 capabilityName.equals(Constants.CAPABILITY_WEAR_APP); in onConnected() 269 if (messagePath.equals(Constants.MESSAGE_PATH_PHONE)) { in onMessageReceived() 272 int commType = dataMap.getInt(Constants.KEY_COMM_TYPE, 0); in onMessageReceived() [all …]
|
/development/samples/browseable/SynchronizedNotifications/Wearable/src/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 …]
|
/development/samples/browseable/RuntimePermissionsWear/Wearable/src/com.example.android.wearable.runtimepermissions/ |
D | IncomingRequestWearService.java | 27 import com.example.android.wearable.runtimepermissions.common.Constants; 68 if (messagePath.equals(Constants.MESSAGE_PATH_WEAR)) { in onMessageReceived() 71 int requestType = dataMap.getInt(Constants.KEY_COMM_TYPE); in onMessageReceived() 73 if (requestType == Constants.COMM_TYPE_REQUEST_PROMPT_PERMISSION) { in onMessageReceived() 76 } else if (requestType == Constants.COMM_TYPE_REQUEST_DATA) { in onMessageReceived() 91 dataMap.putInt(Constants.KEY_COMM_TYPE, in promptUserForSensorPermission() 92 Constants.COMM_TYPE_RESPONSE_USER_APPROVED_PERMISSION); in promptUserForSensorPermission() 112 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithSensorInformation() 113 Constants.COMM_TYPE_RESPONSE_PERMISSION_REQUIRED); in respondWithSensorInformation() 125 dataMap.putInt(Constants.KEY_COMM_TYPE, in respondWithSensorInformation() [all …]
|
D | MainWearActivity.java | 35 import com.example.android.wearable.runtimepermissions.common.Constants; 168 dataMap.putInt(Constants.KEY_COMM_TYPE, in onClickPhoneStorage() 169 Constants.COMM_TYPE_REQUEST_DATA); in onClickPhoneStorage() 181 Constants.CAPABILITY_PHONE_APP); in onPause() 272 Constants.CAPABILITY_PHONE_APP); in onConnected() 279 Constants.CAPABILITY_PHONE_APP, in onConnected() 349 dataMap.putInt(Constants.KEY_COMM_TYPE, in onRequestPermissionsResult() 350 Constants.COMM_TYPE_RESPONSE_USER_APPROVED_PERMISSION); in onRequestPermissionsResult() 365 dataMap.putInt(Constants.KEY_COMM_TYPE, in onRequestPermissionsResult() 366 Constants.COMM_TYPE_RESPONSE_USER_DENIED_PERMISSION); in onRequestPermissionsResult() [all …]
|
/development/samples/browseable/XYZTouristAttractions/Application/src/com.example.android.xyztouristattractions/service/ |
D | UtilityService.java | 36 import com.example.android.xyztouristattractions.common.Constants; 144 intent.getBooleanExtra(EXTRA_TEST_MICROAPP, Constants.USE_MICRO_APP)); in onHandleIntent() 165 Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS); in addGeofencesInternal() 174 Log.e(TAG, String.format(Constants.GOOGLE_API_CLIENT_ERROR_MSG, in addGeofencesInternal() 195 showNotification(geofences.get(0).getRequestId(), Constants.USE_MICRO_APP); in geofenceTriggered() 222 Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS); in requestLocationInternal() 247 Log.e(TAG, String.format(Constants.GOOGLE_API_CLIENT_ERROR_MSG, in requestLocationInternal() 279 NotificationManagerCompat.from(this).cancel(Constants.MOBILE_NOTIFICATION_ID); in clearNotificationInternal() 294 Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS); in clearRemoteNotifications() 302 googleApiClient, itr.next(), Constants.CLEAR_NOTIFICATIONS_PATH, null); in clearRemoteNotifications() [all …]
|
D | ListenerService.java | 26 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()
|
/development/samples/browseable/Geofencing/Application/src/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 …]
|
/development/samples/browseable/Timer/src/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()
|
/development/samples/browseable/SynchronizedNotifications/Application/src/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()
|
/development/samples/browseable/XYZTouristAttractions/Wearable/src/com.example.android.xyztouristattractions/service/ |
D | ListenerService.java | 29 import com.example.android.xyztouristattractions.common.Constants; 59 && Constants.ATTRACTION_PATH.equals(event.getDataItem().getUri().getPath())) { in onDataChanged() 63 dataMapItem.getDataMap().getDataMapArrayList(Constants.EXTRA_ATTRACTIONS); in onDataChanged() 73 if (Constants.CLEAR_NOTIFICATIONS_PATH.equals(messageEvent.getPath())) { in onMessageReceived() 85 Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS); in showNotification() 88 Log.e(TAG, String.format(Constants.GOOGLE_API_CLIENT_ERROR_MSG, in showNotification() 95 intent.putExtra(Constants.EXTRA_ATTRACTIONS_URI, attractionsUri); in showNotification() 104 googleApiClient, attraction.getAsset(Constants.EXTRA_IMAGE)); in showNotification() 123 notificationManager.notify(Constants.WEAR_NOTIFICATION_ID, notification); in showNotification()
|
/development/samples/browseable/XYZTouristAttractions/Wearable/src/com.example.android.xyztouristattractions/ui/ |
D | AttractionsActivity.java | 39 import com.example.android.xyztouristattractions.common.Constants; 131 Uri attractionsUri = getIntent().getParcelableExtra(Constants.EXTRA_ATTRACTIONS_URI); in onCreate() 196 Constants.GOOGLE_API_CLIENT_TIMEOUT_S, TimeUnit.SECONDS); in doInBackground() 199 Log.e(TAG, String.format(Constants.GOOGLE_API_CLIENT_ERROR_MSG, in doInBackground() 211 dataMapItem.getDataMap().getDataMapArrayList(Constants.EXTRA_ATTRACTIONS); in doInBackground() 219 attraction.name = attractionData.getString(Constants.EXTRA_TITLE); in doInBackground() 221 attractionData.getString(Constants.EXTRA_DESCRIPTION); in doInBackground() 222 attraction.city = attractionData.get(Constants.EXTRA_CITY); in doInBackground() 224 attractionData.getString(Constants.EXTRA_DISTANCE); in doInBackground() 226 attractionData.getDouble(Constants.EXTRA_LOCATION_LAT), in doInBackground() [all …]
|
/development/samples/browseable/SpeedTracker/Shared/src/com.example.android.wearable.speedtracker.common/ |
D | Constants.java | 22 public class Constants { class 29 private Constants() {} in Constants() method in Constants
|
/development/samples/browseable/Geofencing/Wearable/src/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;
|
/development/samples/browseable/AgendaData/Wearable/src/com.example.android.wearable.agendadata/ |
D | Constants.java | 20 public final class Constants { class 22 private Constants() { in Constants() method in Constants
|
/development/samples/browseable/SynchronizedNotifications/Shared/src/com.example.android.wearable.synchronizednotifications.common/ |
D | Constants.java | 21 public final class Constants { class 23 private Constants() {}; in Constants() method in Constants
|