Save Data from Notification

Asked

Viewed 55 times

0

I’m trying to implement a Notification daily. The time of this Notification is chosen by the user through a TimePicker that appears when clicking on a LinearLayout consisting of 2 TextViews where one of them shows the time the user has chosen. All this is already implemented smoothly. My problem is when I leave the app, the chosen time is lost.

The only solution I see is to store this data in the database and when I go back in, go read what I have saved. Is there any other way to do this without having to resort to a database?

  • 2

    A possible and perhaps most appropriate form for this case will be to use Sharedpreferences. Look at this reply for an example.

  • 1

    @Thank you, I’ll investigate.

  • @ramaral, if you want to answer, q I accept the answer. It worked! :)

  • No need. However, if the answer I gave you was helpful, you can vote for it, if you like.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.