arleyandrada / PushClient

FREE and Open Source - Titanium PushClient Module
Other
44 stars 17 forks source link

onesignal push android vibrate question #129

Closed kimjw0820 closed 8 years ago

kimjw0820 commented 8 years ago

Hello!

i have a question.. i use onesignal push service but onesignal do not have a REST API option per notification to set vibration for android supported option to client side with our https://documentation.onesignal.com/docs/android-notification-customizations#background-data-and-notification-overriding

How can I solve using pushclient?

Thank you!

kimjw0820 commented 8 years ago

i solved. field option 'android_sound' => 'default'

i'm sorry ^^ Thank you

aniruddhasm commented 8 years ago

@kimjw0820 Were exactly you wrote this line ?

arleyandrada commented 8 years ago

Hi @aniruddhasm, the "sound" (not "android_sound") is a JSON payload attribute which you send from your app backoffice or straight from your push notification provider.

You can set it with "default", to use the Android default sound to received notification, or use a custom audio file.

Put your custom audio file (wav or mp3) within the raw resource folder:

/platform/android/res/raw/youraudiofile.wav

Send a JSON payload data like below:

{
"alert" : "Custom sound",
"sound" : "youraudiofile"
}

or

{
"alert" : "Custom sound",
"sound" : "default"
}