Report and Opinion 2014;6(7) http://www.sciencepub.net/report. Technical Specification for Creating Apps in Android. Kauser Hameed, Manal Elobaid



Similar documents
MAP524/DPS924 MOBILE APP DEVELOPMENT (ANDROID) MIDTERM TEST OCTOBER 2013 STUDENT NAME STUDENT NUMBER

Arduino & Android. A How to on interfacing these two devices. Bryant Tram

Mobile Application Development

Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department. Mobile Computing ECOM Eng. Wafaa Audah.

Getting Started with Android Development

Android Development Tutorial. Human-Computer Interaction II (COMP 4020) Winter 2013

An Android-based Instant Message Application

Android Programming. Høgskolen i Telemark Telemark University College. Cuong Nguyen,

ANDROID APP DEVELOPMENT: AN INTRODUCTION CSCI /19/14 HANNAH MILLER

Saindo da zona de conforto resolvi aprender Android! by Daniel Baccin

Android Setup Phase 2

Smartphone market share

Introduction to Android

OpenCV on Android Platforms

Developing an Android App. CSC207 Fall 2014

Android Development. Marc Mc Loughlin

Android Mobile App Building Tutorial

Tutorial #1. Android Application Development Advanced Hello World App

How To Write A File Station In Android.Com (For Free) On A Microsoft Macbook Or Ipad (For A Limited Time) On An Ubuntu 8.1 (For Ubuntu) On Your Computer Or Ipa (For

Basic Android Setup Windows Version

Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months

Workshop on Android and Applications Development

Mocean Android SDK Developer Guide

Fahim Uddin 1. Java SDK

Getting Started with Android Programming (5 days) with Android 4.3 Jelly Bean

How to Create an Android Application using Eclipse on Windows 7

Android Tutorial. Larry Walters OOSE Fall 2011

Introduction to Android Development

MMI 2: Mobile Human- Computer Interaction Android

Android Programming and Security

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

Jordan Jozwiak November 13, 2011

01. Introduction of Android

directory to "d:\myproject\android". Hereafter, I shall denote the android installed directory as

Oracle FLEXCUBE Direct Banking Android Tab Client Installation Guide Release

Challenges in Android Application Development: A Case Study

Tutorial on Basic Android Setup

Android Development. 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系

Tutorial: BlackBerry Object API Application Development. Sybase Unwired Platform 2.2 SP04

Chapter 2 Getting Started

... Introduction Acknowledgments... 19

ANDROID AS A PLATFORM FOR DATABASE APPLICATION DEVELOPMENT

Developing Android Apps: Part 1

Setting up Sudoku example on Android Studio

Tutorial: Android Object API Application Development. SAP Mobile Platform 2.3 SP02

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

Sybase Unwired Platform 2.0

CS378 -Mobile Computing. Android Overview and Android Development Environment

Getting Started: Creating a Simple App

Android Basics. Xin Yang

A Modular Approach to Teaching Mobile APPS Development

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

Introduction to Android Development. Jeff Avery CS349, Mar 2013

Presenting Android Development in the CS Curriculum

Programming with Android: SDK install and initial setup. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

How To Use Titanium Studio

Practical Android Projects Lucas Jordan Pieter Greyling

Introduction to Android

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 1 Android SDK & Development Environment. Marco Picone

Introduction to Android. CSG250 Wireless Networks Fall, 2008

ANDROID APPLICATION FOR FILE STORAGE AND RETRIEVAL OVER SECURED AND DISTRIBUTED FILE SERVERS SOWMYA KUKKADAPU B.E., OSMANIA UNIVERSITY, 2010 A REPORT

How To Run A Hello World On Android (Jdk) On A Microsoft Ds.Io (Windows) Or Android Or Android On A Pc Or Android 4 (

IBM TRIRIGA Anywhere Version 10 Release 4. Installing a development environment

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

ADT Plugin for Eclipse

About this Release. Introduction. Prerequisites. Installation. Using the Web SDK Packager

Develop a Hello World project in Android Studio Capture, process, store, and display an image. Other sensors on Android phones

Android Application Development: Hands- On. Dr. Jogesh K. Muppala

Android Environment SDK

With a single download, the ADT Bundle includes everything you need to begin developing apps:

Intel Integrated Native Developer Experience (INDE): IDE Integration for Android*

Table of Contents. Adding Build Targets to the SDK 8 The Android Developer Tools (ADT) Plug-in for Eclipse 9

How Simple Is It To Develop a Mobile App? Uma Sudhan OpenEdge Developer 7 th Oct 2013

KonyOne Server Prerequisites _ MS SQL Server

Android Application Development

Hello World. by Elliot Khazon

Overview of Web Services API

Tutorial: Android Object API Application Development. SAP Mobile Platform 2.3

Installing the Android SDK

Технологии Java. Android: Введение. Кузнецов Андрей Николаевич. Санкт-Петербургский Государственный Политехнический Университет

ADITION Android Ad SDK Integration Guide for App Developers

Skynax. Mobility Management System. System Manual

SDK Quick Start Guide

ANDROID ALERT APP (SHOP SALE)

Developer Guide: Android Object API Applications. SAP Mobile Platform 2.3 SP02

Android Application Development. Yevheniy Dzezhyts

Open Source Telemedicine Android Client Development Introduction

Dave Haseman, Ross. Hightower. Mobile Development for SAP* ^>. Galileo Press. Bonn. Boston

Learning Remote Control Framework ADD-ON for LabVIEW

Developing Android Applications: Case Study of Course Design

place/business fetch details, removefromfavorite () function, 189 search button handler bind, B BlackBerry build environment

Tutorial for Creating Resources in Java - Client

Developing for MSI Android Devices

Developing NFC Applications on the Android Platform. The Definitive Resource

Graduate presentation for CSCI By Janakiram Vantipalli ( Janakiram.vantipalli@colorado.edu )

CS 528 Mobile and Ubiquitous Computing Lecture 2: Android Introduction and Setup. Emmanuel Agu

Lab 0 (Setting up your Development Environment) Week 1

Transcription:

Technical Specification for Creating Apps in Android Kauser Hameed, Manal Elobaid Department of Computer Science, CCSIT, King Faisal University, Hofuf, KSA manalobaid@yahoo.com Abstract: As it has been observed, people are adopting latest technologies to access their favorite apps to enhance their knowledge in their busy and spare time. The aim of this research work is to develop a guidance framework that can help programmers to develop Quran Apps using Android technologies. The paper aspire to specify all the significant steps in initiating a Quran app" development process, starting from setting up a device with Android SDK, Android Tools and other technical software and hardware necessities to finally launching it in Play Store for public access. This paper will narrate the configuring process involved in Integrated Development Environment with Android SDK Tools required for coding using Eclipse, and developing the App s backend with the SQLite. Various APIs will be explored to create user interfaces, activities, and services based on the UML diagrams and Use Cases. Likewise, converting the ER diagrams (logical database) into physical database using SQLite format and further connecting the UI with these databases will also be discussed. In the meantime, Sighting authentic databases in various formats and clarifies sources will also be enlightened. Moreover, the paper will cover the process of hosting database in an App Server along with other app resources. Testing condition that can be carried out in parallel at different incremental development stages in android device and in emulator will also be focused. Finally the paper will wrap up with the best practices used to launch the App in Google play store to make it available to the world and by other different supported means. [Kauser Hameed, Manal Elobaid. Technical Specification for Creating Apps in Android. Rep Opinion 2014;6(7):1-6]. (ISSN: 1553-9873). http://www.sciencepub.net/report. 1 Keywords: Mobile Applications, Android, Quran Applications, UML diagrams, Quran Database Introduction: This paper aims to illustrate the technical procedure involved in developing Al-Zikr mobile app for android devices. The purpose of this paper is to help any individual interested in creating such application with basic programming knowledge. As the idea being to proliferate the ease of developing Digital Holy Quran (using authentic sources) to run on latest smartphone technologies the Android platform has been selected. As stated android is winning the global smartphone war being fought everywhere, smartphone sales grew 38 % last quarter to reach 217 million units worldwide, and over 700 million units for the entire year, according to a new report from Strategy Analytics of those 700 million-plus smartphones, 68.4% smartphones ran Android as the operating system, while only 19.4 % ran ios, Apple s mobile operating system. The firm s executive director Neil Mawston said in a statement. Android is clearly the undisputed volume leader of the smartphone industry at the present time [1]. Experts predict that there could be more smartphones on the planet than humans by the end of this year, and by 2016 there could be 10 billion smartphones that is 1.4 mobile devices per capita [2]. However, techniques presented in this paper could serve generally as the basis to support other mobile operating systems and different devices. People are adopting latest technologies to access their favorite app to enhance their knowledge in their busy and spare time. In certain situation, there is a need of defining a prevailing procedure to devise the logic and help mobile programmers in developing Quran Apps that could cater to the growing needs of such. 1. Setting the device ready for android development: 1.1 Minimum Software and Hardware Requirements: The necessary things required to initiate Android apps development and testing are as follows: 1.1.1 Hardware Requirement: i. Computer device with latest configuration for development ii. Android compatible smart phone for testing Software Requirement: i. Java Runtime Environment ii. Android Development Tool Kit Java Runtime Environment can be installed for free from its official website [3] The Android Development Tool Kit (ADT) provided by Google in the Android developers website comprises of all the necessary tools including the Integrated Development Environment (IDE) to create, test and debug apps that can run on any android compatible devices. ADT Bundle consist of the following, that can be downloaded from android official developer website [4]. i. Eclipse + ADT plugin ii. Android SDK Tools iii. Android Platform-tools 1

iv. The latest Android platform v. The latest Android system image for the emulator A new IDE called Android Studio, based on IntelliJ IDEA, is also available as early access preview that can be used instead of eclipse IDE [5]. 2. Getting Started with App Development : The three major stages that comprise all the steps required to initiate app development and app delivery in the Google play store, are listed below: Design Phase i. Development Phase ii. Distribute 2.1 Design Phase: Designing the User Interface is the crucial thing in defining the scope of the app in terms of its features, functionality and user friendly interactions with its audience. A Quran app should be designed with attractive and interactive screens describing its major and minor features such as its recitation and repeat options in recitation, translation and changing translation options, explanation and root words. The Design phase can include the following techniques. 2.1.1 Designing the UML: All the possible app interactions must be keenly observed and illustrated in the form of use cases that can later be converted into app screen, such as launching the app and selecting a particular verse for listening the recitation or viewing its translation and explanation or sharing it etc. Similarly many use cases should be designed to describe each and every App/User interaction. The figure 1.0 depicts the basic functionality of Quran app. 2.1.2 Designing User Interface in Photoshop: A mobile app designer can then convert all the use cases in the form of screens or app features and resize them to suite the display of various mobile screen sizes. The design must be simple, smart and powerful tailored to suit different Android devices and versions. The design guidelines [6] provided by Google developer website provides quick insight into the Design section that every android app designer must look at. A good android app must support its UI to accommodate different android device sizes, versions and languages to reach large number of audience, the below illustration shows few sample screens extracted from the UML listed in Fig 1.0, care must be taken to resize image resources in basic four screen sizes and to support different android versions and locales. 2.2 Development Phase: Once the miniature model of the app is designed in UML and converted into draft screens as listed in figure 1.1 in Photoshop, an android programmer can start creating the actual screens using android APIs. The development phase will include the following steps: 2

Figure 1.1 Sample Screens designed in Photoshop 2.2.1 Creating User Interface in Android and Exploring Various APIs: Android provides access to a wide range of useful libraries and tools that can be used to build rich applications [7].Keeping each draft screen in view the programmer must create the layout with its UI components either in XML or in the code itself, Listing 1.2 illustrates a sample code to create the home screens with the major App features in XML: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".translationlistview_lang" > <ImageView android:id="@+id/imageview1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:fitssystemwindows="true" android:scaletype="fitxy" android:src="@drawable/background" /> <ToggleButton android:id="@+id/togglebutton1" android:layout_width="250sp" android:layout_height="wrap_content" android:layout_alignparenttop="true" android:layout_centerhorizontal="true" android:layout_margintop="30dp" android:background="@drawable/btntoggle_selector" " عربي"= android:textoff android:texton="english " /> <Button android:id="@+id/recitation" style="?android:attr/buttonstylesmall" android:layout_width="200sp" android:layout_height="wrap_content" android:layout_below="@+id/togglebutton1" android:layout_centerhorizontal="true" android:background="@drawable/btn_feature" android:text="@string/home_recitation" /> // Similar Button code for translation, root_words, video_tafseer, audio_tafseer shououd be added here </RelativeLayout> Listing 1.2: XML code for creating Home screen with Six buttons to show major features of the app. 3

The package android.widget contains all the classes and methods to create and manipulate any UI widget (UI component in android). 2.2.2 Creating App databases in SQLite format using SQLite professional and storing it : Post designing the UI the Quran database schema must be created with all the required tables, as the mobile apps uses SQLite database, a tool called as SQLite professional can be very useful, the App database will contain many tables depending on the features employed in the app. A sample table structure is shown in fig1.3 that can be used to store Quran chapters and verses, like wise other tables must also be created: CREATE TABLE "Verse_Text" ( Index integer(4) NOT NULL, SurahID integer(3) NOT NULL DEFAULT('0'), VerseID integer(3) NOT NULL DEFAULT('0'), VerseText varchar2(1000) NOT NULL, PRIMARY KEY(Index) ); CREATE TABLE Reciter ( ID integer NOT NULL, ReciterName varchar2(40), PRIMARY KEY(ID) ); Various online resources are available that provide Quran database in many formats, however care must be taken to use the data from accurate sources only. 2.2.3 Connecting User Interface with Database using SQLite API: Once the database structure is ready then the programmer should link the User interface with backend using packages provided by Android system such as: 1. android.database.cursor; 2. android.database.sqlexception; 3. android.database.sqlite.sqlitedatabase; 4. android.database.sqlite.sqliteexception; Listing 1.3: Shows a sample code to link the database with in the app public class DataBaseHelper extends SQLiteOpenHelper private static String TAG = "DataBaseHelper"; // Tag just for the LogCat window //destination path (location) of our database on device private static String DB_PATH = ""; private static String DB_NAME ="MyQuran.sqlite";// Database name private SQLiteDatabase mdatabase; private final Context mcontext; public static String table = "Surah"; public DataBaseHelper(Context context) super(context, DB_NAME, null, 7);// Database Version DB_PATH = "/data/data/" + context.getpackagename() + "/databases/"; this.mcontext = context; public void createdatabase() throws IOException //If database not exists copy it from the assets boolean mdatabaseexist = checkdatabase(); if(!mdatabaseexist) this.getreadabledatabase(); this.close(); try //Copy the database from assests copydatabase(); Log.e(TAG, "createdatabase database created"); catch (IOException mioexception) 4

throw new Error("ErrorCopyingDataBase"); //Check that the database exists here: /data/data/your package/databases/ the Name private boolean checkdatabase() File dbfile = new File(DB_PATH + DB_NAME); //Log.v("dbFile", dbfile + " "+ dbfile.exists()); return dbfile.exists(); //Copy the database from assets private void copydatabase() throws IOException InputStream minput = mcontext.getassets().open(db_name); String outfilename = DB_PATH + DB_NAME; OutputStream moutput = new FileOutputStream(outFileName); byte[] mbuffer = new byte[1024]; int mlength; while ((mlength = minput.read(mbuffer))>0) moutput.write(mbuffer, 0, mlength); moutput.flush(); moutput.close(); minput.close(); //Open the database, so we can query it public boolean opendatabase() throws SQLException String mpath = DB_PATH + DB_NAME; //Log.v("mPath", mpath); mdatabase = SQLiteDatabase.openDatabase(mPath, null, SQLiteDatabase.CREATE_IF_NECESSARY); //mdatabase = SQLiteDatabase.openDatabase(mPath, null, SQLiteDatabase.NO_LOCALIZED_COLLATORS); return mdatabase!= null; @Override public synchronized void close() if(mdatabase!= null) mdatabase.close(); super.close(); @Override public void oncreate(sqlitedatabase arg0) // TODO Auto-generated method stub @Override public void onupgrade(sqlitedatabase db, int oldversion, int newversion) // TODO Auto-generated method stub Listing 1.3: Sample code to link the database with in the app. 5

After linking the database, all its table can be accessed from any screen or user interface component of the app using simple SQLite Queries [ 8]. Database can be stored in one of the following ways: i. Creating the database in the code by extending SQLiteOpenHelper ii. Storing the preloaded database in asset folder and then copying it in the application internal memory iii. Storing the database file (MyQuran.Sqlite) in the webserver an then copying it in the application 2.2.4. Testing Testing/ debugging is carried out simultaneously during the development phase, emulator provided in the form of Android Virtual Devices (AVD) can be used to test the functioning of the app on the computer itself, however testing on at least one physical device is recommended (one mobile and one tablet) 3. Launching the App Once the app is tested in various environments (i.e., different AVDs & Physical devices) the app can be distributed in one of the three ways: i. By sending the.apk to the audience as the email attachment, for which they need to open the attachment in the android compatible device and they should install. ii. By uploading the downloading app in website. iii. By launching the app in the Google play. 3.1 launching the app in the Google play: In order to launch the app in Google play, one must have a developer account in Google account. The developer website provide the checklist [9] that explains all the necessary steps to upload an app in Google play. 4. Conclusion: The procedures discussed above can help a programmer to create a Quran App in android using the best practices to cater to the growing needs of mobile users. However deferent methods and ways are available to reach the same point, depending in the programmer background and the available Tools he prefer. 5. Acknowledgements: NRC Project (No.: NRC1-123). Authors are grateful to IT Research Center for the Holy Quran (Noor), Taibah University, for financial support to carry out this work. Refrences 1. http://venturebeat.com/2013/01/28/androidcaptured-almost-70-global-smartphone-marketshare-in-2012-apple-just-under-20 2. http://mashable.com/2012/02/14/moresmartphones-than- humans 3. http://www.oracle.com/technetwork/java/javase/d ownloads/jre6downloads-1902815.html 4. http://developer.android.com/sdk/index.html#dow nload 5. http://developer.android.com/sdk/installing/studio. html 6. http://developer.android.com/design/index.html 7. http://developer.android.com/about/versions/andro id-2.3.4.html 8. h.schneidawind, J: "Big Blue unveiling", USA Today, November 23, 1992, p. 2B 9. Kevin McLaughlin (December 17, 2009). "BlackBerry Users Call For RIM To Rethink Service". CRN.com. 10. http://www.crn.com/news/clientdevices/222002587/blackberry-users-call-for-rimto-rethink-service.htm. Retrieved 2011-12-15 11. iphone 4S Pre-Orders Top One Million in First 24 Hours". Apple. http://www.apple.com/pr/library/2011/10/10iphon e-4s-pre-orders-top-one-million-in-first-24- Hours.html. Retrieved 10 October 2011. 12. Anderson, Ash. "iphone 4S Sells 1 Million in Under 24 Hours". KeyNoodle. http://www.keynoodle.com/iphone-4s-sells-1- million-in-under-24-hours/. Retrieved 2011-12-15. 7/11/2014 6