GithubHelp home page GithubHelp logo

Comments (14)

tgardner avatar tgardner commented on June 27, 2024 1

Hey @ragcsalo , if you've written a fix for the issue, I'll happily accept a PR for it. Please send it through so I can take a look. Cheers

from cordova-androidwear.

ragcsalo avatar ragcsalo commented on June 27, 2024

If anyone could make a usable fork, please do it!!! I couldn't find any other AndroidWear plugin... shame....

from cordova-androidwear.

ragcsalo avatar ragcsalo commented on June 27, 2024

After 2 days of searching, I finally found a solution (although I'm a beginner in coding Java). :-)
Here is my fork, which works with the latest Google Play Services (v11.8.0):
https://github.com/ragcsalo/cordova-androidwear

from cordova-androidwear.

TwanoO67 avatar TwanoO67 commented on June 27, 2024

Nice :) Could you do a Pull Request for that ?

from cordova-androidwear.

ragcsalo avatar ragcsalo commented on June 27, 2024

I think #tgardner has not been updating the plugin for 2 years now... I contacted him but no response yet. :-/

Update: welcome back, @tgardner :-)))))))

from cordova-androidwear.

ragcsalo avatar ragcsalo commented on June 27, 2024

Dear @tgardner :-) Please take a look at my fork: https://github.com/ragcsalo/cordova-androidwear
The only file I had to modify is src/android/WearProviderService.java
You can copy it to your release :-)

The MessageApi is also deprecated, but looks like it still can be used for a while... but if you're good at Java coding, you could replace it with the MessageClient class. Here is the release note of the latest Google Play Services, which mentions the deprecation of some Wearable classes:
https://developers.google.com/android/guides/releases

from cordova-androidwear.

tgardner avatar tgardner commented on June 27, 2024

Hi @ragcsalo, no point merging something that is already deprecated. I had a look at it this morning, and adjusted for the MessageClient implementation. Also noticed that the GooglePlayApi was deprecated in favour of the CapabilityClient.
Can you take a look at https://github.com/tgardner/cordova-androidwear/tree/dev and tell me if that fixes your issue? Note the breaking change mentioned in the README. I created a dev branch on the example project too if you're unsure of anything.

Let me know and I'll merge it, cheers.

from cordova-androidwear.

ragcsalo avatar ragcsalo commented on June 27, 2024

Thanks for the update! :-)
Unfortunately I get multiple errors when building the APK in Android Studio.

AndroidWearPlugin.java (line 29):
Cannot resolve symbol 'WearMessageApi'
Cannot resolve symbol 'WearMessageListener'

In multiple lines:
Lambda expressions are not supported at this language level
Diamond types are not supported at this language level
Method references are not supported at this language level

Have you tried to build the APK in Android Studio?

from cordova-androidwear.

tgardner avatar tgardner commented on June 27, 2024

Hi @ragcsalo, I wrote it in Android Studio. I'm guessing you're on Java 1.7 or lower. I've updated the branch, so it should be backwards compatible. Please pull down the latest and try again. Thanks

from cordova-androidwear.

ragcsalo avatar ragcsalo commented on June 27, 2024

from cordova-androidwear.

tgardner avatar tgardner commented on June 27, 2024

The message path has changed to "/NewMessage". Failing that, take a look at the example project at https://github.com/tgardner/cordova-androidwear-example/tree/dev

from cordova-androidwear.

ragcsalo avatar ragcsalo commented on June 27, 2024

from cordova-androidwear.

tgardner avatar tgardner commented on June 27, 2024

Maybe in the future, I'm very time poor at the moment. Feel free to take my example of the MessageClient and CapabilityClient implementations, and apply it to the DataClient as well. Always welcome pull requests :)

from cordova-androidwear.

tgardner avatar tgardner commented on June 27, 2024

Fixed in 1.0.1

from cordova-androidwear.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.