Code Monkey home page Code Monkey logo

Comments (11)

kirillemko avatar kirillemko commented on August 12, 2024 5

Hi everyone. Sorry for necro. I made it worked
I installed plugin by
cordova add https://github.com/jkhax0r/cordova-plugin-wakeuptimer.git

as htsnet said, there was json invalid error when i tried to use it. I edited java files a little to see error description. So i found what was wrong

skipOnAwake, skipOnRunning and startInBackground are the required fields in alarm option object! so i made it work with this code:

window.wakeuptimer.wakeup( function (a) {
console.log(a,"time success");
},
function (a) {
console.log(a,'timer set error');
},
// a list of alarms to set
{
alarms : [{
type : 'onetime',
skipOnAwake: false, // set timer, but skip launch if user is using the phone (screen is on)
skipOnRunning: false, // set wakeup timer, but skip launch if app is already running
startInBackground: false,
time : { hour : 22, minute : 26 },
extra : { message : 'json containing app-specific information to be posted when alarm triggers' },
message : 'Alarm has expired!'
}]
}
);

Hope it will be helpfull for someone

from cordova-plugin-wakeuptimer.

htsnet avatar htsnet commented on August 12, 2024

+1

from cordova-plugin-wakeuptimer.

ebrugungor avatar ebrugungor commented on August 12, 2024

+1
Still no fix for this issue?

from cordova-plugin-wakeuptimer.

htsnet avatar htsnet commented on August 12, 2024

I found another link: https://github.com/jkhax0r/cordova-plugin-wakeuptimer.git. With this, I could install normally. But... it does not work. When I try to set an alarm, I receive two messages error:
WakeupPlugin erros: invalid json
Invalid action

from cordova-plugin-wakeuptimer.

germangc125 avatar germangc125 commented on August 12, 2024

This plugin https://github.com/jkhax0r/cordova-plugin-wakeuptimer.gitIt It is not the same as wnyc?
use the same command to install cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.git

from cordova-plugin-wakeuptimer.

htsnet avatar htsnet commented on August 12, 2024

Almost the same. The first was updated 8 months ago.

from cordova-plugin-wakeuptimer.

germangc125 avatar germangc125 commented on August 12, 2024

But if I install - cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.git, I would not be installing the el jkhax0r?, or how do I install this https://github.com/jkhax0r/cordova-plugin-wakeuptimer.gitIt? Thanks!

from cordova-plugin-wakeuptimer.

htsnet avatar htsnet commented on August 12, 2024

Only the second one (https://github.com/jkhax0r/cordova-plugin-wakeuptimer.git). It is almost the same, but newer. I could install with no issues. The question is that it isn´t working yet. I receive 2 messages when trying to activate one alarm: WakeupPlugin error: invalid json; Invalid action.

from cordova-plugin-wakeuptimer.

eckerlycl avatar eckerlycl commented on August 12, 2024

cordova add https://github.com/jkhax0r/cordova-plugin-wakeuptimer.git adds this repository:
https://github.com/wnyc/cordova-plugin-wakeuptimer.git

from cordova-plugin-wakeuptimer.

htsnet avatar htsnet commented on August 12, 2024

Maybe. But I downloaded the zip file and installed locally. BUt, it doesn´t work to me yet. I receive a message "JSON Invalid". And I don´t know why.

from cordova-plugin-wakeuptimer.

Pratz007-tech avatar Pratz007-tech commented on August 12, 2024

Hi,I need your help

i have version cordova: 7.0.1
Ionic v 1
when trying to install the plugin not install:

-> cordova plugin add https://github.com/wnyc/cordova-plugin-wakeuptimer.git

Error: Failed to fetch plugin https://github.com/wnyc/cordova-plugin-wakeuptimer.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963228 Error output:
npm ERR! addLocal Could not install C:\Users\germa\AppData\Local\Temp\npm-6268-f4f54423\git-cache-eb611dc2\ae06fc686e7111f593d1e7489034ba77736fd5f2
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "https://github.com/wnyc/cordova-plugin-wakeuptimer.git" "--save"
npm ERR! node v6.9.2
npm ERR! npm v3.10.9
npm ERR! code EISDIR
npm ERR! errno -4068
npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read
npm ERR! eisdir This is most likely not a problem with npm itself
npm ERR! eisdir and is related to npm not being able to find a package.json in
npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:
npm ERR! C:~~\node_modules\npm-debug.log

How did you tackle this issue ? Were you able to resolve it by above help i.e installation of alternate plugin ?

from cordova-plugin-wakeuptimer.

Related Issues (20)

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.