Java Code Examples for com.google.android.gms.wearable.DataMap#getStringArrayList()

The following examples show how to use com.google.android.gms.wearable.DataMap#getStringArrayList() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ListenerService.java    From xDrip with GNU General Public License v3.0 5 votes vote down vote up
private synchronized void deleteTreatment(DataMap dataMap) {
    ArrayList<String> entries = dataMap.getStringArrayList("entries");
    for (String uuid : entries) {
        Log.d(TAG, "syncTreatmentsData deleteTreatment for uuid=" + uuid);
        Treatments.delete_by_uuid(uuid);
    }
}
 
Example 2
Source File: ListenerService.java    From xDrip-plus with GNU General Public License v3.0 5 votes vote down vote up
private synchronized void deleteTreatment(DataMap dataMap) {
    ArrayList<String> entries = dataMap.getStringArrayList("entries");
    for (String uuid : entries) {
        Log.d(TAG, "syncTreatmentsData deleteTreatment for uuid=" + uuid);
        Treatments.delete_by_uuid(uuid);
    }
}
 
Example 3
Source File: CollectionActivity.java    From arcgis-runtime-demos-android with Apache License 2.0 5 votes vote down vote up
/**
 * Handles a layer response. The layer response includes a list of layers
 * that have recently been used on the mobile device that can be shown to
 * the user for selection.
 *
 * @param item the DataItem received from the mobile device
 */
private void handleLayerResponse(DataItem item) {
  DataMap dm = DataMapItem.fromDataItem(item).getDataMap();
  // Get the list of layer names from the data map
  layerNames = dm.getStringArrayList("layers");
  // Set the content view to the selection scroll list
  setContentView(R.layout.selection_list);
  // Get the WearableListView and set its adapter and click listener
  WearableListView listView = (WearableListView) findViewById(R.id.wearable_list);
  listView.setAdapter(new Adapter(this, layerNames));
  listView.setClickListener(this);
  // Note that our next response type should be a layer response (when the user selects
  // an item)
  mNextResponseType = RESPONSE_TYPE.LAYER;
}
 
Example 4
Source File: CollectionActivity.java    From arcgis-runtime-demos-android with Apache License 2.0 5 votes vote down vote up
/**
 * Handle a FeatureType response. The FeatureType response includes a list
 * FeatureTypes for the selected layer that can be shown to the user.
 *
 * @param item the DataItem received from the mobile device
 */
private void handleFeatureTypeResponse(DataItem item) {
  DataMap dm = DataMapItem.fromDataItem(item).getDataMap();
  // Get the list of feature types from the data map
  featureTypeNames = dm.getStringArrayList("featureTypes");
  // Set the content view to the selection scroll list
  setContentView(R.layout.selection_list);
  // Get the WearableListView and set its adapter and click listener
  WearableListView listView = (WearableListView) findViewById(R.id.wearable_list);
  listView.setAdapter(new Adapter(this, featureTypeNames));
  listView.setClickListener(this);
  // Note that our next response type should be a layer response (when the user selects
  // an item)
  mNextResponseType = RESPONSE_TYPE.FEATURE_TYPE;
}