Here https://developer.android.com/training/articles/direct-boot it says "Some common use cases for apps needing to run during Direct Boot mode include: ... Apps that provide important user notifications, like SMS apps.".
I tryed add android:directBootAware="true" to my sms broadcast receiver. But while the device is in Direct Boot mode, no SMS comes to the receiver.
I tryed
Context directBootContext = appContext.createDeviceProtectedStorageContext();
final Uri SMS_INBOX = Uri.parse("content://sms/inbox");
final Cursor c = directBootContext.getContentResolver().query(SMS_INBOX, null, null, null, null);
while in Direct Boot, but got an exception with message unknown error (code 1294 SQLITE_CANTOPEN_ENOENT[1294]): Could not open database.
What and how exactly can we get about SMS messages in Direct Boot mode? I'm new to Android, am I missing something? Maybe I need to add a dependency on some library, like here Receive FCM messages in direct boot mode ?