1
votes

I would like to use the new WorkManager to replace a Service implementation of a phone telemetry sender (to be complaint with Android O). Right now it's essentially a bound service that tries to send telemetry realtime but if the network fails it will save the record to the DB that will later be replayed to the server when network resumes. Pretty much the definition of what WorkManager can accomplish with Constraints.

The trouble I have is one of security. My database is encrypted and it is also completely wiped when the user logs out or asks to wipe their data. WorkManager is backed by the Room db and stores all payload data in the clear. Worse yet, it seems they don't expose the ability to delete these records at your whim. Instead, they offer cancellation which literally just sets a column status to CANCELLED. I can't find documentation or a code path that would explain a way to overcome this. Has anyone gotten a chance to explore the library much? Maybe I'm missing something.

Thanks

1
Right. Maybe I'm confused. The WorkSpec class in Work manager defines a room layer that persists your enqueued tasks. It would need this for guaranteed execution later by the OS. Are you saying there is an API to inject into work manager my own db provider? - Andrew G

1 Answers

2
votes

As per the Work Manager I/O Talk, WorkManager is not meant to be your data store. You should continue to store your data in your own database.