0% found this document useful (0 votes)
17 views6 pages

Paper 2

Uploaded by

mruizdocente
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

Paper 2

Uploaded by

mruizdocente
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Using Android as a Platform for Programming in the IT

Curriculum
Michael Halper
Information Technology Department
NJIT
Newark, NJ 07102
1-973-596-5752
[email protected]

ABSTRACT Indeed, mobile computing has been introduced into introductory


Mobile devices have become fixtures of our everyday lives. As programming courses [2,3]. In the IT degree program at my
such, it is sensible to deploy them in the IT curriculum where they university, we have transitioned an advanced programming course
can help students attain their core competency in programming. over to app development. The Android operating system was
Android has been adopted as the platform for an advanced chosen as the development platform for a number of reasons.
programming course in which students are using Java (Android’s First, it is the most widely used of the current generation of
native language) and XML to build apps. Many subtle issues and mobile platforms. Second, it is freely available, and there are no
common pitfalls have been encountered when transitioning this costs associated with its app development tools or testing on
programming course to Android apps from traditional Java devices. Moreover, the native language of Android apps is Java,
programs. Gathered from over a year’s experience teaching app which has the added benefit of being among the most important
development, these issues are discussed, and suggestions and tips programming languages in the IT field. Another benefit is the
beneficial to IT instructors and students for working with Android extensive use of XML in app development, particularly in the
are presented. Overall, the issues dealt with range from setting up context of GUIs. This exposure to a popular markup language
devices and emulators to subtleties in linking Java and XML to addresses further core competencies expected of the IT student.
quirks of the Eclipse IDE. Accessing the Internet is also covered. In this paper, I present some of the important logistical issues and
Some additional benefits of Android development for the potential pitfalls that instructors and students will face when
undergraduate IT curriculum are discussed. employing Android app development in the classroom. Among
other things, these issues pertain to Android devices and
Categories and Subject Descriptors emulators, working with Java in the Android setting, the Java-
D.2.6 [Software Engineering]: Programming Environments – XML linkage, debugging, quirks with the Eclipse IDE, and
Integrated environments. accessing the Internet via apps. This information has been gleaned
from over a year’s worth of experience teaching the subject in the
Keywords context of our IT programming course. A number of suggestions
Java Programming; Android; Apps; Android SDK; Eclipse and tips for successful app development are presented throughout.
Integrated Development Environment (IDE); Mobile Computing While some basics of app development are introduced, this paper
is not meant to be a tutorial for “developing my first app.” Those
can be found on-line [4] or in various books [5,6]. Some
1. INTRODUCTION additional benefits of Android development for the IT curriculum
Mobile devices have become ubiquitous. According to a recent are discussed.
article in The New York Times, mobile access accounts for 25% of
Web use [1]. Walk into any IT classroom, and you will
undoubtedly see students armed with an array of such devices. 2. BACKGROUND
Indeed, IT students (and much of the general populace) have Android is an operating system developed for mobile devices. It
become enthralled with these devices and have become dependent was originally built by a team at Android, Inc., which was
on them for many daily routines. Since students are so engaged eventually acquired by Google. Android has gone through a
with mobile computing, it is reasonable that they would be more number of versions over the years, each dubbed as an appetizing
excited about programming if the results of their efforts could be treat: Froyo, Honeycomb, Ice Cream Sandwich, Jelly Bean, and
seen immediately on these devices. That is, IT students should be most recently KitKat. In order to support development of apps
developing apps. Moreover, in their apps, students can quickly written for this platform, Google has built an extensive Software
learn to access the Web, manipulate multimedia data, and do other Development Kit (SDK) [4] comprising a large collection of Java
interesting data processing. classes. The SDK had gone through some major transitions along
with the various versions of Android. This made development
somewhat unstable and therefore not very amenable to the IT
Permission to make digital or hard copies of all or part of this work for personal or
classroom use is granted without fee provided that copies are not made or
classroom. However, by the time of Jelly Bean (Android 4.2 and
distributed for profit or commercial advantage and that copies bear this notice and 4.3), the SDK had stabilized quite a bit. That is when it was
the full citation on the first page. Copyrights for components of this work owned by adopted in our IT curriculum.
others than ACM must be honored. Abstracting with credit is permitted. To copy
otherwise, or republish, to post on servers or to redistribute to lists, requires prior The primary app development environment currently is the
specific permission and/or a fee. Request permissions from [email protected]. Eclipse IDE. A version of Eclipse coupled with the ADT
SIGITE'14, October 15–18, 2014, Atlanta, GA, USA.
Copyright © 2014 ACM 978-1-4503-2686-5/14/10$15.00. (Android Developer Tools) is available as a free download from
http://dx.doi.org/10.1145/2656450.2656461 [4]. It is referred to as the “ADT Bundle.” In the works is a new

