The main code for how Android works on the Java end