Reputation: 538
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.
Upvotes: 1
Views: 1046
Reputation: 439
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.
Upvotes: 1