127
environment called “Android Studio.” A preview version is The entire collection of files constituting a given app is organized
downloadable at [4]. in the “Project File Hierarchy.” This is generated automatically by
Eclipse on issuing a command to create a new app. Within this
An Android app can be viewed as a collection of so-called hierarchy, one will find a folder for the Java source files, another
activities. Loosely, an activity is a piece of app functionality that for the UI XML files, and various others containing app resources
requires its own user interface (UI). So, if some functionality
(such as predefined values and graphics). An example of a
requires a new UI, it would be defined as a new activity in its own hierarchy of the app named “DoubleIt” is shown in Figure 2.
right. An activity is modeled as its own Java class, which is
defined to be a subclass of the built-in SDK class Activity. As
such, it is good for the students to be aware of the subclass
(extends) mechanism of Java, though a thorough knowledge is not
absolutely necessary. Accompanying each activity class is an
XML file defining the UI’s layout. There are a number of built-in
widgets available. Some of the most useful for basic app
development include: EditText (for text input), Button (for
invoking activity functionality), TextView (for displaying text to
the user), and ImageView (display of images). An excerpt of an
XML file for a UI is shown in the following:
<EditText android:id="@+id/edit_number"
android:layout_width="match_parent"
android:layout_height="50dp"
android:inputType="number"
android:hint="@string/edit_number" />
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:onClick="displayDouble"
android:text="@string/button_double" />
<TextView android:id="@+id/text_answer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/text_answer" />
Figure 2. An app (“DoubleIt”) project hierarchy in Eclipse.
This XML defines three widgets: an EditText, a Button, and a
TextView. It will be noted that all the XML entities have a A very important file is the app’s manifest, denoted as
number of attributes that define their appearance and behavior. AndroidManifest.xml, which is an inventory of all the app’s
For example, the EditText and the TextView have the attribute components. In it, one will find entries (in XML) that define all
“id” allowing for the designation of an identifier that can be used the assets of the app. In particular, there are XML entries for each
to access these widgets from within the Java code. The activity as well as others for various app characteristics. The
respectively assigned identifiers in this case are edit_number and manifest file itself is created automatically by Eclipse, and is most
text_answer. The value of the EditText’s “hint” attribute, denoted often updated automatically as a result of a development action
“@string/edit_number,” is a string whose value is defined in a (e.g., the creation of a new activity). Manual editing of the file is
special app resource file named strings.xml. That file contains the done sparingly.
predefined strings used throughout the app, such as, in this
example, a hint in an input field or a label on a button (see its As a summary, I list the files that a beginning app developer, who
attribute “text”). The hint in this case is “Enter an integer value.” is mostly interested in producing basic apps (as might be the case
The button’s text is “Double It.” Assuming these widgets are in a lower-level IT course), would need to concern themselves
grouped within an Android vertical “Linear Layout,” this XML with the most:
code would be rendered as shown in Figure 1. Another important • Java files for the activities
attribute of the Button is “onClick” that defines the Java callback • XML files for the activities’ UIs
method to be invoked on the button press. Here, the method is • Android Manifest
displayDouble. This will be discussed further below. • strings.xml
The respective folder locations within the project hierarchy for
these are as follows. (See Figure 2 for an example.)
• /src/<package name>, where <package name> is the Java-
style package name associated with the app
• /res/layout
• app’s top directory
• /res/values
If the app happens to have only one activity, namely, the main
activity, then the only Java file would be MainActivity.java. Its UI
Figure 1. Activity UI including an EditText, Button, and would be defined in activity_main.xml. This can be seen with the
TextView. DoubleIt app in Figure 2.

