Hi I am fairly new to Android development and am hoping someone can help me out with this.
Basically, the app I am designing needs to contain a large list of makes, models, and years for various cars. The user can then select the make/model/year they want and add this car to their personal list of favorites. What I have tried so far is to make a database with two tables: one listing every car, and one listing the cars the user has chosen as favorites. When a user selects a car from the table listing every car, ideally that data would just be copied to the second table.
This has been fairly difficult for me at my novice level and I am having some problems getting it to work at all. So i guess my question is: is there a simpler way I should do this (with multiple arrays or something)? Or should I man up and just keep going at it until it works?
I would stick with the database – it will serve you well for more advanced android development, and many other applications. Sounds like you need to get a book on SQL or fundamental database concepts – if the database is as you’ve described it you can just use one table and update the “Favourite” flag whenever that changes.
Using alternative structures can have it’s own learning curve and be at the cost of performance, particularly if you’ve got a large number of records. Is there anything specifically you’re stuck on?