Question

Have developed an iPad app using Phonegap that works well along with Push Notifications in iOS 7. But my question is whether there is a possibility to control/modify iOS "Notification Centre" settings from my Phonegap app (programatically).

Ideally, What I prefer to do is to have a toggle button in my main menu in app and toggling it should move my app from "INCLUDE" section in the "Notification Centre" to "DO NOT INCLUDE" section in the "Notification Centre" and vice versa.

Please help me out as I'm a beginner with Objective-C.

Was it helpful?

Solution

Found a workaround now to control the user preferences. Its solved now. Here s the Workaround: 1) Passback the 'Device Token' and a boolean flag which indicates whether user allowed push notification or not to the javascript. 2) Pass the values received to the load URL as URL parameters. 3) Using PHP GET will receive these parameters at the server side and store it to a database table.

Now you can devise your own logic in the app to control push notification to be sent to a particular device(device token is not unique for all apps in a same device) or not.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top