D
D
Di Em2019-10-02 14:53:39
Android
Di Em, 2019-10-02 14:53:39

How to implement adding items to the cart in an Android application?

I am making an online store, naturally there is a basket of selected goods. The cart is local. I see two options. The first is with the help of a database - for example, Room. The second one is in sharedPreferences. Everything has to be reactive. The database is convenient, but you don’t want to connect the database for the sake of the basket. In SP, it's somehow a crutch to do this - it seems to me so. Ask for advice from more experienced developers. Thank you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Zagaevsky, 2019-10-02
@dmelnyk

DB

D
Dmtm, 2019-10-03
@Dmtm

and that there is no local cache of the list of goods, how without a database?
so it can be stored in SP, usually serialized in json

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question