The challenge of developing applications for android ...

4 downloads 181882 Views 375KB Size Report
applications for the Android and iOS platform for assistive living environments. ... [9], context-awareness in mobile device applications [4] [10] and mobile service ...
A Cloud on the Horizon: The Challenge of Developing Applications for Android and iPhone Tor-Morten Grønli

Jarle Hansen

Gheorghita Ghinea

Norwegian School of Information Technology / Brunel University Schweigaardsgt. 14, 0185 Oslo Norway

Brunel University Uxbridge UB8 3PH, London United Kingdom

Brunel University / Norwegian School of Information Technology Uxbridge UB8 3PH, London United Kingdom

[email protected]

[email protected]

ABSTRACT In the last few years, since the initial release of Android and iPhone in 2007, building applications for mobile platforms has opened many new possibilities for software developers. Development for mobile devices comes with its own challenges like battery life, small screens and touch screen interface. This paper goes into detail on some of the challenges when developing for Android and iOS devices.

Categories and Subject Descriptors D.3.0 [Programming Languages]: General - Standards

General Terms Documentation, Standardization, Languages, Theory.

Keywords Android, iOS, iPhone, Mobile development challenges, Assistive living.

1. BACKGROUND Software development is an area that is always evolving, making development and maintenance of the applications a challenging and time-consuming task. Moreover, mobile devices today are not bound to the same restrictions as they were just a few years ago. Still, the programming languages, tools and literature do not always reflect this. There is also very little research conducted in this area, focusing on the specific challenges when creating applications for the Android and iOS platform for assistive living environments. In this paper, we will pinpoint and propose solutions to some of the main challenges when developing and maintaining assistive applications for Android and iOS devices. Previous research has focused on issues like user interface design [9], context-awareness in mobile device applications [4] [10] and mobile service development [3][7]. In a closely related paper a comparison between Android, Windows Mobile and Java ME is presented [6]. 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 distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Conference’10, Month 1–2, 2010, City, State, Country. Copyright 2010 ACM 1-58113-000-0/00/0010…$10.00.

[email protected]

One example of combining mobile devices in an assistive living setting is presented in the paper written by Bohonos et al [2]. They present a system written in Java ME that was created to help blind people cross over busy intersections with a Text-To-Speech feature. Android is also starting to emerge in assistive living research due to the openness of the platform. One of the main benefits of having an open source and flexible operating system is the ability to adapt the system to any specific needs. Banga [1] is a system that takes advantages of this by providing a word finding exercise. This application was created to help people suffering from aphasia. Another example of assistive living applications based on the Android platform is an ongoing research project to enable blind and visually impaired people to use smart phone devices. The aim is to create a whole new user experience and, in so doing, replace the entire phone menu system. Closely related to the work presented in this paper is the research conducted by Huebscher et al [8]. They focused on issues surrounding ubicomp (ubiquitous computing) development and in particular problems with the Symbian C++ and Java ME environment. The purpose of this paper is to focus on the Android and iOS platform and go into more detail than presented in the research conducted by Huebscher et al [8]. Moreover, we look at two of the most popular mobile platforms and highlight some of the major issues we have encountered.

2. MOBILE DEVELOPMENT CHALLENGES In this section we will start by looking at test support followed by platform features. Memory management goes more in-depth on an important platform feature called garbage collection.

2.1 Test Support In desktop/server application development there are plenty of resources and best practices available on testing and creating quality tests. For mobile development the situation is quite different. Often books do not even mention how tests should be created and certainly not going into details like how the components should be tested. All software should be tested and applications created for assistive living is certainly no exception. Some of the assistive living applications provide a crucial user service and any bugs might impact their day-to-day life seriously. When setting up the development environment it is generally best to add the tests to a separate project. This has benefits like being able to use a range of different tools that you do not necessarily have access to in your main project. The most important issue is

that you continuously write tests as you implement new business logic. This will increase the overall quality of the software and make refactoring much easier in the future. In Android one cannot easily run normal Java tests. The Android development environment is dependent on a file called android.jar. This file contains stub-objects of the entire platform to be able to compile your source code against. When running the project one uses the emulator that has a complete implementation of the platform. In our opinion this has a few negative side effects. When you are creating a third party library you will many times not have any GUI (Graphical User Interface) at all. The problem arises when testing a third party library without starting the emulator. The emulator can be slow to start and you want your tests to run as quickly as possible. If you try to run your tests against the android.jar-file you will get a RuntimeException, this is because Google has simply stubbed out the implementation with methods throwing an exception (see Figure 1). It is possible to work around this issue by creating a custom jar-file that will not throw these exceptions, but Google should have addressed this issue. For integration tests it is a different aspect where the emulator most definitely should be used.

Figure 1. Android.jar file, Log class implementation. In general the test support in Android is very good. They have test utilities for mocking out system objects and they use the wellknown JUnit framework. The default Android plugin for Eclipse and IntelliJ IDEA adds tools that make it easy for developers to create and maintain tests. We have also found it useful to try to separate the small and quick tests from the tests that are slower and might cover a larger part of the system. This can be achieved by creating a project for only the system and/or integration tests.

2.2 Memory Management Garbage collection is the process of automatically freeing objects that are no longer needed by the application [11]. These objects are no longer used and can therefore be thrown away. Bill Venners uses the term "memory recycling" explaining that the garbage collection process is all about freeing memory taken by objects no longer referenced. The Java ME, Android and Windows Mobile platforms all provide a garbage collector. This means that the platform handles all the administration of allocating and releasing objects from memory. For the iOS platform, however, this is not supported. One of the reasons why garbage collector was not added to this platform was due to battery constraints. A garbage collector will add more overhead for the application and therefore use more battery. When developing for the iOS platform the developer needs to manually allocate and release certain resources. The big disadvantage of this is the extra responsibility put on the programmer, and if you get it wrong your application can have major performance problems. One of the main issues is that your application can contain a memory leak and will start to run slowly over time, possibly freezing and become unresponsive.

Apple does provide excellent tooling for finding memory leaks. The Instruments application is a very useful tool that should be used when testing out your application. It is able to analyze the memory allocation while the application is running and any memory leaks will be reported.

3. SUMMARY This paper highlights common challenges for mobile application developers. Last but not least, we mention that the platforms discussed in this paper have a marketplace (Android Market/App Store) where developers can publish their work, making it easy for consumers to find, install and rate one’s application.

4. ACKNOWLEDGMENTS We thank Mr Alexander Dreyer Johnsen for information on the Android menu system designed for visually impaired and blind.

5. REFERENCES 1.

Benjamin, C., Harris, J., Moncrief, A., Ramsberger, G., and Lewis, C. Naming practice on an open platform for people with aphasia. Proc. 10th Int. ACM SIGACCESS conference on Computers and accessibility, ACM (2008), 265–266. 2. Bohonos, S., Lee, A., Malik, A., Thai, C., and Manduchi, R. Universal real-time navigational assistance (URNA): an urban bluetooth beacon for the blind. Proc. 1st ACM SIGMOBILE Int. workshop on Systems and networking support for healthcare and assisted living environments, ACM (2007), 83–88. 3. Bottaro, A. and Gérodolle, A. Home SOA -: facing protocol heterogeneity in pervasive applications. Proc. 5th Int. Conf. on Pervasive services, ACM (2008), 73–80. 4. Du, W. and Wang, L. Context-aware application programming for mobile devices. Proc. of the 2008 C3S2E conference, ACM (2008), 215–227. 5. Gartner. Gartner Says Worldwide Mobile Phone Sales Grew 17 Per Cent in First Quarter 2010. http://www.gartner.com/it/page.jsp?id=1372013. 6. Gronli, T.-M., Hansen, J., and Ghinea, G. Android vs Windows Mobile vs Java ME: a comparative study of mobile development environments. Proc. PETRA 2010, ACM (2010), 45:1–45:8. 7. Heikkinen, M.T. and Still, J. Benefits and challenges of new mobile service development in R&D network. Personal and Ubiquitous Computing 12, (2008), 85–94. 8. Huebscher, M., Pryce, N., Dulay, N., and Thompson, P. Issues in Developing Ubicomp Applications on Symbian Phones. Proc. Int. Workshop on System Support for Future Mobile Computing Applications, IEEE Computer Society (2006), 51–56. 9. Milic-Frayling, N., Hicks, M., Jones, R., and Costello, J. On the design and evaluation of web augmented mobile applications. Proc. 9th Int. Conf. on HCI with mobile devices and services, ACM (2007), 226–233. 10. Raento, M., Oulasvirta, A., Petit, R., and Toivonen, H. ContextPhone: A Prototyping Platform for Context-Aware Mobile Applications. IEEE Perv. Computing 4, 2005, 51-59. 11. Venners, B. Garbage Collection. http://www.artima.com/insidejvm/ed2/gc.html.

Suggest Documents