Code Monkey home page Code Monkey logo

cordova-plugin-wakeuptimer's People

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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

cordova-plugin-wakeuptimer's Issues

Can't get it to work!

Hey I've been having a really hard time getting this to work. Someone please clear some things for me.

  1. What is the actions param? What does it take?
  2. What format does sounds take (dom element or something else)?
  3. If I just provide message param (string), will it still work?

Here is my code,

var successCallback = function(result) {
console.log('wakeup alarm detected-- '+ result);
};

var errorCallback = function(result) {
console.log('wakeup alarm detected-- '+ result);
};

var alarms = { type : 'snooze',
time : { seconds : 60 },
extra : { },
message : "Hello!!"
};
console.log("set Alarm");
window.wakeuptimer.snooze( successCallback, errorCallback, alarms);

Right now whenever I try to set the alarm, successCallback is called immediately where result is set to null.

Please help me out.
PS: I'm using it with Angualar

Getting error while installing plugin

I'm getting this error while installing plugin:

Plugin "org.nypr.cordova.wakeupplugin" already installed on android.
Plugin "org.nypr.cordova.wakeupplugin" already installed on browser.
Installing "org.nypr.cordova.wakeupplugin" for ios
Failed to install 'org.nypr.cordova.wakeupplugin':CordovaError: Could not find *-Info.plist file, or config.xml file.
at Object.parseProjectFile [as parse] (/Users/usr/-projects/-app/platforms/ios/cordova/lib/projectFile.js:51:15)
at Api.addPlugin (/Users/usr/-projects/-app/platforms/ios/cordova/Api.js:224:33)
at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:611:6)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:407:28
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:749:13)

at /usr/local/lib/node_modules/cordova/node_modules/q/q.js:509:49
at flush (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7)

Error: Could not find *-Info.plist file, or config.xml file.

getExtras() is null, in WakeupPlugin.java, function onReset

The plugin doesn't allow start my app because the validation in onReset throw an exception, I get the values and found the problem was generated on getExtras().
I think, that the only change required is validate the extras and if there are no extras just not setAlarmsFromPrefs, am I right?

Not working on screen lock

Hello everyone,
I tried this plugin and everything is working fine except that the alarm doesn't work when phone is locked.
I want the alarm at utmost priority.
Any help is appreciated.

Repository not maintained? Any good tutorial?

I think this repo is not being maintained actively. Especially the example of SampleAlarm does not seem to do anything actually with the Alarm? It only logs a line when the device is ready (Cordova functionality). Has someone used this plugin with success?

any tutorials?

in my index.html file, i put

<script type="text/javascript"> window.wakeuptimer.wakeup( successCallback, errorCallback, // a list of alarms to set { alarms : [{ type : 'onetime', time : { hour : 14, minute : 02 }, extra : { message : 'json containing app-specific information to be posted when alarm triggers' }, message : 'Alarm has expired!' }] } ); </script>

but not working. can you provide some thorough tutorials?

Using ionic2

Hi, how can I use this awesome plugin in the ionic 2 typescript application?

cannot install plugin

How do I install this plugin ? It has been used in one of our oldest proect trying to migrate it to new version of cordova the command mentioned in this document is not working. Please advice me asap. Also does this plugin has updates ? Or contains uiwebview-api-deprecation ?
Thanks & Regards,
Pratiksha

Plugin waking up the app too late

I'm using this plugin to wake up an app that could be suspended or killed, to generate an alarm at a precise time (like an alarm clock). It works almost perfectly on my phone (only failed once) but noticed that lots of times it fails in another phone (both are from Samsung and have Android 7.0 installed, but the hardware is different - A5 vs S7). I added debug messages to the app and the problem seems to be that when the app was suspended or killed (for example by the Android power manager or manually), sometimes it wakes up a bit late - in the situations I've observed the app was reactivated more than one minute after the time configured in the alarmManager (and as the app validate that it is time to alarm if it is in the correct hour and minute, it doesn't alarm in that situation). I've already checked that this plugin uses the alarmManager.setExact method if the API level is higher than 19 and verified adding debug that it is really using the setExact method. What else could be the problem?

Best regards

Fernando

I can't find any code about this plugin in the SimpleAlarmExample

Hi, I got trouble when looking help from the alarm example.
https://github.com/wnyc/cordova-plugin-wakeuptimer/tree/master/examples/SimpleAlarmExample

I can't find any codes in the index.html nor index.js about this plugin. It seems just to be an auto-generated sample cordova project. So I can't get any hints from the demo on how to use the plugin.

My problem is, when I create an alarm, I get a result of "OK", but then the alarm never fires when it times up.

I've read all issues and spend a lot of time in googling. But could not get any help.
Could anyone point me a direction of using the plugin or show me a workable alarm example?
Thanks very much! ^_^

Screenshots

Hello. I'm just starting with this plugin and I think it's working. I'd like to confirm the alarm has been set.
It'd be great if you showed screenshots where I could confirm my alarms have been successfully created.

how to execute a specific function when alarm wake up ?

Hello,
tank you for this plugin.
i would like to now how to execute a specific function when alarm wakeup.
exemple: i would like to execute my function test when alarm wake up but it don't work.
can you help me please?
this ismy code:

function alarm(date, heure, min){

	var successCallback = function(result) {
		if (result.type==='wakeup') {
			test();
			//console.log('wakeup alarm detected--' + result.extra);

		} else if(result.type==='set'){
			alert('alarm initialiser');
			//console.log('wakeup alarm set--' + result);
		}else{
			alert('unkown');
			
		}
	};

	var errorCallback = function(result) {
		
		if (result.type==='wakeup') {
			console.log('wakeup alarm detected--' + result.extra);
		} else if(result.type==='set'){
			console.log('wakeup alarm set--' + result);
		} else {
			console.log('wakeup unhandled type (' + result.type + ')');
		}
	};

	// //type : 'onetime',

		window.wakeuptimer.wakeup(successCallback,
			errorCallback,
			{
				alarms: [{
					type: 'onetime',
					time: {hour: heure, minute: min},
					extra: { message: 'test'},
					message: 'Alarm has expired!'
				}]
			}
		);

		
}

function test(){
alert('it is time');
}

tank you

cordova plugin add cordova-plugin-wakeuptimer not install error via registry.

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

bring the app to foreground (IOS)

i was playing with the plugin on IOS and i was expecting that once the alarm time is reached, the app would open automatically if it was on the background, but apparently the system triggers a notification and the app only is brought to foreground if the user clicks the notification... Is this the expected behaviour or am i missing something? thanks in advance

Function: Callback always returns unhandled type

I created an application using example code:

  Window.wakeuptimer.wakeup (successCallback,
            ErrorCallback,
            // the list of alarms to set
            {
                 Alarms: [{
                     Type: 'onetime',
                     Time: {hour: 14, minute: 30}
                     Extra: {message: 'json containing app-specific information to be posted when alarm triggers'},
                     Message: 'Alarm has expired!'
                }]
            }
         );
       

Always returns me in Callback: unhandled type
Being that I define the callback

                                    Var successCallback = function (result) {
                                    If (result.type === 'wakeup') {
                                          .....
                                      
                                    } Else if (result.type === 'set') {
                                         ....
                                       
                                    } Else {
                                         ....
                                      
                                    }
                                };

Can someone help me understand the problem?

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.