Arrays for Interactive Android app

The use of arrays were critically important for the development of our latest app, “Mars Bubble Pop Lander”. It is very important to make use of proper Java coding structure and design and the Model-View-Controller system to keep track of the flow of object data and the design of Java classes.

As an interactive story written in Java and Android SDK, the user is allowed to enter their name and navigate through pages within the app with important code:

mImageView = (ImageView) findViewById(;
mTextView = (TextView)findViewById(;
mChoice1 = (Button)findViewById(;
mChoice2 = (Button)findViewById(;

The use of a simple array allows the code to fetch the correct page because on interactive choices made by the user when navigating through the app.

By setting a Java ID for the “Start your Adventure” start button, we can capture the name of the user and record it in a Log.d file which is verified due testing with the SDK Emulator.

mNameField = (EditText)findViewById(;
mStartButton = (Button) findViewById(;

The basic structure of this app can be inspiration for other story telling apps with even longer narratives and complexity of plot depending on the number of pages required in the story array:

private Page[] mPages

Clean coding is critical to the design of a great app. Establishing Java classes and organization of objects and methods in this project were crucial to the design of the Mars Bubble Pop Lander app.

Leave a Comment

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s