Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. Service without a UI

Service without a UI

Scheduled Pinned Locked Moved Android
questionandroidcomdesignsecurity
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    David Crow
    wrote on last edited by
    #1

    I've got a few apps that I wrote years ago that do their work in the background, mostly listening for certain events to happen. I used a Service for this. If the phone was rebooted for whatever reason, the Service gets restarted when a ACTION_BOOT_COMPLETED broadcast is received. This all worked quite well for my needs. When I upgraded my phone to Android 10 a few months ago, those apps stopped working (Android's new security features). I found and implemented the recommended solution (by supplying an ongoing notification while the service is running), but it still does not behave in the way I desire. Other apps, like Outlook, ADT Pulse, and myQ, also listen in the background but they do not require a notification to be shown. You don't see anything until an email is received, the alarm is set, or the garage door is opened, respectively. Then when you click on the notification, the app opens for you to interact with. So my question is, how do these apps run with no initial UI, yet still do their work in the background? Thanks. DC

    "One man's wage rise is another man's price increase." - Harold Wilson

    "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

    "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups