B4A Question Stop ShortService, StartForeground, Service and ExitApplication... - Magma    
Jul 4, 2025
Service.StartForeground(1, CreateNotification("..."))
n.Initialize... can't stop (kill) my services at all...
here how i am starting them:
MyReceiver:
Sub...
link:
StartReceiverAt replaced StartServiceAt. It allows you to schedule a receiver to run at some point...
link: StartReceiverAt replaced StartServiceAt. It allows you to schedule a receiver to run at some point...
link: You mean move it at Service_Create ?
I was using "onlyonetime' to do...
B4A Question Service.StartForeground(1, Notif1) under Android 13 - peacemaker    
Jul 4, 2023)
Service.StartForeground(1, Notif1)
Notif1 is required for StartForeground, but
java.lang...HI, All
How to use a foreground service under Android13, if notifications are not required...
link: it needs a foreground service, but without notifications - it is not possible,
This was always...
link: But if it needs a foreground service, but without notifications - it is not possible...
link: Thanks, Erel. So, for notifications the .SetInfo method is the must for usage, and requesting PERMIS...
B4A Question RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground() - AbdurRahman (first post)    
Nov 10, 2025
Use the latest possible. Try to find what might trigger this error. It is impossible to say based o...
link: This is indeed a hard crash in the native WebView. You cannot catch it.
Secondly what webview vers...
link:
Example of keeping an app running "forever": https://www.b4x.com/android/forum/threads/ba...
link: Example of keeping an app running "forever": https://www.b4x.com/android/forum/threads/bac...
B4A Example Service.StartForeground API 24+ - Jmu5667    
Jan 24, 2017   
(1 reaction)Hello All.
Just thought I would share some info with you. Most of our services in our apps would use
Service.StartForeground(1,main_service.n1)
in the service create sub, where main_service...
link: Well, that did not wake up my device - even if I set the alarm 2 minutes later from Now. I have gone...
link: I am having trouble waking up my device (even after I have made it a sticky service) - using Erel...
link: use
Service.StartForeground(1,main_service.n1)
in the service create sub, where main_service...
B4A Question There is no servicetype paramerter in Service.StartForeground - giggetto71 (first post)    
May 10, 2025   
(2 reactions) "Service.StartForeground2" where we could pass the service type Id in native b4a..just...I am afraid the answer is "it depends". the service type is indeed mandatory from API34...
link: .StartForeground method will search in the manifest file for the type of the service
Yes....
link: + if the type of the service paramerter not found in Service.StartForeground method will search in...
link: In most cases you shouldn't use services at all. The only reason to use service is if...
B4A Question Service.StartForeground(1, Notif1) under Android 14 - LucaMs (first post)    
Nov 30, 2024
No, I get this error msg
https://www.b4x.com/android/forum/threads/java-lang-runtimeexception-andr...
link: this error msg
android.app.MissingForegroundServiceTypeException: Starting FGS without a type...
link: Try the project: "Background location tracking".
Does it work for you?...
link: ok, what's wrong with the thread?...
B4A Question [SOLVED] Any reason to run Service.StartForeground while app is in foreground? - Sandman    
Jun 18, 2018 to use Service.StartForeground?
(I do realize I need to use it if the app is in background, just...I just need to do a little bit of sanity check here. Let's say I have a service that's run...
link: Another one: Android/Google wants the user to be noticed if a service is running (and not doing...
link: Seems reasonable. Thanks...
link: So you're saying the correct strategy is to StartForeground it, regardless if the app is in...
B4A Question Service.StartForeground in Oreo - Semen Matusovskiy    
Apr 9, 2018/page-2#post-578918
I found that Service.StartForeground in Oreo does not show notifications. After quick search in Internet I found that there is limitation in 5 seconds after Service_Create
My...
link: But for unclear reasons doesn't work correctly OnGoingEvent = False & AutoCancel = True. It&...
link: - What is not clear ?
I tested built-in Nofication in Oreo 8.0.0. Works. This is nice, except large...
link: But I see exactly the same 27.1.1.
Are you sure that the IDE is configured to work with the correct ...
B4A Question Service.StartForeground with no notification icon - aaronk    
Feb 11, 2018 doesn't display.
I have tried changing:
Service.StartForeground(1,n)
to
Service..., "", Target)
Service.StartForeground(1,n)
timer1.Enabled = True
pw.PartialLock...
link: I just wonder if you can clarify what API level you targeted?
I am using:
MinSdkVersion 16
TargetSdk...
link: Worked it out.
I know this is an old thread, but I just wonder if you can clarify what API level yo...
link: on the second parameter for Service.StartForeground
This one: java.lang.IllegalArgumentException: null...
B4A Question android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord - petr4ppc (first post)    
May 3, 2022) of testing it looks that the message
android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord
was not born. I hope that its...
link: Why have you set the automatic mode to NEVER? This will cause your app to crash if the service...
link: Dear DonManfred,
thank you very much for your answer.
I see the list of drawoverotherapps, but I d...
link:
servicestart
you need to have the drawoverotherapps permission when you want to start a service...
Page: 1  
2  
3  
4  
5