foreground service

  1. jaber103

    Android Question dont play mediaPlayStream from Foreground in android 14

    Hello, my codes were working correctly, but today I noticed that the music method defined in the service, when I call from the activity, does not play on Android 14. I wanted to know what I should do. what did he do
  2. LucaMs

    Android Question Foreground service

    For various reasons, I started "playing" with Foreground Services, to try to keep an app / service always alive. From what I understand, it is necessary to use a notification, whose icon appears at the top LEFT (notification that also emits a beep). The basic project seems to work (maybe I...
  3. B

    Android Question Creating an App to Lock Other Apps In The Morning

    Hello. I am currently working on an app that is supposed to help me get up in the morning. Normally, when I wake up, I reach for my phone and then proceed to browse on some social media app for way too long. The app is supposed to work like this: In the main app, you select a time (e.g. 4am)...
  4. king_mkv

    Android Question make foreground app

    Hi everyone. I'm new in b4a and want to make an app (a bot for an Online game) to request to the game server every 5 minutes. I did it with Python and run with Termux with WakeLock but I can't do it in b4a. are there any solutions for me? I know I should use services and I do! but I'm using...
  5. A

    Android Question Service.StopAutomaticForeground in ver.12

    Hi all. I have a question - I'm testing my app in ver.12 and found a very strange situation. In Starter in sub Sub Service_Start (StartingIntent As Intent) I have a line Service.StopAutomaticForeground 'Starter service can start in the foreground state in some edge cases. It works fine in...
  6. Marcos Alves

    Android Question High Demand Foreground Service and App Freeze

    Hello, I have a problem here. I need to run a foreground service that requires about 1 or two minutes and some considerable level of processing and as in B4A it runs at the same thread of the gui this is freezing. The service has a loop (for ... next) which loads a json and decodes it, storing...
  7. LucaMs

    Android Question Notifications, foreground services...

    I have read many times that the best example on how to create a "stable" foreground service is MyLocation, so I tried it. It works but I am trying to get the same behavoir of some other famous apps, like Whatsapp, Twitter, Zynga Poker, etc. They are able to receive notifications (obviously...
  8. I

    Android Question Foreground Service and TargetSDK<28

    I am trying to adapt this background location example into an old project of mine. That project has a targetSDK of 21 (Android 5.0). But now the app is going to run on an Android 9.0 device. If I change targetSDK to 26 (Android 8.0), I will have to implement Runtime Permissions and all. To...
  9. An Schi

    Android Question Creating an alarm clock

    Hey people ;) I haven't done any coding for over a year, but now i want to make something. So please forgive me my noobiness and the fact that i didn't keep up with all the changes in B4A and in Android :oops: For a friend i want to make a wake-up alarm clock, cause she isn't comfortable with...
  10. I

    Android Question How to hide notification icon in status bar?

    I have foreground service on an app targeting SDK 26 and therefore there will be a persistent notification as long as the service is up. I know that I can customise this notification using Service.AutomaticForegroundNotification. What I am trying to do is to hide the notification icon in such a...
  11. Sandman

    Android Question [SOLVED] Any reason to run Service.StartForeground while app is in foreground?

    I just need to do a little bit of sanity check here. Let's say I have a service that's run periodically. If the app is in the foreground (and screen is on, etc), would there ever be a reason to use Service.StartForeground? (I do realize I need to use it if the app is in background, just curious...
  12. Sandman

    Android Question [SOLVED] How to update the foreground notification at any time?

    My app always has a notification open, to show user status. Periodically a service, svcDoStuff, is run to communicate with a server online. Since Android 8 the periodic service needs to be a foreground service, to ensure it won't get killed while doing it's thing. When the foreground service is...
Top