[AC-6235] Android: Notification not showing in some devices
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2019-05-02T06:47:17.000+0000 |
Affected Version/s | Appcelerator Studio 4.5.0 |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | ardy wongso |
Assignee | Shak Hossain |
Created | 2019-05-02T03:45:48.000+0000 |
Updated | 2019-05-02T06:47:17.000+0000 |
Description
by running the code
var notificationId = 0;
var window = Ti.UI.createWindow();
var button = Ti.UI.createButton({ title: "Send Notification" });
button.addEventListener("click", function(e) {
var notification = Ti.Android.createNotification(
{
contentTitle: "Content Title",
contentText: "Content Text",
contentIntent: Ti.Android.createPendingIntent(
{
intent: Ti.Android.createIntent({}),
}),
});
notificationId++;
Ti.Android.NotificationManager.notify(notificationId, notification);
});
window.add(button);
window.open();
when notification channel not defined, it says "Falling back to default notification channel."
but no notification show on top bar. not every device, i have 2 devices, Samsung A8* (8.0.0) and nexus 6p (8.1.0).
it works fine in nexus but not in Samsung
Sorry stupid mistake, notification was disabled by Clean Master App.