android - Data Transfer from Andread Wear Watch to phone via bluetooth -


i'm trying send textfile wearable (moto 360 android 5.1.1) phone (moto x android 4.4.4) via bluetooth, when execute "onsendtophone" method following error message on watch:

no application can handle action 

maybe can me , find solution ;)

this code use transfer data watch:

public void onsendtophone(view view)     {         //...         // inside method         // check if bluetooth supported         bluetoothadapter btadapter = bluetoothadapter.getdefaultadapter();          if (btadapter == null) {             // device not support bluetooth             // inform user we're done.             log.d("tag","bluetooth not found");             return;         }          file sendfile= new file(environment.getexternalstoragepublicdirectory(environment.directory_downloads) + "<filename>");          // bring android chooser         intent intent = new intent();         intent.setaction(intent.action_send);         intent.settype("text/plain");         intent.putextra(intent.extra_stream, uri.fromfile(sendfile));                  startactivity(intent);         log.d("tag", "file sent via bluetooth");     } 

don't use bluetoothadapterfor that. have use play services that.

take @ channelapi if wan't send file particular node (device) or @ datalayer if want synchronize binary data between devices.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -