I'm a web developer but was trained in java years ago. I've brushed up on it a bit and built my first, extremely simple app that calculates water needed for homebrewing beer. I managed to do the whole thing from scratch using just google's android developers guide. Now I want to take it to the next level.
The first big bug I need to sort out is an input issue. When I put in my recipe numbers (grain amount, water amount, boil off rate, etc.) they are stored in shared preference variables. Then when I go to the activity that handles displaying all the calculations it crashes the program if any of the variables are not Doubles. I'm wondering what the best way to verify the input is either an integer or a double is. Should I verify before leaving the activity where the numbers are input or should I verify before doing the calculations on the display activity?