android wear与手机通信发送asset失败问题

手表与手机通信发送大数据时需要使用asset,可是在确认发送数据没有问题,接收数据部分也没有问题时,asset数据仍然接收不到,本人遇到此问题的原因是:

看一下接收数据部分是否有以下标红的代码

@Override

// ConnectionCallbacks

public void onConnected(Bundle bundle) {

Wearable.DataApi.deleteDataItems(mGoogleApiClient, dataItemUri).setResultCallback(this);

}

注释掉后,asset数据接收正常

附:

public   abstract   PendingResult<DataApi.DeleteDataItemsResult>             deleteDataItems (GoogleApiClient client, Uri uri)    

Removes all specified data items from the Android Wear network.

If uri is fully specified, this method will delete at most one data item. If uri contains no host, multiple data items may be deleted, since different nodes may create data items with the same path. See  DataApi for details of the URI format. 


你可能感兴趣的:(android,asset,Wear)