Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sending and receiving messages problem #5

Closed
HerSaad opened this issue Jul 12, 2015 · 2 comments
Closed

sending and receiving messages problem #5

HerSaad opened this issue Jul 12, 2015 · 2 comments

Comments

@HerSaad
Copy link

HerSaad commented Jul 12, 2015

Hi @tgardner ,
Thank you for making this plugin .
The plugin have been installed successfully but I still not be able to send or receive any messages .
To test the plugin I have made a simple wear app witch shows the received messages and sends a simple String "Hello from Wear" to a simple cordova app ( with the path : "net.trentgardner.cordova.androidwear.NewMessage" ) .

this is my onDeviceReady function :

onDeviceReady: function() {
        app.receivedEvent('deviceready');

         AndroidWear.onConnect(function(e) {
      alert("Connection Successfully Established - handle: " + e.handle);

      AndroidWear.onDataReceived(e.handle, function(e) {
          alert("Data received - handle: " + e.handle + " data: "+ e.data);
      });

      AndroidWear.sendData(e.handle, "Hello From Cordova!");
  });

    }

After running the cordova app in my phone device I receive this Alert : ( Connection Successfully Established - handle : df58e11e ) witch means that the onConnect function has been successfully called . But in the wear app I don't receive anything and after sending the String from the wear app I don't receive also anything in the cordova app .

I would like to mention that the wear app is working without problems with another native android app .

Thanks in advance !

@tgardner
Copy link
Owner

Hi @HerSaad,

Have you tried taking a look at the sample project mentioned in the Readme?

Also logcat may be able to enlighten you as to what is going on.

Thanks,

Trent

@HerSaad
Copy link
Author

HerSaad commented Jul 12, 2015

Hi @tgardner ,

Thank you a lot .
your project is working well .

Saad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants