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

Plugin not working #31

Open
zeeshanjan82 opened this issue Jul 22, 2015 · 5 comments
Open

Plugin not working #31

zeeshanjan82 opened this issue Jul 22, 2015 · 5 comments

Comments

@zeeshanjan82
Copy link

I am trying to implement the plugin in my html file after I have installed the plugin. I use the following code:
var now = new Date().getTime();
var from_now = new Date(now + 60 * 1000);
cordova.plugins.scheduler.addAlarm('This is a test alarm', from_now, 'ShowOverLockScreen', null, function(data){ console.dir(data);}, function(data){ console.dir(data);} );

But I receive the error : Invalid Action in my console when running the application on an android phone.

@zeeshanjan82
Copy link
Author

I was able to fix the issue and move ahead using the following code:
var extras = {
showAlarmScreen: true
};
However the alarm does not wake up the phone neither I can see the event firing.

@zeeshanjan82
Copy link
Author

When following the instructions to add ActivityHelper in the MainActivity.java file. My MainActivity.java file looks like this:

package com.example.testmaterial;

import com.red_folder.phonegap.plugin_scheduler.ActivityHelper;
import android.os.Bundle;
import org.apache.cordova.*;

public class MainActivity extends CordovaActivity
{
@OverRide
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
// Set by in config.xml
loadUrl(launchUrl);

    ActivityHelper.onCreate(this);
}

}

I get an error ActivityHelper symbol not found when running cordova run android

@zeeshanjan82
Copy link
Author

I was able to fix the above issue but now the alarm does not fire.
error

@zeeshanjan82
Copy link
Author

This plugin does not work even when I try using HelloWorld example shown on the intro page. I tried it on Samsung Galaxy s4

@Red-Folder
Copy link
Owner

Sorry, it's been a long time since I've spent any time on the plugin. I'm fairly certain when I built originally it was on an S4 or S5.

Unfortunately I don't have a development environment - so can't assist at the moment

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