本文整理汇总了Java中com.google.android.gms.wearable.internal.PutDataRequest类的典型用法代码示例。如果您正苦于以下问题:Java PutDataRequest类的具体用法?Java PutDataRequest怎么用?Java PutDataRequest使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PutDataRequest类属于com.google.android.gms.wearable.internal包,在下文中一共展示了PutDataRequest类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: putData
import com.google.android.gms.wearable.internal.PutDataRequest; //导入依赖的package包/类
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;
}
示例2: putDataItem
import com.google.android.gms.wearable.internal.PutDataRequest; //导入依赖的package包/类
@Override
public PendingResult<DataItemResult> putDataItem(GoogleApiClient client, PutDataRequest request) {
throw new UnsupportedOperationException();
}
示例3: asPutDataRequest
import com.google.android.gms.wearable.internal.PutDataRequest; //导入依赖的package包/类
/**
* Creates a {@link PutDataRequest} containing the data and assets in this
* {@link PutDataMapRequest}.
*/
public PutDataRequest asPutDataRequest() {
// TODO
return PutDataRequest.create((Uri) null);
}
示例4: putDataItem
import com.google.android.gms.wearable.internal.PutDataRequest; //导入依赖的package包/类
/**
* Adds a {@link DataItem} to the Android Wear network. The updated item is synchronized across
* all devices.
*/
PendingResult<DataItemResult> putDataItem(GoogleApiClient client, PutDataRequest request);