128
3. ISSUES WITH APP DEVELOPMENT significantly reduce the emulator’s memory requirements. At
In this section, I go through some of the important logistical issues device setup time, one is asked to specify the sizes of RAM, the
that I have dealt with in my experience using Android with IT VM heap, internal storage, and the SD card. See Figure 3 showing
programming students. I also cover various pitfalls that have been that portion of the setup dialog. Typically, there will be some
encountered. Some of these are highly technical in nature, but it is default values depending on the type of device, like a Nexus 7. On
important that they be documented for those embarking on Windows machines, it is important that these figures do not total
Android app development in their classes. Various suggestions for more than 750 Mbytes or so. Far less than that amount, say, 300
improving the students’ and instructors’ experiences with Android Mbytes, is a better target.
are also given.
3.2 Manifest Activity Entries
3.1 Android Devices and Emulators As noted, the manifest contains entries specifying the components
Eclipse connects relatively seamlessly to actual Android devices, of the app. The following shows an example entry for the main
so students can see the products of their work almost immediately activity of an app:
in a “real-world” setting. An app can be launched directly from <activity
Eclipse and be seen running on a device. However, there is a need android:name="com.example.myapp.MainActivity"
for appropriate device drivers to be made available in the android:label="@string/app_name" >
operating environment. The Mac OS is probably the simplest as <intent-filter>
many of the drivers for the most popular devices are provided <action android:name="android.intent.action.MAIN"/>
<category
without the need for further downloads. In a Windows setting on a
android:name="android.intent.category.LAUNCHER"/>
PC, the student will often have to search out the proper driver and
</intent-filter>
download it. In a laboratory network setting, it is sensible for the </activity>
instructor to make requests for drivers for popular devices in
advance, maybe via a poll of the students. While the details of this entry are not overly important, it is
important that the student be aware that such an entry must appear
When connecting to and running apps from Eclipse on an actual for each activity created. If an entry is not included, then the app
device, it is mandatory that “USB debugging” be enabled on the will immediately crash when an attempt is made to invoke that
device. This feature can often be found under the device’s settings activity (from within the Java code of another activity). This
page. Let me note that this was a common source of frustration for situation is often very confusing to the student. And Eclipse does
students, particularly at the beginning of their studies. They would not provide any guidance or alerts in this situation.
often be baffled as to why a seemingly correct app would not run.
The lack of a manifest entry for an activity often arises when the
An easy way to check that a device is properly connected and student tries to create a new activity “manually” by directly
visible to Eclipse is with the use of the command-line tool adb creating a new Java class in the project instead of using Eclipse’s
(“Android Debug Bridge”), distributed with the ADT Bundle. “new activity” mechanism to do it. The former requires that the
This is a very useful utility that has a variety of applications. To student manually edit the manifest (and do a considerable amount
see a list of currently available devices, issue the command: of additional bookkeeping). Letting Eclipse handle the initial
adb devices creation of the new activity allows the student to forgo that work
and avoid this common pitfall.
If an expected device is not shown, it indicates either a lack of an
appropriate driver or the fact that USB debugging is disabled. 3.3 Java in the Android Setting
Working with Java in the Android environment differs somewhat
from working with it in more traditional settings. For instance, in
an app, there is no “main” method, which oftentimes students are
expecting from their previous Java development work. Instead,
there is a “main activity” that serves as the primary entry point
into the app. It is critical that the main activity, as with all other
activities, be created by Eclipse itself, and not manually by the
programmer.
Apps do not quit in the sense that traditional, stand-alone Java
programs do. In fact, apps are effectively assumed to be running
  all the time—sometimes, though, they are pushed to the
background and enter an idle state. As such, a foundational notion
Figure 3. Setting the memory sizes of an emulator. of Android is the activity lifecycle and its management [4,5]. For
example, an app developer needs to be concerned with the issue of
An alternative to real Android devices is one of the many what happens when an activity is initially created, or when it is
available software emulators. Students will need to set it up using restored, or when it ends. Each activity class is defined with an
Eclipse’s Android Virtual Device Manager. These emulators are onCreate method to deal with the former. This processing
very sophisticated, and mimic the features of the devices very modality can be quite unfamiliar to a beginner. And, in general,
well. For example, they have their own internal file systems that properly managing the activity lifecycle can be complicated.
can be navigated using Linux-like commands (with the help of Luckily, for simple apps in an IT course setting, this topic can be
adb). However, due to their complexity, it is widely known that reasonably ignored. For students interested in seriously pursuing
the emulators can be excruciatingly slow, particularly on older app development for commercial production, it is something they
model laptops. One suggested way to overcome this problem is to must eventually wrap their heads around.

129
3.4 Java-XML Connection with the use of the intrinsic SDK method findViewById. For the
Android app development has the added benefit of reinforcing the two widgets shown in Section 2, we would write:
GUI development process and enhancing the student’s XML EditText et = (EditText) findViewById(R.id.edit_number);
skills. That said, there are some serious pitfalls that the students TextView tv = (TextView) findViewById(R.id.text_answer);
are liable to encounter in this context. In fact, a seemingly
innocent syntax error in an XML UI file will often propagate into EditText and TextView are built-in classes. The “R.id.x” notation
mysterious errors in the Java code that are not easy for the is an Android convention for accessing various app resources.
students (or their instructor) to pick up on. Errors in the rather This is a case where Eclipse will aid in the linkage between the
simple file strings.xml can also cause unexpected problems Java code and the XML. When typing the Android id, such as
throughout the app. edit_number, the programmer will see it automatically italicized if
In the following, I examine two major problems that I have seen Eclipse has successfully located an existing widget with that given
time and again in my courses. id. A failure is immediately apparent and can be corrected easily.
Even with the help of Eclipse, students will on occasion have real
3.4.1 Missing or Incorrect Callback Methods problems with this Java-XML linkage. First, the Android id of the
In order to link a button widget to the Java code that it is designed widget could be mistyped and not noticed. Worse is the case when
to invoke, we use the XML attribute “onClick.” From the example students copy code inattentively. In either case, the value of the
presented above, this looks like: reference to the widget object may very well end up being null,
android:onClick="displayDouble" which would result in an app crash when an access such as the
following reading of a value from the EditText is attempted:
In this instance, a user click will invoke (callback) the method
displayDouble defined as part of the corresponding Java activity num = Integer.parseInt(et.getText().toString());
class. The signature of this method must be exactly: Sometimes the students instantiate the EditText independent of
public void displayDouble(View view) findViewById and the UI altogether. That is, they create an
EditText object that has no connection whatsoever to the declared
where View is a built-in class SDK class. Deviating from this UI. This leads to an eventual confusing crash.
signature or omitting the method altogether will result in a run-
time crash of the app on the button press. A common pitfall is the
omission of the View parameter, which must be included even if it 3.5 “Import android.R” Problem
is not used. Therefore, students should get into the habit of An issue related to Java-XML connection issues discussed above
immediately inserting a stub in their activity class when adding a is what I term the “import android.R” problem. At times, an
button widget to their UI. import statement of the form “import android.R” showed up in an
activity class file along with an error message of the form: “R
A related, and perhaps more insidious, problem arises when using cannot be resolved.” This problem would arise for no particular
the “action bar” UI component introduced as of Android 3.0. The rhyme or reason, and it would not even be consistent for a
action bar is an important app navigational feature, similar to a particular student. Apparently, it is dependent on the version of
menu of action items. From the programmer’s perspective, each the platform being used and the version of Android and Eclipse.
action item is linked to a callback method that implements the When this problem occurred, it manifested itself in such a way
appropriate functionality. Again, the action item defined in XML that none of the Android id’s of the UI widgets could be resolved,
has an onClick attribute for declaring this linkage. The callback and errors would propagate throughout the entire app project. The
method’s signature differs slightly from that of the button callback student would be facing a sea of red flags, leaving them totally
as can be seen in this example: perplexed and running to the instructor for help.
public void onOption1(MenuItem i)
As some background, R.java is a file generated automatically to
The difference with the action-bar callback mechanism is that an help manage references to an app’s resources. The on-line
omitted or incorrectly written callback signature will result in an Android developer community discusses this problem in a number
immediate crash of the app on startup, not at the time the action of different forums (such as [7]). It apparently comes about due to
item is selected by a user. This can be particularly disconcerting to misnamed resource files and other similar mistakes, though many
students and often leaves them unaware as to how to proceed. in the community refer to it as a bug in Eclipse.
Here, too, they must be encouraged to define stubs for their The way to resolve this problem is to delete all imports in the
callbacks when building their action bar in XML. activity class, generate them anew (using CTRL-SHIFT-O in
Again, it is important to note that Eclipse will not detect these Windows or CMD-SHIFT-O in Mac OS)—making certain that
kinds of problems with callback methods before run-time. “import android.R” is no longer present—and then “clean” the
Arguably, that is a flaw of the environment. app using the command under the “project” menu.

3.4.2 Incorrect Access of Widgets by Id 3.6 Permissions


Simple text input is accomplished using the EditText widget. The
In order for apps to do certain kinds of tasks, such as writing to
related TextView widget provides a convenient means for text
external SD card storage or accessing data on the Web, the app
output. Both widgets have been used extensively by my students
must be given explicit permissions. These are included as XML
in their app projects. As shown above, these widgets would be
entries in the manifest. For example, to allow the app to write to
included in the UI by writing XML code entries and assigning
the SD card, it needs this permission:
explicit id’s. In order for the Java code (e.g., a callback method) to
access these widgets, they must be instantiated as Java objects <uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

130
To access the Internet, it requires: However, there is a problem with this activity in the context of
<uses-permission android:name="android.permission.INTERNET" />
Android. As of SDK API Level 11 (available with Honeycomb),
blocking activities occurring on the main UI thread automatically
If a necessary permission is omitted, then the app will crash when cause exceptions to be thrown. Such an operation must be moved
it attempts the operation. Note that Eclipse is not helpful in regard off the main thread and completed asynchronously. This can be
to permissions as it does not inspect the manifest for you. It is done with the use of standard Java threads [5]. Additionally, the
therefore very important that students include the specification of SDK provides a class called AsyncTask that conveniently models
permissions as part of a check-list for their development process. the necessary background processing. AsyncTask is a generic that
is extended as a private class within the activity class needing its
3.7 Importing and Copying App Projects services. See, e.g., [5] (Volume II) for details.
With traditional Java programs, it is quite simple to distribute From a pedagogical perspective, writing asynchronous code using
sample programs to a class so that the students can read through AsyncTask, or other means, is probably too advanced for the
them and run them on their own. The distribution is especially beginning app developer. I have personally avoided it in my own
easy when the program comprises just a few modules. With an courses. (It would be quite suitable for an upper-level, advanced
app, the entire project hierarchy has to be distributed. I would treatment of app development.) For non-production apps in a
typically deliver fully working apps to my classes as zipped course setting, it makes sense to simply override Android’s so-
archives posted on Moodle. After the students downloaded and called strict-mode policy and allow apps to do whatever business
unzipped an app, there was still the issue of importing it into their they need to do on the main thread. Completely overriding this
Eclipse workspace, from which it can be run. Eclipse maintains a policy is quite straightforward. One simply includes the following
workspace of app projects. (There can be multiple workspaces, two somewhat verbose statements in the onCreate method of the
but only one is deemed to be open at a time.) As it happens, the app’s main activity:
import process does not always work properly. In fact, some
StrictMode.ThreadPolicy policy = new
students could simply not complete the import process at all. This
StrictMode.ThreadPolicy.Builder().permitAll().build();
usually occurred on personal laptops, for unknown reasons. In
StrictMode.setThreadPolicy(policy);
such cases, they were forced to start new apps from scratch and
copy the required code elements in manually. I have utilized this disabling of the strict-mode policy in most app
projects in my courses. On occasion, I will provide students with
In other cases, the app would import with certain names altered some complete code demonstrating the use of AsyncTask, such as
unexpectedly. In the simplest situation, the app could be renamed
in Java code for downloading jpeg images from the Web.
(“refactored”).
I have also found occasion to use it when doing socket
programming in the context of client/server topics. I will typically
Need to refactor have the students write servers as conventional Java programs and
run them on our server machines on campus. The clients are
written as Android apps connecting to the servers via the standard
Java socket mechanism. However, the strict-mode policy will
forbid the blocking accompanying the network communication.
To simplify matters, I have the students disable it here, too.
Figure 4. Refactor folder containing Java source files.

