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

Set a new Alarm Clock #45

Closed
Danyzzz opened this issue Apr 21, 2016 · 4 comments
Closed

Set a new Alarm Clock #45

Danyzzz opened this issue Apr 21, 2016 · 4 comments

Comments

@Danyzzz
Copy link

Danyzzz commented Apr 21, 2016

Hi guys,
it is possible set a new alarm clock like this?
http://stackoverflow.com/questions/8664670/how-to-launch-alarm-clock-screen-using-intent-in-android

I tried but when pressed button there is an error "NoSuchFieldException: ACTION_SET_ALARM"

This is my code example:

      var sApp = startApp.set({ /* params */
          "action":"ACTION_SET_ALARM",
          "intentstart":"startActivity",
      }, { /* extras */
          "EXTRA_MESSAGE":"Nuova sveglia Deneb",
          "EXTRA_HOUR":"12",
          "EXTRA_MINUTES":"00"
      });

      sApp.start(function() { /* success */
          console.log("OK");
      }, function(error) { /* fail */
          alert(error);
      });
@lampaa
Copy link
Owner

lampaa commented Apr 26, 2016

@Danyzzz hi! At the moment this is not possible, but I'll try to add it as soon as possible.

@Danyzzz
Copy link
Author

Danyzzz commented Apr 30, 2016

Thanks @lampaa !!! I think this feature is interesting to use :)

@Danyzzz
Copy link
Author

Danyzzz commented Jul 15, 2016

Hi @lampaa,
There are news? with latest update not working yet...

Thanks a lot.

@lampaa
Copy link
Owner

lampaa commented May 16, 2018

var sApp = startApp.set({ /* params */
    "action":"android.intent.action.SET_ALARM",
    "noParseAction": true
}, {
    "android.intent.extra.alarm.MESSAGE":"New Alarm",
    "android.intent.extra.alarm.HOUR":17,
    "android.intent.extra.alarm.MINUTES": 30
});

sApp.start(function(success) {
    console.log(success);
}, function(error) {
    console.error(success);
});

and add to AndroidManifest.xml:

<uses-permission android:name="com.android.alarm.permission.SET_ALARM"/>

plugin version: 6.1

@lampaa lampaa closed this as completed May 16, 2018
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