Life Cycle Implementation of an Android Application ...

2 downloads 81 Views 437KB Size Report
Android provides access to a wide range of useful libraries and tools that can be used to build rich applications. For example, Android enables developers to ...
74

KABIR ET AL: LIFE CYCLE IMPLEMENTATION OF AN ANDROID APPLICATION FOR SELF-COMMUNICATION WITH INCREASING EFFICIENCY, STORAGE SPACE AND HIGH PERFORMANCE

Green University Review ISSN 2218-5283

Life Cycle Implementation of an Android Application for SelfCommunication with Increasing Efficiency, Storage Space and High Performance Md. Alamgir Kabir1*, Sydul Islam Khan2 and Md. Ismail Jabiullah3 Keywords: Smartphone, Linux Kernel, SDLC, Life Cycle and Android.

Abstract: Android is a Linux-based platform for mobile devices such as smartphones and tablet computers. It is developed by the Open Handset Alliance led by Google. Android delivers a complete set of software for mobile devices: an operating system, middleware and key mobile applications. In this paper, some of the phases of the system development life cycle have been implemented on android application and analyze the result of testing for efficiency, storage space and performance of the application that establishes the self-communication in mobile android applications.

1. INTRODUCTION

A

ndroid is an operating system that includes middleware and key applications. Android Inc. was founded in Palo Alto California, U.S. by Andy Rubin, Rich Miner, Nick Sears and Chris White in 2003[1-2]. Later Android Inc. was acquired by Google in 2005. After the original release there have been a number of updates to the original version of Android. There has been big barrier of broad scope of embedded devices software especially if we talk about the operating systems of embedded devices. Still abundantly used embedded devices like mobile phones are still living on proprietary operating systems, to work on those systems developers have to pay heavy prices to purchase development environment and build-linker-debugging tools. This leads to slow development in overall mobile development field, since many homebrew developers are unable to apply their research and development knowledge.

1

This barrier to application development began to crumble in November of 2007 when Google, under the Open Handset Alliance, released Android [3]. The Open Handset Alliance is a group of hardware and software developers, including Google, NTT DoCoMo, Sprint Nextel, and HTC, whose goal is to create a more open cell phone environment. The first product to be released under the alliance is the mobile device operating system, Android. Android is what’s known as open source and, to a large degree, that means that its inner workings and machinations are free for the public to access, view and even tinker with [4]. Android will ship with a set of core applications including an email client, SMS program, calendar, maps, browser, contacts, and others. All applications are written using the Java programming language. Android was built to be truly open. For example, an application can call upon any of the phone’s core functions such as making calls, sending text messages, or using the camera, allowing developers to create a richer and more cohesive experiences for users. Android is built on the open Linux Kernel [5]. Furthermore, it utilizes a custom virtual machine

Md. Alamgir Kabir is with the Department of Software Engineering, Daffodil International University, Dhaka, Bangladesh, E-mail: [email protected] 2 Sydul Islam Khan is with the Department of Computer Science and Engineering, Daffodil International University, Dhanmondi, Dhaka, Bangladesh. 3 Md. Ismail Jabiullah is with the Department of Computer Science and Engineering, Hamdard University Bangladesh, Megnaghat, Narayangonj, Bangladesh, E-mail: [email protected] Manuscript Dates: Received: 01 December 2012; Revised: 24 December 2012; Accepted: 26 December 2012

GREEN UNIVERSITY REVIEW, VOLUME 3, NUMBER 2, DECEMBER 2012

that was designed to optimize memory and hardware resources in a mobile environment. Android provides access to a wide range of useful libraries and tools that can be used to build rich applications. For example, Android enables developers to obtain the location of the device, and allows devices to communicate with one another enabling rich peer–to–peer social applications. In this paper, life cycle phase of the system development life cycle (SDLC) has been implemented [6]. This approach imposes better efficiency, increases performances in storage capacity and shows high performance in the selfcommunication environment.

2. CONVENTIONAL APPROACH Android allows developers to write managed code in the Java language, controlling the device via Google-developed Java libraries. Applications written in C and other languages can be compiled to ARM native code and run, but this development path isn't officially supported by Google [4-7]. Android is available as open source [3].

2.1 APPLICATION LIFECYCLE In Android, the applications are run as separate Linux processes. So the application lifecycle is closely related to the process of lifecycle. The application process of lifecycle is handled by the system depending on the current system memory state (Fig. 1). In case of low memory, the Android system kills some less important processes. The process importance is decided depending on the state of the process components.

75

2.2 FOREGROUND PROCESS The process types depending on the importance are as follows, from most important to least important. A foreground process is the application process with which the user is currently interacting. The process is considered to be foreground if its activity is at the top of the activity stack; its onResume() has been called or Broadcast Receiver is currently running (onReceive() method is currently being executed) or its Service is executing callback functions like onCreate(), onStart() or onDestroy() methods. Empty Process: Empty process is the one that does not have any active application components. These processes are kept on for caching purposes. It is important that application developers understand the lifecycle of the application process. Not using these correctly can result in the system killing the application’s process while it is doing important work. In this time, if one wants to make an app visible in the foreground, he/she needs more memory and more time. When another app or activity comes into the foreground, the recent activity goes to the background. It is the life cycle of an Android application.

