How to Implement Backbone Java Logic Code into Android
- by lord_sneed
I wrote a program to work from the console in Eclipse and the terminal window in Linux. I am now transforming it into an Android app and I have the basic functionality of the Android UI done up until the point where it needs to use the logic from the Java file of the program I wrote. All of my inputs from the Java file are currently from the keyboard (from Scanners).
My question is: how do I transform this to get it work with the user interaction of the app?
The only input would be from the built in NumberPicker. Should I copy and paste the code from the Java program to the activity file in the onCreate method and change all of the input methods (Scanners) to work with the Android input? Or do I create variables in the activity file and pass them to the Java program (in the separate class)? (If so, how would I do that? the Java file starts from the main method: public static void main(String[] args) {)
Also, will the print statements I have, System.out.println(...);, translate directly into the Android UI and print on the screen or do I have to modify those?