A related issue is that of making a copy of an existing app to serve 3.9 Debugging
as the basis for a new one. Again, with an app, this requires that Students will invariably find their apps crashing. This can happen
an entire project hierarchy be duplicated. Eclipse will do this for for many reasons, some already documented above. The Eclipse
you, but there is some bookkeeping that is required after the fact. environment is excellent for uncovering syntax errors and guiding
The steps needed are as follows. students to their correction. However, as noted in places above
already, with Android-specific problems, it is much less effective
1. Change the package name in the manifest. in its assistance. Students must become comfortable with the
2. Refactor (rename) the folder under the folder /src such debugging features that are available to them. It is imperative that
that its name is now the same as the new package name. they make use of Eclipse’s “LogCat,” in which various status
This is the folder that holds all of the app’s Java source messages of Eclipse and running apps are displayed. The SDK has
files. (See Figure 4.) a built-in “Log” feature that allows a running app to explicitly
3. Make updates to strings.xml, including changing the post different kinds of messages directly in the LogCat. (Note that
app’s name to the desired new name. the feature is unavailable to apps running directly on Android
devices.) Students should get comfortable right from the outset
With regard to (3.), the entry for the app’s name in strings.xml
using Log commands within their apps, particularly during the
will look like:
testing phase. Instructors are advised to make these a requirement
<string name="app_name">Double It</string> of assignments early on.

3.8 Internet Access 3.10 App Submission and Testing


Arguably, one of the most exciting characteristics of apps from a The rather mundane issue of student project submission and
student’s perspective is the ability to access data and resources on testing can be a major headache for a course instructor. To test an
the Internet and Web. For example, an app might go out and app, one must load it onto a device or emulator. This means
directly open a file at some given URL. I have found this having access to an app’s entire project hierarchy and being able
particularly useful in reinforcing the notion of file input. to import it into your Eclipse workspace. As discussed, the import

