Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Jorge Martín
Jorge Martín
@Arasthel@social.linux.pizza  ·  activity timestamp 4 days ago

#androiddev is there any place where I could ask some Google dev about WorkManager's behaviour on Android 15+? We're having some issues related to background network access (https://developer.android.com/about/versions/15/behavior-changes-all#background-network-access) that are still happening *when using WorkManager* for fetching the data associated with push notifications (the context is an encrypted IM that only sends minimal data in the pushes).

I understand what we should do is probably schedule the tasks using some `NetworkType` or `NetworkRequest` constraint, but using `NetworkType.CONNECTED` won't work for customers that are behind a VPN or in an air-gapped environment since it performs a request to `gen_204` google URL that may not be available, and I'm not sure if `NetworkType.UNMETERED` or `NetworkRequest` with `NET_CAPABILITY_INTERNET` would be enough to have WorkManager temporarily grant our app internet connectivity and prevent those `UnknownHostExceptions` we're seeing.

This seems to be poorly documented, so we're not sure what the right behavior is, to be honest.

Android Developers

Behavior changes: all apps  |  Android Developers

Learn about changes in Android 15 that will affect all apps.
  • Copy link
  • Flag this post
  • Block
Nik
Nik
@nikclayton@mastodon.social  ·  activity timestamp 3 days ago

@Arasthel it's a bit orthogonal, but you will also face WorkManager problems on many devices, https://dontkillmyapp.com/

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.34 no JS en
Automatic federation enabled
Log in
Instance logo
  • Explore
  • About
  • Members
  • Code of Conduct