Send information to DB offline

Hello community, I have a question.

Is there a way for my application to send information to a DB until it detects an internet connection, but that data is not lost if I leave the app?

EJ: When you send a message through whatsapp and you don’t have a data signal, the message is sent and when it detects a signal it is sent completely even if you are not inside the application.

If possible could you help me. thank you thank you

Do you know the types of offline databases? Have you tried using them?