Automated card recharge android application


Published on

Automated card recharge android application, Khulna University Khulna Bangladesh

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Automated card recharge android application

  1. 1. KHULNA UNIVERSITYCSE3200 – Software Development project-IIName of the project: -Automated Card Recharge AndroidApplication Project supervisor MD.Zahidul Islam Lecture Amit Kumar Mondal Lecture Computer science and engineering discipline Khulna University, Khulna Project submitted by Md. Arifulhaque 070201 AmiyaRanjan Roy 080206 Raj Kumar Sah 080237 Computer science and engineering discipline Khulna University, Khulna
  2. 2. AcknowledgementsFirst of all we Acknowledge to almighty god for completing this project successfully. Then weare grateful to our project supervisor whose intelligent direction has made the task easier toaccomplish. A special thanks to the Head of Department of computer science and engineering toallow us to take several components form the Android set and interfacing lab as also to theteacher who has assigned us this project.
  3. 3. Index1. Objective2. What Is Android3. Linux4. Advantage5. The Basic Componentsof Android Application6.How to Make Connection between Android Set and Pc7.Making a Simple OCR Android App using Tesseract8.Automated Card Recharge AndroidApplication
  4. 4. ObjectiveThe object of this project is to a develop software that will perform Android and some externaldevice controlling operation snapshot Android set
  5. 5. What is Android?Android is a Linux-based operating system designed primarily for touch screen mobile devicessuch as smartphones and tablet computers. Initially developed by Android. Android was unveiledin 2007 along with the founding of the Open Handset Alliance: a consortium of hardware,software, and telecommunication companies devoted to advancing open standards for mobiledevices.The first Android-powered phone was sold in October 2008.Android is open source and Google releases the code under the License. This open source codeand permissive licensing allows the software to be freely modified and distributed by devicemanufacturers, wireless carriers and enthusiast developers. Additionally, Android has a largecommunity of developers writing applications ("apps") that extend the functionality of devices,written primarily in a customized version of the Java programming language.LinuxAndroid consists of a kernel based on Linux kernel version 2.6 and, from Android 4.0 onwards,version 3.x, with middleware, libraries and APIs written in C, and application software runningon an application framework which includes Java-compatible libraries based on ApacheHarmony. Android uses the Dalvik virtual machine with just-in-time compilation to run Dalvikdex-code (Dalvik Executable), which is usually translated from Java bytecode.The mainhardware platform for Android is the ARM architecture. There is support for x86 from theAndroid x86 project.Advantage  Android can Run Multiple Apps at the Same Time  Android Keeps Information Visible on Your Home Screen:  Android Has a Better App Market:  Android Gives You Better Notifications:  Android Lets You Choose Your Hardware:  Android Lets You Choose Your Carrier:  Android Lets You Install Custom ROMs:  Android Lets You Change Your Settings Faster:  Android Does Google and Social Integration:  Android Gives You More Options to Fit Your Budget:
  6. 6. The basic components of Android ApplicationActivityAn application may or may not have a User Interface. If it has a user interface, it will have one ormore Activity.ServiceIf an application is to have a long life cycle it should be put into a Service. For example abackground data synchronization utility running continuously should be implemented as aService.Broadcast ReceiverLike Services, Broadcast Receivers do not have a User Interface. Of even more importance, thecode running in the one Receive method of a Broadcast Receiver should make no assumptionsabout persistence or long-running operations. If the Broadcast Receiver requires more than atrivial amount of code execution, it is recommended that the code initiate a request to a Serviceto complete the requested functionality.Content ProviderIf an application manages data and needs to expose that data to other applications running in theAndroid environment, a Content Provider should be implemented.How to make connection between Android application and pc1. Connect via USBStep 1: Check these on your phone settings. (skip if done)1. Settings -> Application settings ->Unknown sources.2. Settings -> Application settings -> Development -> USB debugging.
  7. 7. Step 2: Install the USB driver for your android Phone on computerInstall the USB driver you got from your android phone Manufacturer. It was always in a cdgiven to you when you bought your android phone. If you dont have one, you can go to themanufacturers Web site, search and download the correct phone USB driver to install or contactthe manufacturer directly.Step3: Install and run Very Android SMS Backup on your PhoneFree download and install Very Android SMS Backup on your Android phone (Step by stepguide). Or you can go to the Market (Google Play) on your android to find and installVeryAndroid SMS Backup. Run the SMS Backup software on your phone and you will see thisscreen:Step 4: Start PC Sync ServiceClick the "PC Sync" button. Then input a port info or wifi address and then click "Start" button.Step 5: Run PC Tool for Very Android SMS Backup on computer..Install PC Tool for Very Android SMS Backup on computer and then run it. Then click "Menu" -> "Connection". Now you can check the connecting method (USB). Click "Connect" button tofinish.Done.Now you can backup, restore or send messages directly on computer with PC Tool for VeryAndroid SMS Backup.
  8. 8. Making a Simple OCR Android App using TesseractAndroid application to extract the text from the image being captured by the camera of your Androidphone! We’ll be using a fork of Tesseract Android Tools by google’sgithub. They are based on theTesseract OCR Engine (mainly maintained by Google) and Leptonica image processing libraries.Some of the procedure is inevitably manual. As much automated help as possible is provided.More automated tools may appear in the future, but will require a complex install/build process.The tools referenced below are all built in the training subdirectory.Generate Training ImagesThe first step is to determine the full character set to be used, and prepare a text or wordprocessor file containing a set of examples. The most important points to bear in mind whencreating a training file are: Make sure there are a minimum number of samples of each character 4 There should be more samples of the more frequent characters - at least 16. Dont make the mistake of grouping all the non-letters together. Make the text more realistic. For example, 1234 4321 4152 6325 This gives the textline finding code a much better chance of getting sensible baseline metrics for the special characters. The training data should be grouped by font. Ideally, all samples of a single font should go in a single tiff file, but this may be multi-page tiff (if you have libtiff or leptonica installed), so the total training data in a single font may be many pages and many 10s of thousands of characters, allowing training for large-character-set languages.
  9. 9. There is no need to train with multiple sizes. 4 point will do. (An exception to this is very small text. If you want to recognize text with an x-height smaller than about 15 pixels, you should either train it specifically or scale your images before trying to recognize them.) DO NOT MIX FONTS IN AN IMAGE FILE (In a single .tr file to be precise.) This will cause features to be dropped at clustering, which leads to recognition errors. The example boxtiff files on the downloads page will help if you are not sure how to format your training data.Next print and scan (or use some electronic rendering method) to create an image of yourtraining page. Upto training files can be used (of multiple pages). It is best to create a mix offonts and stylesNOTE: training from real images is actually quite hard, due to the spacing-out requirements.This will be improved in a future release. For now it is much easier if you can print/scan yourown training text.Automated Card Recharge AndroidApplicationThe below instructions were written for the Android SDK Tools r12. To compile using r14+,after ndk-build do rm build.xml, then android update project --path, then ant release (withoutmodifying build.xml). Running the test cases on new versions of the SDK Tools will requireother modifications.These instructions assume we have already installed the Android SDK and NDK along withEclipse and Subversion on Ubuntu.Overall, what we need to do is to set up the tesseract-android-tools project as a library project inEclipse, and tell your project to refer to the library project. So you’ll need two projects inEclipse, whereas for an ordinary app you would have just one.Step-by-step:Check out the latest tesseract-android-tools source code using Subversion (don’t use the outdatedcode from “Downloads”):git clone the project according to the instructions in the readme file. Make sure that ndk-buildsuccessfully creates the .so object files, and that you get “BUILD SUCCESSFUL” when ant
  10. 10. finishes. You may need to make three modifications:Modification 1. Apparently the site is unavailable for the libjpeg download, and it’sbeen pointed out elsewhere that using an alternative repository works, so use the followingcommand instead of the existing git clone command:git clone git:// libjpegModification 2. Before running ant, edit the existing build.xml as a workaround for Android bug#13024. Put the following lines immediately before the ending </project> tag:<!-- beginning of modification --><path id="android.libraries.src"><path refid="project.libraries.src" /></path><path id="android.libraries.jars"><path refid="project.libraries.jars" /></path><!-- end of modification -->Modification 3. Do ant compile instead of ant release.Create an AVD running Android 2.2 or higher, and with an SD card.Import the tesseract-android-tools project into Eclipse:File->Import->Existing Projects Into Workspace->Choose tesseract-android-tools->FinishIf we get an error complaining about a compiler level 5.0 compatibility problem, right-click theproject name for tesseract-android-tools and do Properties->Java Compiler->Enable projectspecific settings and Uncheck “Use default compliance settings,” then set “Generated .class filescompatibility” to 1.5, and set “Source compatibility” to 1.5. Answer yes if asked to rebuild.Add tesseract-android-tools as a library project:Right-click tesseract-android-tools project name->Properties->Android->check “Is Library”.[Optional] Install the built-in test case package by importing the tesseract-android-tools-testproject:File->Import->Existing Projects Into Workspace->Choose tesseract-android-tools-test->Finish[Optional] Start the AVD, wait for it to boot, and install the traineddata file required by the testcases:wget eng.traineddata.gzadb shell mkdir /mnt/sdcard/tesseract
  11. 11. adb shell mkdir /mnt/sdcard/tesseract/tessdataadb push eng.traineddata /mnt/sdcard/tesseract/tessdata[Optional] Run the test cases–the test cases should pass, saying “OK (3 tests)”:adb install tesseract-android-tools-test/bin/tesseract-android-tools-test.apkadb shell am instrument -w -e package your new app as a new Android project.Configure your project to use the tesseract-android-tools project as a library project: Right clickyour new project name, do Properties->Android->Library->Add, and choose tesseract-android-tools.You can now create a TessBaseAPI object in your app’s on Create():File myDir = getExternalFilesDir(Environment.MEDIA_MOUNTED);TessBaseAPI baseApi = new TessBaseAPI();baseApi.init(myDir.toString(), "eng"); // myDir + "/tessdata/eng.traineddata" must be presentbaseApi.setImage(myImage);String recognizedText = baseApi.getUTF8Text(); // Log or otherwise display this string...baseApi.end();Run your project on the AVD.Other basic examples can be found in the file in the tesseract-android-tools-test project.Recharge:We use the text, then modify for our recharge option for different operators.