Comments (8)
I keep hitting a foreign key constraint violation problem. So, submitting now.
Happy to help you debug that issue, should definitely get it working. I will review this for the time being. Thanks!
from codepath.
I added what I have so far on the "persistence-layer" branch.
from codepath.
Seems like sometimes, when I call user.save(), the id returned is -1 (maybe it failed to save?). After that, calling tweet.save() makes it crash, reasonably.
from codepath.
👍 nice work overall. A few notes after checking out the code:
- Nice to see you used the PullToRefresh library
- Good to see you added the tweet to the home timeline after you posted new on compose
- Nice touch with the character count being calculated for Compose
- Good to see you added ActiveAndroid annotations to the models
Here's a detailed Project 3 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 could improve your submission.
Let us know if you have any other thoughts or questions about this assignment. Hopefully by now you feel pretty comfortable with all the major pieces to basic Android apps (Views, Controllers, Models, Authentication, API Communication, Preferences, ActionBar, et al) and see how they all fit together. We are close to a turning point in the course where you should be hitting a "critical mass" for your Android knowledge.
from codepath.
Seems like sometimes, when I call user.save(), the id returned is -1 (maybe it failed to save?). After that, calling tweet.save() makes it crash, reasonably.
If you were to simply skip saving the tweet if the user didn't save (just to test) does it run fine otherwise?
from codepath.
Yes.. I'm now skipping tweet.save() if user.save() returns -1.
Also, when loading from db, sometimes the tweet comes back with a null User. So I'm also skipping tweets that have a null User when I populate the list view in TweetAdapter.
With those two changes, the app runs with no errors. It works offline too, but it ends up having a bunch of "empty" items in the list view corresponding to the failed tweets.
from codepath.
With those two changes, the app runs with no errors. It works offline too, but it ends up having a bunch of "empty" items in the list view corresponding to the failed tweets.
Curious what could be causing the users save to fail...seems kind of odd. Maybe I can help you debug this more if you can't get it working.
from codepath.
I've been kinda stuck for a while now, so I'll let it rest. Maybe you can take a look tomorrow if I can't get it to work by then.
Thanks!
from codepath.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codepath.