3. PROPOSED SYSTEM Unlike the existing system approach, the proposed system is a multi-application integration for building a life cycle implementation system of an Android application for self-communication technique. Integration is very much needed for reducing time and increasing efficiency and saving storage space (Fig. 2). For this purpose we need some valuables applications which will be integrated. The applications could be (a) Browser, (b) An email template, (c) Music player, etc.

4. DIAGRAMMATIC APPROACH This system has been developed using prototype design or step-by-step application by application methodology. Flow Diagram: Integrated apps MAI Android is main interface. When we click the MAI interface then all applications will start. Every application is a separate class and integrated into the main Fig. 1: Android Application Life Cycle

76

KABIR ET AL: LIFE CYCLE IMPLEMENTATION OF AN ANDROID APPLICATION FOR SELF-COMMUNICATION WITH INCREASING EFFICIENCY, STORAGE SPACE AND HIGH PERFORMANCE

interface. So, all applications will run in one 5. IMPLEMENTATION APPROACH click. Then, we can switch one app to another app (Fig. 3). A. Requirement Issues Logical Diagram: Splah.java is start class and Menu.java is main class which has integrated all applications. Menu.java contains all applications which are necessary. If any application is needed then we will add in Menu.java class. In Menu.java class contains all application and we can switch one app to another app (Fig. 4). Activity Launche d

App

Now we are in OnCreate () Method

 Integration is very much needed for reducing time and increasing efficiency and saved storage space  Need some valuable applications which will be integrated  So some applications to be integrated which are very much necessary such as: o Browser o An E-mail Template o Music Player etc. B. Data Collection Table 1: Collected user requirements

Name Now we are in OnStart () Method

Now we are in OnResume () Method

Non Integrated Apps Platform App 1 Pause

Another app comes into the foreground

Now we are in OnPause () Method

App activity stops and destroys by the system Fig. 2: Existing android application lifecycle Fig. 3:implemented Existing Android Application Now we are in OnStop () Method

Requirement

Need

Responder 1 Integrated software (a)Browser which contain (b)Need e-mail necessary software template which usable for all e-mail Responder 2 Reduce time abuse (a)Browser (b)Email (c)Calculator (d)SMS (e)Mp3 Player Responder 3 Integrated software Necessary software which contain necessary applications

C. Analysis and Design Which is clearly described in section 3 (Proposed SystemDiagram). D. Testing for Proposed Android Environment The proposed system passed the time efficiency test.

6. EFFICIENCY MEASUREMENT

Fig. 3: Step by Step Prototype

For the integration approach, application will be more efficient and not need more time to access the necessary applications and application performance will be high. Detailed descriptions are given below: Time Efficiency: Time efficiency for the Android applications are given in Table 2.

Fig. 4: Logical Diagram for High Class Diagram

Table 2: Time Efficiency Measurement Application Individual Integrated Use Name Use Browser 4 seconds 4 seconds Email 3 seconds Integrated Time as the largest application requires Total Time 7 seconds (4+0)=4 seconds

GREEN UNIVERSITY REVIEW, VOLUME 3, NUMBER 2, DECEMBER 2012

Table 2 shows an approximate compari son between seperately used applications and integrated applications, where it is clearly shown that the integrated application platform takes less time than the separatly used applications. The integrated application platform takes less time than the separat ely used application platform so, it releases the memory early which is clearly shown in Fig. 3, and thus the processor can use the memory more effficiently. Here the necessary application is integrated. So, all applications are in one application , that means integrated application. For this, the integrated application runs and keeps all the activity cycle at one time. So less memory is required and hence improves performance and increases efficiency. Apps

Integrated Apps

77

relases the memory early which is clearly shown in Fig. 3 and thus the processor can use the memory more effficiently.

7. BROWSER TEST Integrated browser has been done successfully. Android 1.6 browser are supported by flash. But integrated browser is fully supported for Android 1.6 to Android 4.03 because integrated app’s build in target 1.6 to 4.03. For this, Android 1.6 users can use this integrated app.

Activity Launched

Now we are in OnCreate () Method

Integrated apps launched is in OnCreate () Method

Now we are in OnStart () Method

Integrated apps is in the OnStart () Method

Now we are in OnResume () Method

Integrated Apps Platform

Integrated apps launched as foreground Another app comes into foreground

Now we are in OnPause () Method All application pause together Now we are in OnStop () Method

Apps activity stop and will destroy by the system

Fig. 5: Proposed android application lifecycle implemented

Fig. 5: Proposed Android Application Lifecycle

Fig. 6: Browser Test

8. CONCLUSIONS The world is contracting with the growth of mobile phone technology. In recent days, Android is the most popular operating system for all cell phone s. Multi-application integration approach for Android environment increases efficiency, save storage space and in this way provides high performance which is the ultimate goal of the system.

