Transfer of assets from the watch to the handheld


I'm trying to replicate this function The transmitter part in watch is fine. In the onDataChanged function of WearableListenerService in handheld, an exception occurred every time DataMapItem dataMapItem = DataMapItem.fromDataItem(event.getDataItem()); is called.

The exception is as follows:

04-30 13:02:21.003  16588-16588/ I/dalvikvm﹕ Could not find method, referenced from method
04-30 13:02:21.003  16588-16588/ W/dalvikvm﹕ VFY: unable to resolve virtual method 464:    Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
04-30 13:02:21.003  16588-16588/ D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000b
04-30 13:02:21.053  16588-16790/ E/DataLayerSample﹕ WEAR :: Service connected to   GoogleApiClient.
04-30 13:02:21.053  16588-16790/ W/dalvikvm﹕ threadid=19: thread exiting with uncaught     exception (group=0x417bfd58)
04-30 13:02:21.053  16588-16790/ E/AndroidRuntime﹕ FATAL EXCEPTION: WearableListenerService
    Process:, PID: 16588
    java.lang.IllegalStateException: Cannot find DataItemAsset referenced in data at 0 for DataItemEntity   [@4287a7e0,dataSz=0, numAssets=1, uri=wear://df70fc47-0580-4750-b6ea-6e47439ed1ed/audio]
            at Source)
            at<init>(Unknown Source)
            at Source)
            at$zza$ Source)
            at android.os.Handler.handleCallback(
            at android.os.Handler.dispatchMessage(
            at android.os.Looper.loop(

Transmitter code is as follows:

class IpsTimerTask extends TimerTask {
        public void run() {
            byte[] buffer = new byte[60000];
  , 0, 60000);

            Asset asset = Asset.createFromBytes(buffer);
            PutDataRequest request = PutDataRequest.create("/audio");
            request.putAsset("Audio", asset);
            Wearable.DataApi.putDataItem(mGoogleApiClient, request);
            Log.d(TAG, "transmitted"+buffer.length);

Receiver code is as follows:

public void onDataChanged(DataEventBuffer dataEvents) {
        final List<DataEvent> events = FreezableUtils

        if (!mGoogleApiClient.isConnected()) {
            ConnectionResult connectionResult = mGoogleApiClient
                    .blockingConnect(30, TimeUnit.SECONDS);
            if (!connectionResult.isSuccess()) {
                Log.e(TAG,"WEAR :: Service failed to connect to GoogleApiClient.");
        } else {
            Log.e(TAG,"WEAR :: Service connected to GoogleApiClient.");

        for (DataEvent event : events) {
            if (event.getType() == DataEvent.TYPE_CHANGED &&
                    event.getDataItem().getUri().getPath().equals("/audio")) {

                DataMapItem dataMapItem = DataMapItem.fromDataItem(event.getDataItem());
                Asset audioAsset = dataMapItem.getDataMap().getAsset("Audio");
                Log.w(TAG, "receive");

Any ideas, please?

It seems the issue could be here:

final List<DataEvent> events = FreezableUtils

What does it mean? Please show this code for detailed answer.