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

Question: Way to get Launch Reason::Quick Launch #121

Open
KixAss opened this issue Dec 21, 2015 · 2 comments
Open

Question: Way to get Launch Reason::Quick Launch #121

KixAss opened this issue Dec 21, 2015 · 2 comments

Comments

@KixAss
Copy link

KixAss commented Dec 21, 2015

Is there a way to check if the Launch Reason is Quick Launch, so I can do a custom action?

@binki
Copy link

binki commented Aug 28, 2016

This seems to be one point of the Launch Reason API. What I don’t get is if the reason is a pure enumeration or flags.

In the Wakeups guide, you can see this snippet which suggests that it is not flags but just a pure enumeration:

static void init() {
  if(launch_reason() == APP_LAUNCH_WAKEUP) {
    // The app was started by a wakeup event.

A more pertinent example to your question is in the One Click Actions guide:

A common example, would be to detect if the application was actually started by the user, from either the launcher, or quick launch.

  if(launch_reason() == APP_LAUNCH_USER || launch_reason() == APP_LAUNCH_QUICK_LAUNCH) {
    // Perform One Click
  } else {
    // Display a message
  }

@binki
Copy link

binki commented Aug 28, 2016

And now I notice that this is against pebblejs and not PebbleKit, oops…

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