Java 类com.google.android.gms.wearable.internal.PutDataRequest 实例源码

项目:android_packages_apps_GmsCore    文件:WearableImpl.java   
public DataItemRecord putData(PutDataRequest request, String packageName) {
    DataItemInternal dataItem = new DataItemInternal(fixHost(request.getUri().getHost(), true), request.getUri().getPath());
    for (Map.Entry<String, Asset> assetEntry : request.getAssets().entrySet()) {
        Asset asset = prepareAsset(packageName, assetEntry.getValue());
        if (asset != null) {
            nodeDatabase.putAsset(asset, true);
            dataItem.addAsset(assetEntry.getKey(), asset);
        }
    }
    dataItem.data = request.getData();
    DataItemRecord record = putDataItem(packageName, PackageUtils.firstSignatureDigest(context, packageName), getLocalNodeId(), dataItem);
    syncRecordToAll(record);
    return record;
}
项目:android_external_GmsLib    文件:DataApiImpl.java   
@Override
public PendingResult<DataItemResult> putDataItem(GoogleApiClient client, PutDataRequest request) {
    throw new UnsupportedOperationException();
}
项目:android_external_GmsLib    文件:PutDataMapRequest.java   
/**
 * Creates a {@link PutDataRequest} containing the data and assets in this
 * {@link PutDataMapRequest}.
 */
public PutDataRequest asPutDataRequest() {
    // TODO
    return PutDataRequest.create((Uri) null);
}
项目:android_external_GmsLib    文件:DataApi.java   
/**
 * Adds a {@link DataItem} to the Android Wear network. The updated item is synchronized across
 * all devices.
 */
PendingResult<DataItemResult> putDataItem(GoogleApiClient client, PutDataRequest request);