Customizing Appcelerator Titanium Module
How to customize Pushwoosh SDK for your Appcelerator Titanium project
Push Notifications in Foreground
By default, Pushwoosh plugin does not display notifications in the foreground and automatically triggers onPushOpened callback. This is controlled by PW_BROADCAST_PUSH
metadata on Android:
And Pushwoosh_ALERT_TYPE
Info.plist key on iOS:
Custom Push Sound
To enable custom push notifications sounds for Android put sound samples in app/platform/android/res/raw folder. The sounds will be accessible through Sound dropdown menu of Send Push panel.
Custom Push Icon
Push notification icon can be customized on Android locally by using pw_notification as resource name for such icon; or remotely by referencing any resource name in Icon setting in Send Push panel. Android resources should be placed in app/platform/android/res/ folder
Custom Push Data
Custom push data can be sent using Action setting in the Send Push panel. To receive and handle such data use the following code:
Push receive callback
If application is registered for push notifications and is not closed, push delivery event can be handled using:
For iOS, enable Background Modes:
iOS10+ Media attachment
You need to add Notification Service Extension to the XCode project. The problem is that Titanium does not expose access to the XCode project and builds it in the background. See this thread for the possible solution: https://github.com/Pushwoosh/pushwoosh-appcelerator-titanium/issues/45
Share your feedback with us
Your feedback helps us create a better experience, so we would love to hear from you if you have any issues during the SDK integration process. If you face any difficulties, please do not hesitate to share your thoughts with us via this form.
Last updated