131
feature does not always function too well. Moreover, the logistics environment variables in Windows). It is therefore probably better
of having to import all the code and run the apps with sample data to have students install Eclipse on their own laptops and have
is very time-consuming. Often, it is better to arrange lab time them do their development work there.
during which students can show personal demonstrations. This, of
course, is in contrast to traditional Java assignments where it is 5. CONCLUSION
often possible to set up scripts in, say, a Linux environment that
Mobile computing using smartphones and tablets—and eventually
help automate the process of running through and testing
watches and other wearable devices—is beginning to dominate
submitted projects. Some degree of automation is available with
the IT field. Students are now entering IT degree programs armed
the use of the adb tool, which has the capability of inputting data
with these devices and a clear understanding of their utility. As
directly into an app’s UI while it is running. For example, to have
such, students are apt to get more excited about programming
the string “Hello” placed in a selected EditText, you can use the
when they are building apps on devices they can readily relate to.
following command:
Moreover, they can develop apps that access the Web, manipulate
adb shell input text "Hello" multimedia assets, etc., gaining first-hand experience with the
inspiring products programming can achieve.
Putting a sequence of such commands into a script can be useful
for app testing. Android is now being used as the development platform in an IT
programming course at my university. In the process of
transitioning to Android, many subtle issues and pitfalls have been
4. DISCUSSION encountered. These have been documented in this paper, and tips
Android apps have become pervasive, and the well-prepared IT and suggestions have been provided that should make the Android
student should be able to program in that environment and be
app development experience more successful and that much more
aware of the many issues and pitfalls surrounding such rewarding for instructors and students alike. Some additional uses
development activities. This paper has addressed and provided of Android in the IT curriculum were discussed.
guidance in dealing with a number of these, both from an
instructor’s and a student’s perspective.
6. REFERENCES
There are many useful on-line resources that provide guidance to [1] V. Goel. Mobile Internet Rising, Report Says. Business Day,
Android developers. One of them is the Android Developers site The New York Times, p. B7, June 2, 2014.
[4]. Another site that I have encouraged my students to take
advantage of is Stack Overflow [7]. In an effort to simplify [2] Q. H. Mahmoud and A. Dyer. Mobile devices in an
students’ app-specific coding requirements, the Sofia framework introductory programming course. Computer, 41(6): 108–
[8] has been introduced to hide various details of the Android 107, June 2008.
environment, such as elements of GUI management. [3] B. Burd, J. P. Barros, C. Johnson, S. Kurkovsky, A.
Rosenbloom, and N. Tillman. Educating for mobile
Of course, Android is not the only mobile platform. Apple iOS is computing: addressing the new challenges. In Proc. ITiCSE-
very popular but imposes developer fees and restricted access to WGR '12, p. 51–63, Haifa, Israel, July 2012.
actual devices like iPhones. Moreover, students will need to learn
Objective-C, whose main use today is with Apple. A comparison [4] Android Developers, available at
of Android and iOS can be found in [9]. Windows RT allows http://developer.android.com. Accessed June 2, 2014.
developers to choose from a number of languages, including C#, [5] L. Darcey and S. Conder, Android Wireless Application
VB, and C++. JavaScript along with HTML/CCS can also be used Development (Volumes I and II), Third Ed., Addison-
in Windows RT and in the device-agnostic PhoneGap framework Wesley, Upper Saddle River, NJ, 2012.
[10]. App Inventor for beginning programmers in Android uses [6] P. J. Deitel, H. M. Deitel, A. Deitel, and M. Morgano,
the blocks language [11]. TouchDevelop allows for programming Android for Programmers: An App-Driven Approach,
directly on a mobile device without a connected computer [12]. Pearson Education, Upper Saddle River, NJ, 2012.
Beyond programming skills, the Android platform is suitable for [7] Stack Overflow, available at http://stackoverflow.com.
more advanced studies within the IT curriculum. Android comes Accessed June 5, 2014.
with an embedded database engine called SQLite [5], allowing it [8] S. H. Edwards and A. Allevato. Re-imagining CS1/CS2 with
to serve as a vehicle for the study of DBMSs and DB Android using the Sofia framework. J. Comput. Sci. Coll.,
programming. Moreover, mobile-device security is a critical issue 29(3): 101, January 2014.
in IT, and knowing Android and app development puts students in
[9] M. H. Goadrich and M. P. Rogers. Smart smartphone
a good position to study this topic as well. And there are many
development: iOS versus Android. In Proc. SIGCSE '11, p.
opportunities for covering more advanced programming topics in
607–612, Dallas, TX, March 2011.
Android, such as inter-activity communication using singleton
classes, asynchronous processing using multithreading, managing [10] PhoneGap, available at http://phonegap.com. Accessed June
dialogs using the SDK’s “fragment” facility [5], etc. 6, 2014.
[11] App Inventor, available at http://www.appinventor.org.
Eclipse is a widely used IDE that offers many benefits to students.
Accessed June 6, 2014.
However, it does have some drawbacks that have been discussed
above. Furthermore, it is not designed for a multi-system, multi- [12] N. Tillmann, M. Moskal, J. de Halleux, M. Fahndrich, J.
user environment. An instructor will probably be “leaning” on the Bishop, A. Samuel, and T. Xie. The future of teaching
system administrator for help with some of its idiosyncrasies and programming is on mobile devices. In Proc. ITiCSE '12, p.
guiding students through assorted setup tasks (e.g., setting 156–161, Haifa, Israel, July 2012.

132

You might also like