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

Better documentation for how to play a sound #36

Closed
cwohlman opened this issue Feb 4, 2015 · 6 comments
Closed

Better documentation for how to play a sound #36

cwohlman opened this issue Feb 4, 2015 · 6 comments

Comments

@cwohlman
Copy link

cwohlman commented Feb 4, 2015

It wasn't obvious to me how to play a sound on ios, here's the requirement:

  1. Place your sound in public/, e.g. pubic/beep.wav
  2. Reference your sound by including www/application/ e.g. www/application/beep.wav
@raix
Copy link
Collaborator

raix commented Feb 4, 2015

Hmm, the sound referece should be the same in the api (paths could be off?)
https://github.com/raix/push/blob/master/lib/client/cordova.js#L117
https://github.com/raix/push/blob/master/lib/client/cordova.js#L76

I'll take pull requests if your up to it :)

@cwohlman
Copy link
Author

cwohlman commented Feb 4, 2015

Maybe I'm using an older version of the plugin, let me check that first
before I suggest any changes to the documentation.

On Wed, Feb 4, 2015 at 10:51 AM, Morten N.O. Nørgaard Henriksen <
notifications@github.com> wrote:

Hmm, the sound referece should be the same in the api (paths could be off?)
https://github.com/raix/push/blob/master/lib/client/cordova.js#L117
https://github.com/raix/push/blob/master/lib/client/cordova.js#L76

I'll take pull requests if your up to it :)


Reply to this email directly or view it on GitHub
#36 (comment).

@cwohlman
Copy link
Author

cwohlman commented Feb 4, 2015

Well I updated to the latest version, but I'm still a little confused.

When is onNotificationAPN called? I'm currently using the push
notification api like so: sound: "www/application/audio/alarm.wav" if the
code you referenced is being called that would seem to result in the
unlikely filename application/www/application/audio/alarm.wav.

(I'm using Push.send to send notifications)

On Wed, Feb 4, 2015 at 10:55 AM, Joshua Ohlman codewriterohs@gmail.com
wrote:

Maybe I'm using an older version of the plugin, let me check that first
before I suggest any changes to the documentation.

On Wed, Feb 4, 2015 at 10:51 AM, Morten N.O. Nørgaard Henriksen <
notifications@github.com> wrote:

Hmm, the sound referece should be the same in the api (paths could be
off?)
https://github.com/raix/push/blob/master/lib/client/cordova.js#L117
https://github.com/raix/push/blob/master/lib/client/cordova.js#L76

I'll take pull requests if your up to it :)


Reply to this email directly or view it on GitHub
#36 (comment).

@raix
Copy link
Collaborator

raix commented Feb 14, 2015

I haven't been using the sound part myself - so its something worth investigating/testing/documenting
The onNotification is called on in app notifications - I'm not 100% sure about playing sounds on notifications when the app is in background or closed. But theres a difference there I think.

If we can trigger sound on closed apps its prop. the native sounds?

@cwohlman
Copy link
Author

Audio notifications definitely work differently, I've figured out how to
send audio messages using this format:

        Push.send({
          from: "MyApp",
          title: fromUser.displayName(),
          text: doc.message,
          badge: 1,
          sound: doc.safetyConfirmation ? "www/application/audio/alarm.wav"
: "default",
          query: {
            userId: doc.toId
          }
        });

On Sat, Feb 14, 2015 at 3:04 AM, Morten N.O. Nørgaard Henriksen <
notifications@github.com> wrote:

I haven't been using the sound part myself - so its something worth
investigating/testing/documenting
The onNotification is called on in app notifications - I'm not 100% sure
about playing sounds on notifications when the app is in background or
closed. But theres a difference there I think.

If we can trigger sound on closed apps its prop. the native sounds?


Reply to this email directly or view it on GitHub
#36 (comment).

@raix
Copy link
Collaborator

raix commented Mar 18, 2015

I agree that better documentation would be nice on this area - I haven't actually tested or used sound in my apps yet, so you guys are prop. better at it than me.

I'm closing this issue but referencing it from the Doc issue

@raix raix mentioned this issue Mar 18, 2015
6 tasks
@raix raix closed this as completed Mar 18, 2015
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