本文整理匯總了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);