foreground service

  1. 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)...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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