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. JobControl, Instant Messages and Notifications

JobControl, Instant Messages and Notifications

Scheduled Pinned Locked Moved Android
androidsysadminhostingcloudtesting
1 Posts 1 Posters 3 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.
  • E Offline
    E Offline
    Ed Attfield
    wrote on last edited by
    #1

    Can I get updates from a server without using firebase? I maintain an android app that interacts with a legacy home automation hub. The app is in the Play store and used by other people. (I'm being vague because I don't need suggestions for better hubs.) The hub accepts TCP connections for the client app to fetch a blob of current status and will send update messages for new events. Prompt delivery of the update is important. The first versions of the client app could make the TCP socket connection, run happily in the background and post notifications as event updates arrived. Newer versions of Android are trying to conserve battery and reduce notification noise. This takes away the long running Service feature in favour of data sync JobControl tasks that can run for a few minutes and stop. This doesn't give the time-sensitive updates from the hub. Before Android 14, I was allowed to use a timer or JobControl to restart a long running 'foreground' process with an always-visible notification to show the user that it was still running. Now I'm not allowed to call startForegroundService() from the background to do the restart. I've tried adding firebase messaging, but this would require my users to run an intermediate process to send their updates through a 'cloud' service that I would also have to maintain. (I've written it, I don't like it.) Is there something else I can do in the app?

    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