android wear與手機通訊發送asset失敗問題

手錶與手機通訊發送大數據時須要使用asset,但是在確認發送數據沒有問題,接收數據部分也沒有問題時,asset數據仍然接收不到,本人遇到此問題的緣由是:html

看一下接收數據部分是否有如下標紅的代碼node

@Overrideandroid

// ConnectionCallbacksapi

public void onConnected(Bundle bundle) {ide

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

}this

註釋掉後,asset數據接收正常spa

附:code

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

Removes all specified data items from the Android Wear network.orm

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. 

相關文章
相關標籤/搜索