Coder Social home page Coder Social logo

20steps / cordova-plugin-watch-example Goto Github PK

View Code? Open in Web Editor NEW
27.0 27.0 9.0 2.81 MB

Example App for 'cordova-plugin-watch' plugin by 20steps

JavaScript 80.04% Objective-C 4.41% C 0.06% Shell 0.44% CSS 14.75% Java 0.15% C++ 0.08% C# 0.08%

cordova-plugin-watch-example's People

Contributors

bushd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-watch-example's Issues

Missing reference in cordova_plugins.js?

In Cordova/Phonegap 4.2, is there supposed to be a reference to the plugin in cordova_plugins.js? I find code for my other plugins, but none to the cordova watch plugin.

When I run the code in browser, Javascript is throwing

Uncaught TypeError: Cannot read property 'plugins' of undefined(index):

and the following codeblock silently hangs my app both in browser and in compiled Xcode:

function SetupListener(){
window.cordova.plugins.Watch.initialize('group.com.example.app, 'myIdentifier');    

    window.cordova.plugins.Watch.listen('ListenerName', function(message) {
    window.open('http://www.example.com/?QueryVar='+message, '_system')});

I've tried uninstall/reinstall, cordova prepare ..

Can't get it going

Thanks for this, it looks great. I'm having trouble though - I followed the instructions and got everything seemingly working but the watch and phone apps don't seem to be communicating. I see changing values on the phone but only -1 on the watch.

I set my own team, changed the bundle identifiers and fixed a few problems that resulted from that, enabled groups on all targets, set the same group, entitlements look fine.

I can't think of what I might be missing, any thoughts perchance?

Sending multiple requests.

This is a query more than a issue. Do we need to initialize the plugin only once ? Say i send a request from the watch app multiple times, one request for login, then another request for data for certain period etc, how do i use this plugin. Do I need to initialize the plugin once and keep listening for the request from the watch app ? I believe I should be sending information regarding the request in the message in the request. But depending on the request the response seems to vary. So should I create multiple request functions wrapping the request listener ?

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.