Report Final- ACCL

Embed Size (px)

Citation preview

  • 7/28/2019 Report Final- ACCL

    1/80

  • 7/28/2019 Report Final- ACCL

    2/80

    A C C L| Android Charting Component Library

    2 | P a g e

    The developers may also use this library to check their systems memory usage or use it

    in any network monitoring tool which requires statistical analysis.

    Thus, this library will provide as a base for the application developers and would hel

    them concentrate on the main application without caring about the lower level details.

    1.3 Scope

    This component library will be a collection of various charting components for applicatiodevelopers like Android application developers and various testers working on Android. Thsystem will be designed to maximize the clients productivity by allowing them to view their

    vital information in a graphical form, which would otherwise be a very complex job. Bmaximizing the clients work efficiencyand production the library will meet the clients needswhile remaining easy to understand and use. More specifically, this component library designed to allow the users to view different types of charts according to their requirements anconvenience like pie charts, stack charts, histograms, bar charts etc. The project will help thcompany in greatly in establishing themselves in the Android market. The project help othdevelopers also working with the Androids native SDK. The project would remove the load of

    the lower level work and help them concentrate on the main application. Thus, it would make tAndroid OS ultimately more efficient and convenient to work on.

    1.4 Organization of the Report

    Our project report is sectioned into various sections that describes the pattern iwhich our project has come to its completion. Abstract includes a brief and simpldescription about overall project. Section one explains introductory part which containoverview about how many summarizers are there and which out of them we are usinfor our project and why.

  • 7/28/2019 Report Final- ACCL

    3/80

    A C C L| Android Charting Component Library

    3 | P a g e

    Section second implies product perspective in which we highlight the initial requirementhat are required in the beginning for developing this project, like software interfacehardware interface requirement analysis, feasibility study, and all the technical terms wittheir explanation are mentioned in this section.

    Next section explains about the various modules along with their working. Fourth sectioincludes description of various database tables to be used for storing information lik basic word table and stop word table. It is then followed by description of informatioin diagrammatic manner like using Context diagrams, DFDs, and flowcharts of all the

    project modules.

    The last section of this report includes a working example from the developed tool alon

    with screenshots and coding used for the project.

    1.5 Purpose

    The main purpose of ACCL is to develop a component library that could be used by aapplication developer to create, evaluate and implement various charts and charting features

    the Android platform. Developing a component library for charting in the native Android SDThe library will have all the charting features which must be present in the respective charts li pie chart, line chart, bar chart, area chart etc. The library will enhance the performance of thcharts and remove the lag that appears in loading and further processing them. The library wact as an tool in reducing the load of developing any further charting based application for thcompany, like network monitoring tool etc. The component library for charting in the Androidsnative SDK, will allow the programmers to develop and enhance the applications needinstatistical analysis without worrying to first write the code for the all the charts and then proceeAs there is currently no component library for charting present in the native SDK. Thdevelopers may also use this library to check their systems memory usage or use it in anynetwork monitoring tool which requires statistical analysis. Thus, this library will provide as base for the application developers and would help them concentrate on the main applicatiowithout caring about the lower level details

  • 7/28/2019 Report Final- ACCL

    4/80

    A C C L| Android Charting Component Library

    4 | P a g e

    2.0 Background

    2.1 L iteratur e Sur vey

    Android is anoperating system for mobile devicessuch assmart phonesandtablet computers.Itis developed by theOpen Handset Allianceled byGoogle. Google purchased the initialdeveloper of the software, Android Inc., in 2005. The unveiling of the Android distribution November 5, 2007 was announced with the founding of theOpen Handset Alliance,aconsortium of 84hardware, software, and telecommunicationcompanies devoted toadvancingopen standardsfor mobile devices. Google released most of the Android code under theApache License,a free software license.The Android Open Source Project (AOSP) is taskedwith the maintenance and further development of Android.

    Android consists of a kernel based on theLinux kernel, withmiddleware,librariesandAPIswritten inC andapplication softwarerunning on anapplication framework which includesJava-compatible libraries based onApache Harmony. Android uses theDalvik virtualmachinewithjust-in-time compilationto run compiledJavacode. Android has a largecommunity of developers writing applications ("apps") that extend the functionality of thdevices. Developers write primarily in a customized version of Java. There are currently mo

    than 520,000 apps available for Android. Apps can be downloaded from third-party sites through online stores such asAndroid Market,the app store run by Google. Android was listedas the best-sellingsmartphone platform worldwide in Q4 2010 byCanalyswith over 190 millionAndroid devices in use by October 2011.

    http://en.wikipedia.org/wiki/Mobile_operating_systemhttp://en.wikipedia.org/wiki/Smartphonehttp://en.wikipedia.org/wiki/Tablet_computerhttp://en.wikipedia.org/wiki/Open_Handset_Alliancehttp://en.wikipedia.org/wiki/Googlehttp://en.wikipedia.org/wiki/Open_Handset_Alliancehttp://en.wikipedia.org/wiki/Computer_hardwarehttp://en.wikipedia.org/wiki/Telecommunicationhttp://en.wikipedia.org/wiki/Open_standardhttp://en.wikipedia.org/wiki/Apache_Licensehttp://en.wikipedia.org/wiki/Free_software_licensehttp://en.wikipedia.org/wiki/Kernel_(software)http://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Middlewarehttp://en.wikipedia.org/wiki/Software_libraryhttp://en.wikipedia.org/wiki/Application_programming_interfacehttp://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/Application_softwarehttp://en.wikipedia.org/wiki/Application_frameworkhttp://en.wikipedia.org/wiki/Apache_Harmonyhttp://en.wikipedia.org/wiki/Dalvik_virtual_machinehttp://en.wikipedia.org/wiki/Dalvik_virtual_machinehttp://en.wikipedia.org/wiki/Just-in-time_compilationhttp://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/Android_Markethttp://en.wikipedia.org/wiki/Smartphonehttp://en.wikipedia.org/wiki/Canalyshttp://en.wikipedia.org/wiki/Canalyshttp://en.wikipedia.org/wiki/Smartphonehttp://en.wikipedia.org/wiki/Android_Markethttp://en.wikipedia.org/wiki/Java_(programming_language)http://en.wikipedia.org/wiki/Just-in-time_compilationhttp://en.wikipedia.org/wiki/Dalvik_virtual_machinehttp://en.wikipedia.org/wiki/Dalvik_virtual_machinehttp://en.wikipedia.org/wiki/Apache_Harmonyhttp://en.wikipedia.org/wiki/Application_frameworkhttp://en.wikipedia.org/wiki/Application_softwarehttp://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/Application_programming_interfacehttp://en.wikipedia.org/wiki/Software_libraryhttp://en.wikipedia.org/wiki/Middlewarehttp://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Kernel_(software)http://en.wikipedia.org/wiki/Free_software_licensehttp://en.wikipedia.org/wiki/Apache_Licensehttp://en.wikipedia.org/wiki/Open_standardhttp://en.wikipedia.org/wiki/Telecommunicationhttp://en.wikipedia.org/wiki/Computer_hardwarehttp://en.wikipedia.org/wiki/Open_Handset_Alliancehttp://en.wikipedia.org/wiki/Googlehttp://en.wikipedia.org/wiki/Open_Handset_Alliancehttp://en.wikipedia.org/wiki/Tablet_computerhttp://en.wikipedia.org/wiki/Smartphonehttp://en.wikipedia.org/wiki/Mobile_operating_system
  • 7/28/2019 Report Final- ACCL

    5/80

    A C C L| Android Charting Component Library

    5 | P a g e

    2.2 History

    2.2.1 Foundation

    Android, Inc. was founded inPalo Alto, California,United States in October, 2003 byAndyRubin(co-founder of Danger), Rich Miner (co-founder of Wildfire Communications, Inc.), Nick Sears (once VP atT-Mobile), and Chris White (headed design and interface developmentat WebTV)to develop, in Rubin's words "...smarter mobile devices that are more aware of itowner's location and preferences". Despite the obvious past accomplishments of the founders aearly employees, Android Inc. operated secretly, revealing only that it was working on softwafor mobile phones. That same year, Rubin ran out of cash.Steve Perlman brought him $10,000 incash in an envelope and refused a stake in the company.

    2.2.2 Acqui sit ion by Google

    Googleacquired Android Inc. in August 2005, making Android Inc. a wholly owned subsidiarof Google Inc. Key employees of Android Inc., including Andy Rubin, Rich Miner and ChrWhite, stayed at the company after the acquisition. Not much was known about Android Inc. the time of the acquisition, but many assumed that Google was planning to enter themobile phonemarket with this move.

    2.2.3 Post-acquisition development

    At Google, the team led by Rubin developed a mobile device platform powered by theLinuxkernel.Google marketed the platform to handset makers andcarrierson the premise of providinga flexible, upgradable system. Google had lined up a series of hardware component and softwa partners and signaled to carriers that it was open to various degrees of cooperation on their paSpeculation about Google's intention to enter the mobile communications market continued build through December 2006.Reports from theBBCand The Wall Street Journal noted thatGoogle wanted its search and applications on mobile phones and it was working hard to delivthat. Print and online media outlets soon reported rumors that Google was developing a Goog brandedhandset.Some speculated that as Google was defining technical specifications, it wasshowing prototypes to cell phone manufacturers and network operators.In Septembe

    http://en.wikipedia.org/wiki/Palo_Alto,_Californiahttp://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Danger_(company)http://en.wikipedia.org/wiki/Rich_Minerhttp://en.wikipedia.org/wiki/T-Mobile_USAhttp://en.wikipedia.org/wiki/WebTVhttp://en.wikipedia.org/wiki/Steve_Perlmanhttp://en.wikipedia.org/wiki/Googlehttp://en.wikipedia.org/wiki/Mobile_phonehttp://en.wikipedia.org/wiki/Mobile_phonehttp://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Mobile_network_operatorhttp://en.wikipedia.org/wiki/BBChttp://en.wikipedia.org/wiki/The_Wall_Street_Journalhttp://en.wikipedia.org/wiki/The_Wall_Street_Journalhttp://en.wikipedia.org/wiki/The_Wall_Street_Journalhttp://en.wikipedia.org/wiki/Handset#Telephonyhttp://en.wikipedia.org/wiki/Handset#Telephonyhttp://en.wikipedia.org/wiki/The_Wall_Street_Journalhttp://en.wikipedia.org/wiki/BBChttp://en.wikipedia.org/wiki/Mobile_network_operatorhttp://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Mobile_phonehttp://en.wikipedia.org/wiki/Mobile_phonehttp://en.wikipedia.org/wiki/Googlehttp://en.wikipedia.org/wiki/Steve_Perlmanhttp://en.wikipedia.org/wiki/WebTVhttp://en.wikipedia.org/wiki/T-Mobile_USAhttp://en.wikipedia.org/wiki/Rich_Minerhttp://en.wikipedia.org/wiki/Danger_(company)http://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Palo_Alto,_California
  • 7/28/2019 Report Final- ACCL

    6/80

  • 7/28/2019 Report Final- ACCL

    7/80

    A C C L| Android Charting Component Library

    7 | P a g e

    companies on the planet. Its members include chip makers, handset manufacturers, softwadevelopers, and service providers. The entire mobile supply chain is well represented. The OpHandset Alliance 17

    The Open H andset All iance.

    Working together, OHA members began developing a nonproprietary open standard platforthat would aim to alleviate the aforementioned problems hindering the mobile community. Thecalled it the Android project. Googles involvement in the Android project has been extensive.The company hosts the open source project and provides online documentation, tools, forumand the 03_0321627091_ch01.qxd 7/22/09 3:06 PM Page 17Software Development Kit (SDKGoogle has also hosted a number of events at conferences and the Android Developer Challenga contest to encourage developers to write killer Android applications for $10 million dollars in prizes. Manufacturers: Designing the Android Handsets More than half the members of the OHare handset manufacturers, such as Samsung, Motorola, HTC, and LG, and semiconductocompanies, such as Intel, Texas Instruments,NVIDIA, and Qualcomm. These companies ahelping design the first generation of Android handsets

    The first shipping Android handset the T-Mobile G1 was developed by handset manufacturer HTC with service provided by T-Mobile. It was released in October 2008. Many other Androhandsets are slated for 2009 and early 2010.

    Content Providers: Developing Andr oid Appli cations

    When users have Android handsets, they need those killer apps, right? Google has led the pacdeveloping Android applications, many of which, like the email client and Web browser, arcore features of the platform. OHA members, such as

  • 7/28/2019 Report Final- ACCL

    8/80

    A C C L| Android Charting Component Library

    8 | P a g e

    eBay, are also working on Android application integration with their online auctions. The firAndroid Developer Challenge received 1,788 submissions all newly developed Androidgames, productivity helpers, and a slew of Location-Based Services (LBS). We also sawhumanitarian, social networking, and mash-up apps. Many of these applications have debutwith users through the Android Market Googles software distribution mechanism for Android.

    2.4 M obi le Operators: Deliver ing the An droid Exper ience

    After you have the phones, you have to get them out to the users. Mobile operators from Asi North America, Europe, and Latin America have joined the OHA, ensuring a market for th

    Android movement. With almost half a billion subscribers, telephony giant China Mobile isfounding member of the alliance. Other operators have signed on as well.

    2.4.1 Taking Advantage of Al l Android Has to Off er

    Androids open platform has been embraced by much of the mobile development community

    extending far beyond the members of the OHA. As Android phones and applications becommore readily available, many in the tech community anticipate other mobile operators anhandset manufacturers will jump on

    2.5 Androi d Platform Di fferences

    Android is hailed as the first complete, open, and free mobile platform. n Complete: The

    designers took a comprehensive approach when they developed the Android platform. Th began with a secure operating system and built a robust software framework on top that allowfor rich application development opportunities. n Open: The Android platform is providethrough open source licensing. Developers have unprecedented access to the handset featurwhen developing applications. n Free: Android applications are free to develop. There are nlicensing or royalty fees to develop on the platform. No required membership fees. No requirtesting fees. No required signing or certification fees. Android applications can be distributand commercialized in a variety of ways.

  • 7/28/2019 Report Final- ACCL

    9/80

    A C C L| Android Charting Component Library

    9 | P a g e

    2.5.1 Android: A Next Generation Platform

    Although Android has many innovative features not available in existing mobile platforms, designers also leveraged many tried-and-true approaches proven to work in the wireless worl

    Its true that many of these features appear in existing propriet ary platforms, but Androidcombines them in a free and open fashion, while simultaneously addressing many of the flaws othese competing platforms. The Android mascot is a little green robot, shown in Figur1.6.Youll see this little guy (girl?) often us ed to depict Android-related materials. Android is thefirst in a new generation of mobile platforms, giving its platform developers a distinct edge o

    the competition. Androids designers examined the benefits and drawbacks of existing platforms

    and then incorporate their most successful features.

  • 7/28/2019 Report Final- ACCL

    10/80

    A C C L| Android Charting Component Library

    10 |P a g e

    2.6 Licensing

    With the exception of brief update periods, Android has been available under afree and opensource softwarelicense from October 21, 2008 until March 2011. Google published theentiresource code(including network and telephony stacks) under anApache License.Googlealso keeps the reviewed issues list publicly open for anyone to see and comment.

    Even though the software is open source, device manufacturers cannot use Google's Androtrademark unless Google certifies that the device complies with their Compatibility DefinitioDocument (CDD). Devices must also meet this definition to be eligible to license Googleclosed-source applications, including the Android Market.

    In September 2010,Skyhook Wirelessfiled a lawsuit against Google in which they alleged thatGoogle had used the compatibility document to block Skyhook's mobile positioning servi(XPS) from Motorola's Android mobile devices. In December 2010 a judge denied Skyhookmotion for preliminary injunction, saying that Google had not closed off the possibility oaccepting a revised version of Skyhook's XPS service, and that Motorola had terminated thecontract with Skyhook because Skyhook wanted to disable Google's location data collectiofunctions on Motorola's devices, which would have violated Motorola's obligations to Goog

    and its carriers.In early 2011, Google chose to withhold the Android source code to the tablet-only Honeycomrelease, creating a controversy over Google's commitment to open source with Android. Threason, according toAndy Rubinin an official Android blog post, was because Honeycomb wasrushed for production of the Motorola Xoom, and they did not want third parties creating "really bad user experience" by attempting to put onto smartphones a version of Androintended for tablets. Google later confirmed that the Honeycomb source code would not b

    released until after it was merged with the Gingerbread release in Ice Cream Sandwich.

    One of the criticisms often levied against Android is that it is not as open as Google claims. mid-2009 Google strategy briefing included phrases such as "Do not develop in the opeInstead, make source code available after innovation is complete". The document also suggethat time-to-market exclusivity be given to partners who abide by Google's specifications. In

    http://en.wikipedia.org/wiki/Free_and_open_source_softwarehttp://en.wikipedia.org/wiki/Free_and_open_source_softwarehttp://en.wikipedia.org/wiki/Source_codehttp://en.wikipedia.org/wiki/Apache_Licensehttp://en.wikipedia.org/wiki/Skyhook_Wirelesshttp://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Andy_Rubinhttp://en.wikipedia.org/wiki/Skyhook_Wirelesshttp://en.wikipedia.org/wiki/Apache_Licensehttp://en.wikipedia.org/wiki/Source_codehttp://en.wikipedia.org/wiki/Free_and_open_source_softwarehttp://en.wikipedia.org/wiki/Free_and_open_source_software
  • 7/28/2019 Report Final- ACCL

    11/80

    A C C L| Android Charting Component Library

    11 |P a g e

    internal email, dated Aug. 6, 2010, Dan Morrill, a manager in the Android group, noted i passing that it was obvious to the phone makers that "we are using compatibility as a club make them do things we want."

    In a July 2011 research into open source projects, Android was found to be the most "close platform scoring significantly lower in an "openness" index. The other projects examinewereQt,Symbian,MeeGo,Mozilla,WebKit,LinuxandEclipse.

    http://en.wikipedia.org/wiki/Qt_(framework)http://en.wikipedia.org/wiki/Symbianhttp://en.wikipedia.org/wiki/MeeGohttp://en.wikipedia.org/wiki/Mozillahttp://en.wikipedia.org/wiki/WebKithttp://en.wikipedia.org/wiki/Linuxhttp://en.wikipedia.org/wiki/Eclipse_(software)http://en.wikipedia.org/wiki/Eclipse_(software)http://en.wikipedia.org/wiki/Linuxhttp://en.wikipedia.org/wiki/WebKithttp://en.wikipedia.org/wiki/Mozillahttp://en.wikipedia.org/wiki/MeeGohttp://en.wikipedia.org/wiki/Symbianhttp://en.wikipedia.org/wiki/Qt_(framework)
  • 7/28/2019 Report Final- ACCL

    12/80

    A C C L| Android Charting Component Library

    12 |P a g e

    3.0 Android

    Android is an operating system for mobile devices such as smart phones and tablet computer.Developed by the Open Handset Alliance led by Google. Android Open Source Project is task

    with the maintenance and further development of android.

    3.1 About Andr oid

    Android consists of a kernel based on the Linux kernel. The next level up contains the Andronative libraries. They are all written in C/C++ internally, but youll be calling them through Java

    interfaces. In this layer you can find the Surface Manager, 2D and 3D graphics, Media codec, tSQL database (SQLite), and a native web browser engine (WebKit).Android uses the Dalvivirtual machine. Dalvik Virtual Machine. Dalvik runs dex files, which are converted at compitime from standard class and jar files. Android has seen a number of updates since its originrelease. Its recent releases are 2.0 Eclair , 2.1 clair, 2.2 Froyo , 2.3 Gingerbread, 3.0 , 3.1 ,3Honeycomb.

    3.2 Andr oid Emulator

    The Android SDK includes a mobile device emulator a virtual mobile device that runs onyour computer. The emulator lets you develop and test Android applications without using physical device. The emulator supports a variety of options that you can specify when launchithe emulator, to control its appearance or behavior.

    Google provides an Android emulator with their SDK, which is designed to let developers te

    their apps on Android before running them on handsets. We can use this to test drive Android our computer, heres how to do it.

  • 7/28/2019 Report Final- ACCL

    13/80

    A C C L| Android Charting Component Library

    13 |P a g e

    3.2.1 Gettin g Star ted

    The Android Emulator requires Java to run, so if you dont already have Java installed on your

    computer, download it from the link below and install as normal.

    Then, download the Android SDK from Google ( link below ), and make sure to select the correct version for your computer. Once its downloaded, unzip the files as normal.

  • 7/28/2019 Report Final- ACCL

    14/80

    A C C L| Android Charting Component Library

    14 |P a g e

    In Windows, run the SDK Setup.exeprogram to get started running Android on your PC.

  • 7/28/2019 Report Final- ACCL

    15/80

  • 7/28/2019 Report Final- ACCL

    16/80

    A C C L| Android Charting Component Library

    16 |P a g e

    If you see an SSL error message, click theSettings tab on the left in the SDK and AVD Manager window that opened in the background. Here, uncheck the Force https box, click Ok, and thenreopen the setup.

    Now, the Package Installer will open. You can choose what you want to install, and theclick Install to begin installing the Android emulator on your computer.

  • 7/28/2019 Report Final- ACCL

    17/80

  • 7/28/2019 Report Final- ACCL

    18/80

    A C C L| Android Charting Component Library

    18 |P a g e

    Once youve started installing, youll see a window showing the download and installation

    progress. This may take a few minutes, depending on your Internet speed.

    Youll have some little Androids in your taskbar, but unfortunately they dont show the

    download progress.

  • 7/28/2019 Report Final- ACCL

    19/80

    A C C L| Android Charting Component Library

    19 |P a g e

    3.2.2 Setup an Andr oid Emulator

    Once the download is completed, you can setup an emulator to test drive Android on yocomputer. Select theVirtual Devices from the left menu, and then click the New button on theright.

    Enter a name for your virtualized Android, and select the version of Android you want to u

    from the drop-down menu. This will only show the version you installed previously, so you monly see one version listed depending on your selection.

  • 7/28/2019 Report Final- ACCL

    20/80

  • 7/28/2019 Report Final- ACCL

    21/80

  • 7/28/2019 Report Final- ACCL

    22/80

    A C C L| Android Charting Component Library

    22 |P a g e

    Youre now ready to run Android on your PC! Select your new virtual Android, andclick Start on the right.

    You can choose to scale the display if youve chosen a larger screen size than your monitor willfit, and then select Launch .

    Android will now begin to load in your emulator. Several command prompt windowsmay open, and then youll see the emulator

    itself. Notice that the default, large screen sizewill display a keypad and virtual buttons on theright side of the emulated device.

  • 7/28/2019 Report Final- ACCL

    23/80

    A C C L| Android Charting Component Library

    23 |P a g e

    Android may take several minutes to load, especially on your first run. After a while, the boscreen will switch toan Android boot animation. Finally, youll be presented with your newAndroid home screen!Use your mouse as you would normally, though remember that you dontneed to double-click to open apps.

  • 7/28/2019 Report Final- ACCL

    24/80

    A C C L| Android Charting Component Library

    24 |P a g e

    We did experience a few crashes in our tests, and the emulator felt somewhat sluggish, but in aits fun to try out a new mobile OS without spending money on a new phone.

  • 7/28/2019 Report Final- ACCL

    25/80

    A C C L| Android Charting Component Library

    25 |P a g e

    3.3 Andr oid Platform

    Android is an operating system and a software platform upon which applications are developeA core set of applications for everyday tasks, such as Web browsing and email, are included oAndroid handsets. As a product of the Open Handset Alliances vision for a robust and open

    source development environment for wireless, Android is an emerging mobile developme platform. The platform was designed for the sole purpose of encouraging a free and open markthat all mobile applications phone users might want to have and software developers might wato develop.

    3.4 Androids Underlying Architecture

    The Android platform is designed to be more fault-tolerant than many of its predecessors.Thhandset runs a Linux operating system, upon which Android applications are executed in secure fashion. Each Android application runs in its own virtual machine. Android applicatioare managed code; therefore, they are much less likely to cause the phone to crash, leading fewer instances of device corruption (also called bricking the phone, or rendering it useless).

  • 7/28/2019 Report Final- ACCL

    26/80

    A C C L| Android Charting Component Library

    26 |P a g e

    3.4.1 The L inu x Operating System

    The Linux 2.6 kernel handles core system services and acts as a hardware abstraction lay(HAL) between the physical hardware of the handset and the Android software stack.

    The Linux Kernel Mascot

  • 7/28/2019 Report Final- ACCL

    27/80

    A C C L| Android Charting Component Library

    27 |P a g e

    Diagram of the Android platform architecture.

  • 7/28/2019 Report Final- ACCL

    28/80

    A C C L| Android Charting Component Library

    28 |P a g e

    Some of the core fu nctions the kernel handles in clude

    1) Enforcement of application permissions and security

    2) Low-level memory management

    3) Process management and threading

    4) The network stack

    5) Display, keypad input, camera, WiFi, Flash memory, audio, and binder (IPC) driver

    access.

    3.4.2 Android Appli cation Runtime Environment

    Each Android application runs in a separate process, with its own instance of the Dalvik virtumachine (VM). Based on the Java VM, the Dalvik design has been optimized for mobile devicThe Dalvik VM has a small memory footprint and multiple instances of the Dalvik VM can ruconcurrently on the handset. Security and Permissions. The integrity of the Android platform maintained through a variety of security measures.

    3.5 Applications as Operating System User s

    When an application is installed, the operating system creates a new user profile associated withe application. Each application runs as a different user, with its own private files on the fisystem, a user ID, and a secure operating environment. The application executes in its ow process with its own instance of the Dalvik VM and under its own user ID on the operatinsystem.

    3.5.1 Explicitly Defined Appli cation Permissions

    To access shared resources on the system, Android applications register for the specifi privileges they require. Some of these privileges enable the application to use phonfunctionality to make calls, access the network, and control the camera and other hardwa

  • 7/28/2019 Report Final- ACCL

    29/80

    A C C L| Android Charting Component Library

    29 |P a g e

    sensors. Applications also require permission to access shared data containing private an personal information such as user preferences, users location, and contact information.

    Applications might also enforce their own permissions by declaring them for other applicatio

    to use. The application can declare any number of different permission types, such as read-onor read-write permissions, for finer control over the application.

    3.5.2 L imited Ad-H oc Permissions

    Applications that act as content providers might want to provide some on-the-fly permissions other applications for specific information they want to share openly. This is done using ad-hgranting and revoking of access to specific resources using Uniform Resource Identifiers (URIURIs index specific data assets on the system, such as images and text. Here is an example ofURI that provides the phone numbers of all contacts: content://contacts/phones to understanhow this permission process works, lets look at an example. Lets say weve got an application

    that keeps track of the users public and private birthday wish lists. If this application wanted toshare its data with other applications, it could grant URI permissions for the public wish lisallowing another application permission to access this list without explicitly having to ask for i

    3.5.3 Developing An droid Appli cations

    The Android SDK provides an extensive set of application programming interfaces (APIs) that both modern and robust. Android handset core system services are exposed and accessible to applications. When granted the appropriate permissions ,Android applications can share daamong one another and access shared resources on the system securely.

    3.5.4 An droid Programming L anguage Choices

    Android applications are written in Java For now, the Java language is the developers only

    choice on the Android platform. There has been some speculation that other programminlanguages, such as C++, might be added in future versions of Android.

  • 7/28/2019 Report Final- ACCL

    30/80

    A C C L| Android Charting Component Library

    30 |P a g e

    Duke, The Java Masco

    3.5.5 No Di stin ctions M ade Between Native and Thir d-Par ty Appli cations

    Unlike other mobile development platforms, there is no distinction between native applicatioand developer-created applications on the Android platform. Provided the application is grantthe appropriate permissions, all applications have the same access to core libraries and thunderlying hardware interfaces. Android handsets ship with a set of native applications such asWeb browser and contact manager. Third-party applications might integrate with these corapplications and even extend them to provide a rich user experience.

    3.5.6 Commonl y Used Packages

    With Android, mobile developers no longer have to reinvent the wheel. Instead, developers ufamiliar class libraries exposed through Androids Java packages to perform common tasks suchas graphics, database access, network access, secure communications, and utilities (such as XM parsing). The Android packages include support for

    1) Common user interface widgets (Buttons, Spin Controls,Text Input)

    2) User interface layout

    3) Secure networking and Web browsing features (SSL,WebKit)

    4) Structured storage and relational databases (SQLite)

    5) Powerful 2D and 3D graphics (SGL and OpenGL ES 1.0)

    6) Audio and visual media formats (MPEG4, MP3, Still Images)

  • 7/28/2019 Report Final- ACCL

    31/80

    A C C L| Android Charting Component Library

    31 |P a g e

    3.6 Android Application Framework

    The Android application framework provides everything necessary to implement your averaapplication. The Android application lifecycle involves the following key components:

    1) Activities are functions the application performs.

    2) Groups of views define the applications layout.

    3) Intents inform the system about an applications plans.

    4) Services allow for background processing without user interaction.

    5) Notifications alert the user when something interesting happens.

    Android Applications can interact with the operating system and underlying hardware usingcollection of managers. Each manager is responsible for keeping the state of some underlyinsystem service. For example, there is a Location Manager that facilitates interaction with thlocation-based services available on the handset. The View Manager and Window Managemanage user interface fundamentals.

    Applications can interact with one another by using or acting as a Content Provider. Built-

    applications such as the Contact manager are content providers, allowing third-party applicatioto access contact data and use it in an infinite number of ways. The sky is the limit.

  • 7/28/2019 Report Final- ACCL

    32/80

    A C C L| Android Charting Component Library

    32 |P a g e

    4.0 Chartin g And Charts

    People always like to see things graphically instead of the fact that are jotted down on the

    paper because its always easier to use and of course understand in a much lesser time.

    Thus, charting was introduced to help people observe data in a statistical manner, which isalways preferred. To achieve this goal of viewing data statistically different types of chartswere developed. A chart is a graphical representation of data, in which "the data is

    represented by symbols, such as bars in a bar chart, lines in a line chart, or slices in a pie

    chart. A chart can represent tabular numeric data, functions or some kinds of qualitative

    structures. Different types of charts which even our project is going to incorporate aredefined further.

    4.1 Bar chart

    A bar chart or bar graph is achartwithrectangular bars withlengths proportional to the valuesthat they represent. The bars can be plotted vertically or horizontally. Bar charts are used fo plotting discrete (or 'discontinuous') data which has discrete values. Some examples odiscontinuous data include 'shoe size' or 'eye color', for which you would use a bar chart.

    contrast, some examples of continuous data would be 'height' or 'weight'. A bar chart is veuseful if you are trying to record certain information whether it is continuous or not continuodata. Bar charts also look a lot like a histogram. They are often mistaken for each other.

    http://en.wikipedia.org/wiki/Charthttp://en.wikipedia.org/wiki/Rectanglehttp://en.wikipedia.org/wiki/Lengthhttp://en.wikipedia.org/wiki/Lengthhttp://en.wikipedia.org/wiki/Rectanglehttp://en.wikipedia.org/wiki/Chart
  • 7/28/2019 Report Final- ACCL

    33/80

  • 7/28/2019 Report Final- ACCL

    34/80

    A C C L| Android Charting Component Library

    34 |P a g e

    Histograms

    4.3 Pie Char t

    A pie chart (or a circle graph) is acircular chartdivided intosectors,illustrating proportion. In a pie chart, thearc lengthof each sector (and consequently itscentral angleandarea),is proportionalto the quantity it represents. When angles are measured with 1turnas unit then anumber of percent is identified with the same number of centiturns. Together, the sectors createfull disk. It is named for its resemblance to a piewhich has been sliced. The earliest known piechart is generally credited toWilliam Playfair'sStatistical Breviary of 1801.

    The pie chart is perhaps the most ubiquitous statistical chart in the business world and the ma

    media. However, it has been criticized,[4]and some recommend avoiding it, pointing out in particular that it is difficult to compare different sections of a given pie chart, or to compare daacross different pie charts. Pie charts can be an effective way of displaying information in somcases, in particular if the intent is to compare the size of a slice with the whole pie, rather thacomparing the slices among them. Pie charts work particularly well when the slices represent 2

    http://en.wikipedia.org/wiki/Circlehttp://en.wikipedia.org/wiki/Charthttp://en.wikipedia.org/wiki/Circular_sectorhttp://en.wikipedia.org/wiki/Arc_lengthhttp://en.wikipedia.org/wiki/Central_anglehttp://en.wikipedia.org/wiki/Areahttp://en.wikipedia.org/wiki/Proportionality_(mathematics)http://en.wikipedia.org/wiki/Turn_(geometry)http://en.wikipedia.org/wiki/Piehttp://en.wikipedia.org/wiki/William_Playfairhttp://en.wikipedia.org/wiki/Pie_chart#cite_note-Wilkinson-3http://en.wikipedia.org/wiki/Pie_chart#cite_note-Wilkinson-3http://en.wikipedia.org/wiki/Pie_chart#cite_note-Wilkinson-3http://en.wikipedia.org/wiki/William_Playfairhttp://en.wikipedia.org/wiki/Piehttp://en.wikipedia.org/wiki/Turn_(geometry)http://en.wikipedia.org/wiki/Proportionality_(mathematics)http://en.wikipedia.org/wiki/Areahttp://en.wikipedia.org/wiki/Central_anglehttp://en.wikipedia.org/wiki/Arc_lengthhttp://en.wikipedia.org/wiki/Circular_sectorhttp://en.wikipedia.org/wiki/Charthttp://en.wikipedia.org/wiki/Circle
  • 7/28/2019 Report Final- ACCL

    35/80

    A C C L| Android Charting Component Library

    35 |P a g e

    to 50% of the data, but in general, other plots such as thebar chartor thedot plot,or non-graphical methods such astables,may be more adapted for representing certain information. Italso shows the frequency within certain groups of information.

    t

    Pie Char

    http://en.wikipedia.org/wiki/Bar_charthttp://en.wikipedia.org/wiki/Dot_plot_(statistics)http://en.wikipedia.org/wiki/Table_(information)http://en.wikipedia.org/wiki/Table_(information)http://en.wikipedia.org/wiki/Dot_plot_(statistics)http://en.wikipedia.org/wiki/Bar_chart
  • 7/28/2019 Report Final- ACCL

    36/80

    A C C L| Android Charting Component Library

    36 |P a g e

    4.4 L in e Chart

    A line chart or line graph is a type of graph, which displays information as a series of data points connected by straightlinesegments. It is a basic type of chartcommon in many fields. Itis an extension of ascatter graph,and is created by connecting a series of points that representindividual measurements with line segments. A line chart is often used to visualize a trend data over intervals of time a time series thus the line is often drawn chronologically.

    Li ne chart

    5.0 Project Development

    5.1 Development Tool s

    The Android SDK includes a variety of tools that help you develop mobile applications for the Andro platform. The tools are classified into two groups: SDK tools and platform tools. SDK tools are platfor

    independent and are required no matter which Android platform you are developing on. Platform tools acustomized to support the features of the latest Android platform.

    http://en.wikipedia.org/wiki/Graph_of_a_functionhttp://en.wiktionary.org/wiki/linehttp://en.wikipedia.org/wiki/Charthttp://en.wikipedia.org/wiki/Scatter_graphhttp://en.wikipedia.org/wiki/Time_serieshttp://en.wikipedia.org/wiki/Time_serieshttp://en.wikipedia.org/wiki/Scatter_graphhttp://en.wikipedia.org/wiki/Charthttp://en.wiktionary.org/wiki/linehttp://en.wikipedia.org/wiki/Graph_of_a_function
  • 7/28/2019 Report Final- ACCL

    37/80

    A C C L| Android Charting Component Library

    37 |P a g e

    5.2 SDK Tools

    The SDK tools are installed with the SDK starter package and are periodically updated. Th

    SDK tools are required if you are developing Android applications. The most important SDtools include the Android SDK Manager (android sdk), the AVD Manager (android avd) themulator (emulator), and the Dalvik Debug Monitor Server (ddms). A short summary of somfrequently-used SDK tools is provided below:

    5.2.1 AND ROI D

    Android is an important development tool that lets us:

    Create, delete, and view Android Virtual Devices (AVDs). SeeManaging AVDs from theCommand Line.

    Create and update Android projects. SeeManaging Projects from the Command Line. Update your Android SDK with new platforms, add-ons, and documentation. SeeAdding SDK

    Packages. If we are using Eclipse, the android tool's features are integrated into ADT, so you should notneed to use this tool directly.

    5.2.2 Dalvik Debug M onitor Server (DD M S)

    Android ships with a debugging tool called the Dalvik Debug Monitor Server (DDMS), whic provides port-forwarding services, screen capture on the device, thread and heap information the device, logcat, process, and radio state information, incoming call and SMS spoofinlocation data spoofing, and more. This page provides a modest discussion of DDMS features;is not an exhaustive exploration of all the features and capabilities.

    http://developer.android.com/guide/developing/devices/managing-avds-cmdline.htmlhttp://developer.android.com/guide/developing/devices/managing-avds-cmdline.htmlhttp://developer.android.com/guide/developing/projects/projects-cmdline.htmlhttp://developer.android.com/sdk/adding-components.htmlhttp://developer.android.com/sdk/adding-components.htmlhttp://developer.android.com/sdk/adding-components.htmlhttp://developer.android.com/sdk/adding-components.htmlhttp://developer.android.com/guide/developing/projects/projects-cmdline.htmlhttp://developer.android.com/guide/developing/devices/managing-avds-cmdline.htmlhttp://developer.android.com/guide/developing/devices/managing-avds-cmdline.html
  • 7/28/2019 Report Final- ACCL

    38/80

    A C C L| Android Charting Component Library

    38 |P a g e

    H ow DDM S I nteracts with a Debugger

    On Android, every application runs in its own process, each of which runs in its own virtumachine (VM). Each VM exposes a unique port that a debugger can attach to. When DDM

    starts, it connects to adb. When a device is connected, a VM monitoring service is created betweenadb and DDMS, which notifies DDMS when a VM on the device is started orterminated. Once a VM is running, DDMS retrieves the the VM's process ID (pid), viaadb, andopens a connection to the VM's debugger, through the adb daemon (adbd) on the device. DDMcan now talk to the VM using a custom wire protocol. DDMS assigns a debugging port to eacVM on the device. Typically, DDMS assigns port 8600 for the first debuggable VM, the next o8601, and so on. When a debugger connects to one of these ports, all traffic is forwarded to th

    debugger from the associated VM. You can only attach a single debugger to a single port, bDDMS can handle multiple, attached debuggers.

    http://developer.android.com/guide/developing/tools/adb.htmlhttp://developer.android.com/guide/developing/tools/adb.htmlhttp://developer.android.com/guide/developing/tools/adb.htmlhttp://developer.android.com/guide/developing/tools/adb.html
  • 7/28/2019 Report Final- ACCL

    39/80

    A C C L| Android Charting Component Library

    39 |P a g e

    5.3 Ecl ipse Platform Techn ical Overview

    The Eclipse Platform is designed for building integrated development environments (IDEs) thcan be used to create applications as diverse as web sites, embedded Java TM programs, C+ programs, and Enterprise JavaBeans TM. This paper is a general technical introduction to the

    Eclipse Platform. Part I presents a technical overview of its architecture. Part II is a case study how the Eclipse Platform was used to build a full-featured Java development environment.

  • 7/28/2019 Report Final- ACCL

    40/80

    A C C L| Android Charting Component Library

    40 |P a g e

    The navigator view shows the files in the user's workspace; the text editor (top right) shows tcontent of a file; the tasks view (bottom right) shows a list of to-dos; the outline view (bottoleft) shows a content outline of the file being edited (not available for plain text files). Althouthe Eclipse Platform has a lot of built-in functionality, most of that functionality is very generiIt takes additional tools to extend the Platform to work with new content types, to do new thinwith existing content types, and to focus the generic functionality on something specific. T

    Eclipse Platform is built on a mechanism for discovering, integrating, and running modulcalled plug-ins. A tool provider writes a tool as a separate plug-in that operates on files in thworkspace and surfaces its tool-specific UI in the workbench. When the Platform is launchethe user is presented with an integrated development environment (IDE) composed of the set

  • 7/28/2019 Report Final- ACCL

    41/80

    A C C L| Android Charting Component Library

    41 |P a g e

    available plug-ins. The quality of the user experience depends significantly on how well thtools integrate with the Platform and how well the various tools work with each other.The Eclipse Platform (or simply "the Platform" when there is no risk of confusion) is designand built to meet the following requirements: Support t he construction of a variety of tools for application development. Support an unrestricted set of tool providers, including independent software vendors

    (ISVs). Support tools to manipulate arbitrary content types (e.g., HTML, Java, C, JS P, EJB, XML,

    and GIF). Facilitate seamless integration of tools within and across different content types and tool

    providers.

    Support both GUI and non -GUI-based application development environments. Run on a wide range of op erating systems, including Windows and Linux TM Capitalize on the popularity of the Java programming language for writing tools.

    The Eclipse Platform's principal role is to provide tool providers with mechanisms to use, anrules to follow, that lead to seamlessly-integrated tools. These mechanisms are exposed via wedefined API interfaces, classes, and methods. The Platform also provides useful building blocand frameworks that facilitate developing new tools.

  • 7/28/2019 Report Final- ACCL

    42/80

    A C C L| Android Charting Component Library

    42 |P a g e

    Ecli pse Platform Archi tecture

    5.3.1 ADT Plu g-in for Eclipse

    Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you powerful, integrated environment in which to build Android applications. ADT extends thcapabilities of Eclipse to let you quickly set up new Android projects, create an application Uadd packages based on the Android Framework API, debug your applications using the AndroSDK tools, and even export signed (or unsigned).apk files in order to distribute your application.Developing in Eclipse with ADT is highly recommended and is the fastest way to get starteWith the guided project setup it provides, as well as tools integration, custom XML editors, andebug output pane, ADT gives you an incredible boost in developing Android applications. Thdocument provides step-by-step instructions on how to download the ADT plugin and installinto your Eclipse development environment. Note that before you can install or use ADT, yomust have compatible versions of both the Eclipse IDE and the Android SDK installed.

  • 7/28/2019 Report Final- ACCL

    43/80

    A C C L| Android Charting Component Library

    43 |P a g e

    5.4 Androi d SDK M anager

    5.4.1 Adding SDK Packages

    Use the Android SDK Manager to set up your SDK and keep it up-to-date.Adding and updating packages in your Android SDK is fast and easy. To add or update thindividual SDK packages that you need, use the Android SDK Manager (included in the SDK Tools). It only takes a couple of clicks to install individual versions of the Android platform, nedevelopment tools, new documentation, and SDK add-ons. The new SDK packages arautomatically installed into your existing SDK directory, so you don't need to update youdevelopment environment to specify a new SDK location.

  • 7/28/2019 Report Final- ACCL

    44/80

    A C C L| Android Charting Component Library

    44 |P a g e

    L aunchin g the Andr oid SDK M anager

    The Android SDK Manager is the tool that you use to install and upgrade SDK packages in yodevelopment environment. You can launch the Android SDK Manager in one of the followinways.

    L aunchin g fr om Ecli pse/ADT

    If you are developing in Eclipse and have already installed the ADT Plugin, follow these steps access the Android SDK Manager tool:

    Open Eclipse

    SelectWindow > Android SDK Manager .

    5.4.2 I NSTAL L I NG TH E ANDROID SDK (SOFTWARE KI T)

    The Android Software Development Kit (SDK) allows developers to create applications for thAndroid platform. The Android SDK includes sample projects with source code, developmetools, an emulator, and required libraries to build Android applications which are written usin

    the Java programming language.

    Much of the info in this guide comes from the documentation on theAndroid Developerssite.Follow this quick guide to successfully install Android SDK on your computer. If you are new it, it is a bit complicated to install compared to your usual program. However if you are good

    following instructions, its as easy as A -B-C.

    The process involves four general steps:

    Meeting System Requirements

    Fetching the Android SDK Package

    Installing the Android Development Tools (ADT) Plug-in for Eclipse

    http://developer.android.com/sdk/index.htmlhttp://www.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/#readyhttp://www.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/#download-sdkhttp://www.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/#install-adthttp://www.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/#install-adthttp://www.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/#download-sdkhttp://www.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/#readyhttp://developer.android.com/sdk/index.html
  • 7/28/2019 Report Final- ACCL

    45/80

    A C C L| Android Charting Component Library

    45 |P a g e

    Adding Android Platforms and Components

    Step 1: Get Ready Your Computer

    Before anything else, see to it that your computer meets the minimum system requirementSpecifically, you might need to install the Java Development Kit (JDK), if you dont have it yet.

    The following outlines the system and software requirements for developing Androiapplications using the Android SDK.

    Supported Operating Systems

    Windows XP or Vista Mac OS X 10.4.8 or later (x86 only) Linux (tested on Linux Ubuntu Dapper Drake)

    Supported Development Environments

    Eclipse Integrated Development Environment (IDE)

    Eclipse 3.5 (Galileo) or greater. Note: Eclipse 3.4 (Ganymede) is no longer supported

    with the latest version of ADT. Eclipse JDT plug-in (included in most Eclipse IDE packages) If you need to install or update Eclipse, you can download ithere. Several types of

    Eclipse packages are available for each platform. For developing Android applicationwe recommend that you install one of these packages:

    o Eclipse IDE for Java Developerso Eclipse Classic (versions 3.5.1 and higher)o

    Eclipse IDE for Java EE Developers Note: Not compatible with GNU Compiler for Java (gcj)

    http://www.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/#add-componentshttp://www.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/#add-componentshttp://www.eclipse.org/downloads/http://www.eclipse.org/downloads/http://www.androidauthority.com/how-to-install-android-sdk-software-development-kit-21137/#add-components
  • 7/28/2019 Report Final- ACCL

    46/80

  • 7/28/2019 Report Final- ACCL

    47/80

    A C C L| Android Charting Component Library

    47 |P a g e

    Step 4: Download and Add Platforms and Other Components

    The last step in setting up your SDK is using the Android SDK and AVD Manager (a tooincluded in the SDK starter package) to download essential SDK components into you

    development environment.

    Launching Android SDK and AVD Manager

    You can launch the Android SDK and AVD Manager in any of the following ways:

    From within Eclipse, select Window > Android SDK and AVD Manager. On Windows, double-click the SDK Manager.exe file at the root of the Android SDK

    directory. On Mac or Linux, open a terminal and navigate to the tools/ directory in the

    Android SDK. Then type android on the terminal window and press Enter.

    To download components, use the graphical UI of the Android SDK and AVD Manager t browse the SDK repository and select new or updated components (see Figure ). The AndroSDK and AVD Manager installs the selected components in your SDK environment.

  • 7/28/2019 Report Final- ACCL

    48/80

    A C C L| Android Charting Component Library

    48 |P a g e

    F or SDK I nstall in Windows we have used the foll owing steps:

    1. Download the latest version of Android SDK for Windows2. Unzip the package to the root of C:\. ( NOTE: This will output a folder called android -

    sdk-windows )3. Open up the android-sdk-windows folder and launch the SDK Manager.4. When you launch the SDK Manager for the first time it will ask for which packages t

    install. Theonly package we are concerned with at this time is Android SDK Platform -

    tools, revision 6. You can reject all the others if you are not interested in them. 5. Once that is finished, you will need to install the USB drivers included with the Androi

    SDK.1. Click on Available Packages on the left. 2. Expand Third party Add -ons .

  • 7/28/2019 Report Final- ACCL

    49/80

    A C C L| Android Charting Component Library

    49 |P a g e

    3. Expand Google Inc. add -ons . 4. Check Google USB Driver package, revision 4. 5. Click Installed Selected .

    6. Once thats finished installing, you can close the SDK Manager. 7. Go to the Control Panel, and select theSystem Properties (Windows XP) or System

    (Windows Vista/7).8. Select the Advanced settings. (On Windows XP: Click on the Advanced tab. On

    Windows Vista/7: Click on Advanced system settings on the left.)9. Click on Environment Variables.10. Under the System variable section, you will look for Path . Double -click on it.11. In the Variable values section, add at the very end the location of the tools & package -

    tools folder, with a semicolon separating these two paths from the rest. (e.g%SystemRoot%;C:\android-sdk-windows\platform-tools;C:\android-sdk-windows\tools )

    12. On your Android device, ensure that USB Debugging is enabled (Settings Application Development).

    13. Plug the device into the computer via USB cable. The computer will attempt to install thdrivers automatically.

    14. On success, open a command prompt on the computer, and type in the followingcommand to sure everything is setup properly: adb devices

    15. If it lists any devices, everything is fine and you are finished. If not, the drivers may no be installed correctly, please continue.

    16. Open the Device Manager as follows:1. Right-click on My Computer (Windows XP) or Computer (Windows Vista/7).2. Click on Manage.3. Click on Device Manager on the left.

    17. You will probably see Unknown Device with ADB listed under it with a yellow

    exclamation mark.18. Right-click on ADB.19. Click on Update Driver Software . 20. Click on Browse my computer for driver software . 21. Click on Let me pick from a list of device drivers on my computer .

  • 7/28/2019 Report Final- ACCL

    50/80

    A C C L| Android Charting Component Library

    50 |P a g e

    22. Click on Have Disk . 23. Click on Browse . 24. Navigate to C:\android-sdk-windows\extras\google\usb_driver and select

    android_winusb.inf . 25. Click on Android ADB Interface . ( NOTE: You will get an Update Driver Warning,

    click on Yes .)26. Once finished installing the driver, open a command prompt on the computer, and type i

    the following command to sure everything is setup properly: adb devices27. If it lists any devices, everything is fine and you are finished. If not, try restartin

    Windows. If you still cant see your device, you may have furt her issues and will have todo further research on your own.

  • 7/28/2019 Report Final- ACCL

    51/80

    A C C L| Android Charting Component Library

    51 |P a g e

    5.5 Andr oid Emul ator

    The Android SDK includes a mobile device emulator a virtual mobile device that runs onyour computer. The emulator lets you develop and test Android applications without using

    physical device. The emulator supports a variety of options that you can specify when launchithe emulator, to control its appearance or behavior.

    Google provides an Android emulator with their SDK, which is designed to let developers tetheir apps on Android before running them on handsets. We can use this to test drive Android our computer, heres how to do it.

  • 7/28/2019 Report Final- ACCL

    52/80

    A C C L| Android Charting Component Library

    52 |P a g e

    6.0 Related Diagrams

    6.1 Class Diagram:

    The purpose of the class diagram is to model the static view of an application. The clasdiagrams are the only diagrams which can be directly mapped with object oriented languages athus widely used at the time of construction.

    The UML diagrams like activity diagram, sequence diagram can only give the sequence flow the application but class diagram is a bit different. So it is the most popular UML diagram in thcoder community.

    So the pur pose of th e class diagram can be summari zed as:

    Analysis and design of the static view of an application. Describe responsibilities of a system. Base for component and deployment diagrams. Forward and reverse engineering.

  • 7/28/2019 Report Final- ACCL

    53/80

    A C C L| Android Charting Component Library

    53 |P a g e

    6.2 Use Case Diagram:

    The purpose of use case diagram is to capture the dynamic aspect of a system. But this definitio

    is too generic to describe the purpose.

    Because other four diagrams (activity, sequence, collaboration and State chart) are also havinthe same purpose. So we will look into some specific purpose which will distinguish it froother four diagrams.

    Use case diagrams are used to gather the requirements of a system including internal anexternal influences. These requirements are mostly design requirements. So when a system

    analyzed to gather its functionalities use cases are prepared and actors are identified.

    Now when the initial task is complete use case diagrams are modelled to present the outsidview.

    So in brief, the purposes of use case diagrams can be as follows:

  • 7/28/2019 Report Final- ACCL

    54/80

    A C C L| Android Charting Component Library

    54 |P a g e

    Used to gather requirements of a system. Used to get an outside view of a system. Identify external and internal factors influencing the system. Show the interacting among the requirements are actors.

    6.3 SEQUEN CE DI AGRAM :

    UML sequence diagrams are used to show how objects interact in a given situation. Aimportant characteristic of a sequence diagram is that time passes from top to bottom: thinteraction starts near the top of the diagram and ends at the bottom (i.e.Lower equalslater ).A popular use for them is to document the dynamics in an object-oriented system. For each kcollaboration, diagrams are created that show how objects interact in various representativscenarios for that collaboration.

  • 7/28/2019 Report Final- ACCL

    55/80

  • 7/28/2019 Report Final- ACCL

    56/80

    A C C L| Android Charting Component Library

    56 |P a g e

    7.2 H ardware I nter face: The hardware interface could be any android-oriented device like mobile systems using Andro platform could be an interface to the application using this component library. The interfaccould be extended to android tablets as well.

    7.3 Software I nterf ace:

    The application developers use the ACCL in order to develop the applications intended for t

    user. the user implements it in his device using Android software. The gap between the ACCand the application is bridged by importing ACCL in the development phase of the application

  • 7/28/2019 Report Final- ACCL

    57/80

    A C C L| Android Charting Component Library

    57 |P a g e

    7.4 Other Non-F unctional I nter face:

    7.4.1 Per formance Requi rement:

    The ACCL gives real time charts and its respective values in response to the requestequery. ACCL gives high performance by producing efficient charts.

    Real time variations in the input data are also reflected on the charts made with the helof ACCL.

    Different computations performed on data are reflected instantly in the charts. Further evaluation on the derived results can be done using charts made by ACCL. Instant refreshing of charts are also implemented in the library.

    7.4.2 Software Qual ity Attr ibu tes:

    The main quality of the ACCL is the responsiveness required in producing the requesteresults.

    The variations in real time are projected in the charts in as less time as possible. Any illegal input entered will not crash the system or degrade the performance of th

    system. Refreshing of charts produces new charts instantly according to the new input valu

    given. On various events like mouse dragged or tap on the screen over the charts gives the actu

    value of that chart at its respective position, like dragging a mouse over a specifi position over a pie-chart gives its actual value at that point.

  • 7/28/2019 Report Final- ACCL

    58/80

    A C C L| Android Charting Component Library

    58 |P a g e

    7.5 Other Requi rements:

    7.5.1 Testing F ramework :

    Lets look at the traditional software development cycle. The figure below depicts thesame.

    Testing phase comes after the coding phase and before the software is launched.

    But the recommended test process involves testing in every phase of the lifecycle. During trequirements phase the emphases is on validation to determine that the requirements meet thneeds of organization. During the design and program phases the emphasis is on verification ensure that the design and program accomplish the defined requirements. During the test aninstallation phases, the emphasis is on inception to determine that the implemented system mee

  • 7/28/2019 Report Final- ACCL

    59/80

    A C C L| Android Charting Component Library

    59 |P a g e

    the system specification.During the maintenance phases, the system will be restarted tdetermine that the changes work and the unchanged portion continues to work.

    8.0 Execution of Appli cation

    The project is named as AND ROID CHARTING COMPONENT LIBRARY , which basically will be used to display charts and all the various features of a chart. The main purposeof ACCL is to develop a component library that could be used by an application developer tocreate, evaluate and implement various charts and charting features in the native Android platform.

    DESCRIPTI ON OF CLASSES:

    The main class is named asAcclDemoActivity which has been used in order to invokethe different classes and the methods in those class.

    The next step isour base to the project. It has been named as base class . This classincludes the method to draw the axes of the display as well as the display of text alongthe axes.

    The basic chart called theline chart is the next step to it. So the class line has beenincluded to display the line chart.

    Similarly other classes have been included likebar chart , area chart , columnchart and of course thepie chart .

    The detailed execution of this application will be such that , the component library that is builtneed to be imported in the application. The library has been named as ACCL . Hence one canimport the package using

    import accl.*;

    Once it is imported , the user can invoke the different classes and display any chart of his choic by simply invoking that method.

  • 7/28/2019 Report Final- ACCL

    60/80

    A C C L| Android Charting Component Library

    60 |P a g e

    For eg. If the user wants to display a pie chart then the following steps need to be followed:

    1. Import the package named as ACCL.

    2. Invoke the class named aspiechart.

    3. Invoke the parameterized constructor in that class.4. Pass the parameters that the user wants to be displayed along the axes.5. These parameters will be accepted by the library in an array format which corresponds to

    the x and y axis respectively. The different possibilities of data types along the axes has been taken care of . As we know the possible types can be integer , string anddouble . Therefore the possible combinations of data types has been given below:

    Integer-string Integer-integer Integer-double String-string String-integer String-double Double-double Double-integer Double-string.

    6. The required chart will then be displayed accordingly.

    Similarly these steps can be used to display the other charts in the package as well.

    With the inclusion of all possible combinations of data types , the feature and appropriateness the library has been enhanced.

    The relevant enclosures have also been added.

  • 7/28/2019 Report Final- ACCL

    61/80

    A C C L| Android Charting Component Library

    61 |P a g e

    9.0 Var ious Classes, I nterf aces and L ibrar ies I mported

    Classes Used:

    Some of theclasses used throughout the completion of our project is numerous so it is not possible to explain them all here in the report so we are illustrating few classes which have beused .

    Canvas:

    public class Canvas extends Object

    java.lang.Object

    android.graphics.Canvas

    Class Overview

    The Canvas class holds the "draw" calls. To draw something, you need 4 basic components: A

    Bitmap to hold the pixels, a Canvas to host the draw calls (writing into the bitmap), a drawing

    primitive (e.g. Rect, Path, text, Bitmap), and a paint (to describe the colors and styles for the

    drawing).

    Public Constructors

    Canvas()

    Construct an empty raster canvas.

    Canvas(Bitmap bitmap)

    Construct a canvas with the specified bitmap to draw into.

  • 7/28/2019 Report Final- ACCL

    62/80

    A C C L| Android Charting Component Library

    62 |P a g e

    RectF:

    public class RectF extends Object implements Parcelable

    java.lang.Object

    android.graphics.RectF

    Class Overview

    RectF holds four float coordinates for a rectangle. The rectangle is represented by the

    coordinates of its 4 edges (left, top, right bottom). These fields can be accessed directly. Use

    width() and height() to retrieve the rectangle's width and height. Note: most methods do not

    check to see that the coordinates are sorted correctly (i.e. left

  • 7/28/2019 Report Final- ACCL

    63/80

    A C C L| Android Charting Component Library

    63 |P a g e

    M ethods Used:

    Some of the methods used throughout the completion of our project is numerous so it is n possible to explain them all here in the report so we are illustrating few classes which have beused .

    public void drawARGB (int a, int r, int g, int b)

    Fill the entire canvas' bitmap (restricted to the current clip) with the specified ARGB color,

    using srcover porterduff mode.

    Parametersa alpha component (0..255) of the color to draw onto the canvas

    r red component (0..255) of the color to draw onto the canvas

    g green component (0..255) of the color to draw onto the canvas

    b blue component (0..255) of the color to draw onto the canvas

    public void drawArc (RectF oval, float startAngle, float sweepAngle, boolean useCenter,

    Paint paint)

    Draw the specified arc, which will be scaled to fit inside the specified oval.

    If the start angle is negative or >= 360, the start angle is treated as start angle modulo 360. If tsweep angle is >= 360, then the oval is drawn completely. Note that this differs slightly fro

    SkPath::arcTo, which treats the sweep angle modulo 360. If the sweep angle is negative, thsweep angle is treated as sweep angle modulo 360

    The arc is drawn clockwise. An angle of 0 degrees correspond to the geometric angle of degrees (3 o'clock on a watch.)

  • 7/28/2019 Report Final- ACCL

    64/80

    A C C L| Android Charting Component Library

    64 |P a g e

    Parameters

    oval The bounds of oval used to define the shape and size of the arc

    startAngle Starting angle (in degrees) where the arc begins

    sweepAngle Sweep angle (in degrees) measured clockwise

    useCenter If true, include the center of the oval in the arc, and close it if it is being strokedThis will draw a wedge

    paint The paint used to draw the arc

    public void drawCircle (float cx, float cy, float radius, Paint paint)

    Draw the specified circle using the specified paint. If radius is

  • 7/28/2019 Report Final- ACCL

    65/80

    A C C L| Android Charting Component Library

    65 |P a g e

    Parameters

    color the color to draw onto the canvas

    public void drawLine (float startX, float startY, float stopX, float stopY, Paint paint)

    Draw a line segment with the specified start and stop x,y coordinates, using the specified paint.

    NOTE: since a line is always "framed", the Style is ignored in the paint.

    Parameters

    startX The x-coordinate of the start point of the line

    startY The y-coordinate of the start point of the line

    paint The paint used to draw the line

    public void drawOval (RectF oval, Paint paint)

    Draw the specified oval using the specified paint. The oval will be filled or framed based on the

    Style in the paint .

    Parameters

    oval The rectangle bounds of the oval to be drawn

    public void drawPaint (Paint paint)

    Fill the entire canvas' bitmap (restricted to the current clip) with the specified paint. This is

    equivalent (but faster) to drawing an infinitely large rectangle with the specified paint.

    Parameters

  • 7/28/2019 Report Final- ACCL

    66/80

    A C C L| Android Charting Component Library

    66 |P a g e

    paint The paint used to draw onto the canvas

    public void drawPath (Path path, Paint paint)

    Draw the specified path using the specified paint. The path will be filled or framed based on the

    Style in the paint .

    Parameters

    path The path to be drawn

    paint The paint used to draw the path

    public void drawPicture (Picture picture)

    Save the canvas state, draw the picture, and restore the canvas state. This differs from

    picture.draw(canvas), which does not perform any save/restore.

    Parameters

    picture The picture to be drawn

    public void drawPoint (float x, float y, Paint paint)

    Helper for drawPoints() for drawing a single point.

  • 7/28/2019 Report Final- ACCL

    67/80

    A C C L| Android Charting Component Library

    67 |P a g e

    10 .0 Project Screenshots

    10.1 Gri d View

    GRID VIEW: We need to create a base of the project that is axes x, y and grid lines for thereference of the values given by the user.

    http://localhost/var/www/apps/conversion/tmp/scratch_1/l%20http://localhost/var/www/apps/conversion/tmp/scratch_1/l%20
  • 7/28/2019 Report Final- ACCL

    68/80

    A C C L| Android Charting Component Library

    68 |P a g e

    10.2 Li ne Char t

    LINE CHART: As per the values given by the user we get the desired Line Chart.

  • 7/28/2019 Report Final- ACCL

    69/80

    A C C L| Android Charting Component Library

    69 |P a g e

    10.3 Bar Chart

    BAR CHART: As per the values given by the user we get the desired Bar Chart.

  • 7/28/2019 Report Final- ACCL

    70/80

    A C C L| Android Charting Component Library

    70 |P a g e

    10.4 Pie Char t

    PIE CHART: As per the values given by the user we get the desired Pie Chart.

  • 7/28/2019 Report Final- ACCL

    71/80

    A C C L| Android Charting Component Library

    71 |P a g e

    11.0 Test Cases

    11.1 Test Report

    L ine Chart

    User I nput 1:

    Array 1[X]: {1.0, 5.0, 10.0, 18.0}

    Array 2[Y]: {11.0, 15.0, 110.0, and 11.0}

    Output:

  • 7/28/2019 Report Final- ACCL

    72/80

    A C C L| Android Charting Component Library

    72 |P a g e

    User I nput 2:

    Array1[X] : {Jan, Feb., Mar, Apr }

    Array2[Y] : {10.0,15.0, 110.0, 118.0 }

    Output:

  • 7/28/2019 Report Final- ACCL

    73/80

    A C C L| Android Charting Component Library

    73 |P a g e

    Bar Chart

    User I nput 1:

    Array1 [X]: {Jan, Feb., Mar}

    Array2[Y] : {15.0, 110.0, 11.0}

    Output:

  • 7/28/2019 Report Final- ACCL

    74/80

    A C C L| Android Charting Component Library

    74 |P a g e

    User I nput 2:

    Array1[X] : {2007, 2008, 2009}

    Array2[Y]: {2000, 3000, 1000}

    Output:

  • 7/28/2019 Report Final- ACCL

    75/80

    A C C L| Android Charting Component Library

    75 |P a g e

    Column Chart:

    User I nput 1:

    Array1[X]:{1.0, 10.0, 5.0 }

    Array2[Y]:{ Jan, Feb., Mar }

    Output:

  • 7/28/2019 Report Final- ACCL

    76/80

  • 7/28/2019 Report Final- ACCL

    77/80

    A C C L| Android Charting Component Library

    77 |P a g e

    Pie Char t

    User I nput 1:

    Array1 []:{USA, UK, INDIA, JAPAN, NEPAL }

    Array2 []:{ 35, 30, 15, 15, 5 }

    Output:

  • 7/28/2019 Report Final- ACCL

    78/80

    A C C L| Android Charting Component Library

    78 |P a g e

    User I nput 2:

    Array1[]:{abc, pqr, xyz}

    Array2[]:{ 33.33, 33.33, 33.33 }

    Output:

  • 7/28/2019 Report Final- ACCL

    79/80

    A C C L| Android Charting Component Library

    79 |P a g e

    12 .0 Conclusion and Fu tur e I mprovement

    http://localhost/var/www/apps/conversion/tmp/scratch_1/l%20http://localhost/var/www/apps/conversion/tmp/scratch_1/l%20
  • 7/28/2019 Report Final- ACCL

    80/80

    A C C L| Android Charting Component Library

    13.0 References

    [1] http://en.wikipedia.org/wiki/Android_(operating_system)

    [2] http://info.singtel.com/android/library.php

    [3] opencv.willowgarage.com/wiki/Android

    [4] en.androidwiki.com/wiki/Applications

    http://en.wikipedia.org/wiki/Android_(operating_system)http://en.wikipedia.org/wiki/Android_(operating_system)http://info.singtel.com/android/library.phpmailto:opencv.willowgarage.com/wiki/Androidmailto:opencv.willowgarage.com/wiki/Androidmailto:en.androidwiki.com/wiki/Applicationsmailto:en.androidwiki.com/wiki/Applicationsmailto:opencv.willowgarage.com/wiki/Androidhttp://info.singtel.com/android/library.phphttp://en.wikipedia.org/wiki/Android_(operating_system)