lundi 28 septembre 2015

Using Shared Preference in Android

i had a question regarding an Android App.

1.The first Activity consists of getting the user name and after that take to the next activity.

  1. In the New Activity i have to display a list of items which are hard coded, and the user can click on a list and get a new activity which has the details of the item. Also can add it to his WishList or like a basket and also delete it from there.

3.Now this is the thing i'm confused, another requirement is that when user exits the app and types this name he should get back the items in his basket.

So, my approach is that for points 1 and 2 I need a SQLite database to hold items,display and add to basket. But i'm not sure about how to achieve the 3rd point. I've read about shared preference and i kinda understand it partially.

Aucun commentaire:

Enregistrer un commentaire