Memory Efficiency At first, Integrated apps are part of the OnCreate() Method. Then Integrated apps are in the OnStart() Method then OnResume() Method. Now the integrated apps are running together. For this time, we can switch from application to application because all applications are integrated (Fig. 5). For this extra memory is not needed. So, in integrated apps, memory is used more efficiently to switch one app to another app and performance is increased. Performance Analysis Table 2 shows the approximate compar ison between seperately used applications and integrated applications where it is clearly shown that the integrated application platform takes less time than the separatly used applications. So, it

REFERENCES [1]

[2]

[3]

[4]

[5] [6]

By Dan Sung, 11 April 2011 17:24 GMT. Open Source. [Online] Available at:[Accessed 24 February 2012]. Engineers Garage. Introduction.[Online]. Available at: . [Accessed 25 February 2012]. Apache 2.0.Android 4.0 r1 - 14 Feb 2012 21:12. What is Android? [Online]. Available at: [Accessed 24 February 2012]. Android Competency Center.January 14th, 2009. Android Application Life Cycle. [Online] Available at:[Accessed 24 February 2012]. Reto Meier, “Professional Android 2 Application Development”, ISBN: 978-81-265-2589-8. Mark L. Murphy, “Beginning Android 2”, ISBN – 13(pbk): 978-1-4302-2629-1, ISBN – 13 (electronic) : 978-1-4302-2630-7.

78

[7]

KABIR ET AL: LIFE CYCLE IMPLEMENTATION OF AN ANDROID APPLICATION FOR SELF-COMMUNICATION WITH INCREASING EFFICIENCY, STORAGE SPACE AND HIGH PERFORMANCE

Marko Gargenta, “Learning Android”, ISBN: 978-1449-39050-1.

Md. Alamgir Kabir is a 4th year student of the Department of Software Engineering (SWE) of the Daffodil International University (DIU), Bangladesh. He was born in Kaligonj in the District of Satkhira in 1990. He is one of the co-author of a book entitled “Nije Nije Android Shikhi”. His research interest is in software security, mobile application software and mobile security software. His major field of study is software engineering. Sydul Islam Khan is a student of M.Sc. in Computer Science and Engineering in Daffodil International University. He was born in Narayanganj, Bangladesh in 1982. He received his B.Sc. (Hons.) degree in Computer Science from the National University, Bangladesh. His research interest is on network security, Ecommerce Security and web security. The number of published journal paper is 4. He is a member of Bangladesh Computer Society and Institute of Engineers, Bangladesh. Professor Dr. Md. Ismail Jabiullah was born in Chandina, Comilla, Bangladesh. He received his B.Sc (Hons.) and M.Sc. degrees in Mathematics from the Dhaka University, Bangladesh. He also achieved Ph.D. degree in Computer Science and Engineering from the Dhaka University, Dhaka, Bangladesh. Topic of his Thesis works was “Session-keys for Secured Electronic Transactions”. At present, Dr. Jabiullah is working as a Professor and Chairman in the Department of Computer Science and Engineering (CSE) of Hamdard University

Bangladesh (HUB) since October 2012. He started his career as a Faculty Member in the Department of Computer Science and Engineering (CSE) of Institute of Science and Technology (IST) affiliated with the National University, Bangladesh and worked there as Associate Professor, Assistant Professor and Lecturer from January 1993 to July 2009. Then he joined in the Daffodil International University (DIU) as Professor. He led the Department of Computer Science and Engineering (CSE) of Daffodil International University (DIU) as the Professor and played a pioneering role in establishing a new Department of Software Engineering (SWE). He was doing hard working in opening a new Department of Software Engineering (SWE) in DIU. He worked in the SWE department as a Professor and head of the department in DIU from July 2009 to September 2012. Professor Dr. Md. Ismail Jabiullah’s research interest includes network security, information security, wireless network, mobile network security, software security, mobile application, artificial intelligence, high-speed networks, e-commerce security, electronic transactions, etc. He has credited over 90 national and international journal and conference papers. Dr. Jabiullah has also credited 7 published books of Computer Science on his career. He is working as the examiner of the Department of Computer Science and Engineering and Department of Applied Physics, Electronics and Communication Engineering of Dhaka University; examiner of Computer Science and Engineering of National University, Bangladesh and also examiner of the Department of Computer Science and Engineering and the Department of Software Engineering of Daffodil International University. Dr. Jabiullah is the Member of Bangladesh Electronics Society (BES); Life Member of Bangladesh Ganit Samity, Bangladesh Computer Society, Bangladesh Solar Energy Society, Bangladesh Association for Advancement of Sciences (BAAS), Bangladesh Physical Society (BPS), Dhaka University Registered Graduate Association and the Bangladesh Association for the Scientific Professions (BASP). He was the Member Secretary of the Editorial Board of Daffodil International University Journal of Science and Technology (DIUJST).