Added init function on Android and added a check in the AS code so init doesn't crash the simulator