I've been stuck on this problem for a while now and I can't seem to solve it. I'm trying to store a value from my database by using "getValue" in a global variable. I want to use this variable to make a piechart (Anychart) out of.
Here is the code I'm using to pull the data.
I have a variable outside of the OnCreate method at the top of my code like so
int total_to;
The problem is that the code doesn't seem to store the datasnapshot value in the global variable, so the total_to value is always zero. Any help would be appreciate. Note I'm new to java (go easy on me ;) )