MVVM - Accessing ViewModel/SQLite in a BroadcastReceiver started from a notification when app is closed
问题 I have a reminder notification that is sent every few days. The sending of that notification is triggered with a repeating AlarmManager . The notification itself is built in the onReceive of my BroadcastReceiver (as described here). So when onReceive is triggered, the app is not even open/running. Now at that point I want to access my (local) SQLite database and get the correct content to build the notification with, but how would I get a ViewModelProvider (xxx in the code) in this place to