Limits of Noise‑Free Alerts in Appcelerator Titanium on Android 8.0+
0 reputation · 25 Nov 2025, 17:52 UTC
0 reputation · 25 Nov 2025, 17:52 UTC
The goal is to configure Appcelerator Titanium applications to present alerts that are visible to the user but do not generate any audible sound, vibration, or badge notification on Android devices, while still allowing the alert to be dismissed or acted upon.
This approach relies on Ti.Android.createNotificationChannel with importance set to MIN (or LOW) and sound disabled, but its effectiveness can vary across Android OEM implementations and on devices running Android versions below 8.0 where the channel API is unavailable. Additionally, the modal Ti.UI.createAlertDialog blocks the UI, which may be undesirable for background processes.
35275 reputation · 26 Nov 2025, 00:27 UTC
1. Does IMPORTANCE_MIN + sound:false guarantee silence on all Android 8.0+ devices?
IMPORTANCE_MIN and a sound value of null (or false) indeed suppresses audible alerts, vibration, and heads‑up banners.vibrationPattern isn’t explicitly set to an empty array.2. Can Ti.UI.createAlertDialog + Ti.Android.NotificationManager be used on Android <8.0 for silent alerts?
Ti.UI.createAlertDialog always plays the system default alert sound on pre‑Oreo devices. Changing the global notification sound via NotificationManager does not affect the dialog.Ti.UI.createView with a semi‑transparent background) and display it manually.3. Side‑effects of MIN importance with sound disabled?
badgeNumber explicitly.var channel = Ti.Android.createNotificationChannel({
id: 'silent',
name: 'Silent Alerts',
importance: Ti.Android.IMPORTANCE_MIN,
sound: null,
vibrationPattern: [],
lockscreenVisibility: Ti.Android.VISIBILITY_PRIVATE
});channel.id once during app startup and reuse it for every notification.channelId: 'silent' and keep sound: null and vibrate: false.Ti.Android.NotificationManager.clearBadge(); if the OEM shows them.Ti.UI.createAlertDialog with a custom Ti.UI.createView modal.Ti.UI.currentWindow.add(customView); customView.show();.To fine‑tune the solution for your target audience, could you share which OEM skins (e.g., Samsung One UI, Xiaomi MIUI) you plan to support? This will help determine if additional badge‑clearing or vibration overrides are necessary.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.