foreground service

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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