1
votes

Is there any way to set (toogle on/off) your push notification alert (after registered to APNS), sound and badge (by Code) inside an application?

I'm sorry the question seems a little ambiguous, actually I want to know Is it possible to non activate the sound and alert inside the application function (by code) I am working. It is similar as you can disable the sound, alert or badge in iPhone Settings, But I want to do it in code.

It is like Whatsapp app in iPhone, there are some notification setting — we can toggle the alert on or off.

1
Have you checked this?Saran
The link you gave is actually change the sound of a push notification. Is it possible to non activate the sound and alert inside the application function (by code) I am working. It is similar as you can disable the sound, alert or badge in iPhone Settings, But I want to do it in code.Lunayo

1 Answers

1
votes

You could make a system where the user can choose a sound. Save that one. And in the method where the push notification comes in. Play that sound. I dont know if this works when the phone is on sleep mode.