B4A Code Snippet Starter service and the missing foreground service type crash - Erel    Jul 30, 2025   (16 reactions) I recommend adding these two snippets to avoid crashes that happen when the app is somehow started while the screen is turned off: Add to manifest editor: SetServiceAttribute(Starter, android:foregroundServiceType, shortService) Add to starter service: Private Sub Service_Timeout(Params As Map) Service.StopForeground(51042) 'this is the id of the automatic foreground notification End Sub It will probably be added to the templates in the future.... B4A Tutorial Automatic Foreground Mode - Erel    Jun 12, 2018   (19 reactions)   tags: Mode, service foreground, Automatic Foreground Mode, Automatic, Foreground, Services property is Service.AutomaticForegroundNotification. This allows you to change the notification... where we expect services to start even if the app is not in the foreground:
- Push notifications... to foreground mode.
This is now handled automatically in the B4A framework. When needed services... B4A Question AutomaticForegroundMode without vibrating and notification sound - rleiman    Apr 20, 2018 .
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS
...Hi Everyone,
Can we tell this statement not to vibrate the phone and not have a notification sound... Other B4A v8.0 has been released! - Erel    Mar 20, 2018   (59 reactions) is automatically held when a receiver receives an intent. The wake lock is released when the service starts. Automatic foreground mode: https://www.b4x.com/android/forum/threads/automatic-foreground-mode.90546/ Notification object rewritten to work with targetSdkVersion 26. In most cases you don't need to change anything. Notification.SetInfo or Notification.SetInfo2 should be the last calls before... with targetSdkVersion 26 requirements. Push notifications and other features that cause apps to start from... B4A Question startForegroundService not allowed due to mAllowStartForeground - Erel (first post)    Aug 31, 2025   (2 reactions) Make sure not to call Service.StartForeground.
Add this to the manifest editor:
SetServiceAttribute(YourService, android:foregroundServiceType, shortService)
And to the service:
Private Sub Service_Timeout(Params As Map)
Service.StopForeground(51042) 'this is the id of the automatic foreground notification
End Sub
... B4A Question Google Play is reporting "Missing foreground service type" - nyinyi (first post)    Aug 5, 2025 https://www.b4x.com/android/forum/threads/starter-service-and-the-missing-foreground-service-type-crash.167999/ which one is better 👇 Sub Service_Start (StartingIntent As Intent) Service.StopAutomaticForeground End Sub Or Private Sub Service_Timeout(Params As Map) Service.StopForeground(51042) 'this is the id of the automatic foreground notification End Sub... B4A Question Notification service and Service.StopAutomaticForeground : App icon popup - lucad (first post)    Sep 12, 2018 perfect! thanks. I'll keep the first call because my delay is actually there, it' due to an ... Other B4A v8.30 has been released - Erel    Jun 12, 2018   (59 reactions) the automatic foreground notifications tutorial then you should be aware to a significant behavioral... B4A Library FirebaseNotifications - Push messages / Firebase Cloud Messaging (FCM) - Erel    Jun 26, 2023   (47 reactions)   tags: Fcm, Firebase, Push, Messaging Updated tutorial: https://www.b4x.com/android/forum/threads/b4x-firebase-push-notifications-2023.148715/ 260077923 Clarification: The nice thing about FCM is that your app doesn't need to run....67692/ Make sure to add the Notifications snippet. You should also reference FirebaseAnalytics 2...) Log($"Message data: ${Message.GetData}"$) Dim n2 As Notification n2.Initialize2... will be raised whenever a message is received. In this case we show a notification. You can do whatever... B4A Question Error in Manifest File when compiling - nakkal    Aug 17, 2025 foreground service type is missing.", so I added these lines to my manifest file and added code to my Starter: SetServiceAttribute(Starter, android:foregroundServiceType, shortService) Private Sub Service_Timeout(Params As Map) Service.StopForeground(51042) 'this is the id of the automatic foreground notification End Sub But when I try to compile my app, I get the following message... foregroundServiceType (attr) flags . error: failed processing manifest." Java version: 11 B4A Version... Page: 1   2   3   4   5   6   7   |