Open boes-matt opened 11 years ago
Matt, :+1: nice work overall. A few notes after checking out the code:
Here's a detailed Project 4 Feedback Guide here which covers the most common issues with this submitted project. Read through the feedback guide point-by-point to determine how you might be able to improve your submission.
This week (Week 5), we are going to cover the last major piece to the Android puzzle and that is using the hardware and SDK components such as the camera, photo gallery, location, maps, etc. After that, Week 6 we will be covering all the topics that separate an intermediate Android developer from a beginner that will act things you should start reviewing to continue your path to being a great Android developer.
Week 7 (Nov 11th), we are going to have a demo day to celebrate the progress you've all made with our next batch of Android students and multiple companies attending to see the group projects that you all have built. We are going to help however we can over the next 2 weeks to get the apps in shape and also have you all prepare a short slide presentation as well.
...So, that said, the code now stands more like it was before. I first lookup a record by UID. If it exists, I simply return the old record. No updating. If it doesn't exist, I insert it into the DB.
Thanks for the detailed explanation.
Here it is. Thanks Nathan.
I spent a lot of time screwing with Active Android. I attempted to make the Tweet and User UIDs the unique ids in the database. But I kept getting a SQLite foreign key constraint error.
I then tried to do the update manually. In order words, getting the Tweet or User by UID from the DB. Then, if it exists, first deleting it and then saving the new record. But again, same type of error (SQLite foreign key constraint) on the method call Model.delete.
This error did not cause the app to crash immediately. The app crashed when I tried to read the User field of a Tweet in the adapter's getView and it was null (because of the error in saving it to the DB).
So, that said, the code now stands more like it was before. I first lookup a record by UID. If it exists, I simply return the old record. No updating. If it doesn't exist, I insert it into the DB.
/cc @nesquena