I need to display alert message in notification center for both (iOS and Android) titanium App. I am using an enterprise apple account for my app.
I can play sound in the background service mode in titanium, but I also want to see alert message inside the notification center for my app.
Currently, I only see that inside General -> profile -> my verified entriprise application. How do I enable notification? I cant get alert text/badge in notification center and even there is no application settings inside settings in my iPad device.
This code is in place to register for push notifications:
Titanium.Network.registerForPushNotifications({
types: [
Titanium.Network.NOTIFICATION_TYPE_BADGE,
Titanium.Network.NOTIFICATION_TYPE_ALERT,
Titanium.Network.NOTIFICATION_TYPE_SOUND
],
success:function(e)
{
var deviceToken = e.deviceToken;
label.text = "Device registered. Device token: \n\n"+deviceToken;
Ti.API.info("Push notification device token is: "+deviceToken);
Ti.API.info("Push notification types: "+Titanium.Network.remoteNotificationTypes);
Ti.API.info("Push notification enabled: "+Titanium.Network.remoteNotificationsEnabled);
},
error:function(e)
{
label.text = "Error during registration: "+e.error;
},
callback:function(e)
{
// called when a push notification is received.
alert("Received a push notification\n\nPayload:\n\n"+JSON.stringify(e.data));
}
});
How do I get notification messages inside the application's notification center section?