You are on page 1of 7

Android Basic eBook Store by Odilogy

Android Basic eBook Store


Created:
By:
Contact:

17/06/2013
Odilogy
odilogy@gmail.com

Requirements:
Eclipse 3.5 +
Apache (PHP,MySQL) or XAMPP (Windows) for testing
Files include: Web Application based on cibonfire, Eclipse Android Project

App Description
A. What is this ?
Android Basic eBook is a basic application implements minimum functionality for ebook publishing
and ebook reader. This application contains ebook listing, download system and ebook viewer, but
doesnt include payment system. Its only for free ebook publishing.
B. How it works ?
User (this Android application) send request over http to retrieve all available book in the
server (Android Basic eBook web application).
Web application send JSON format response to Android application, this JSON response
contains list of books available to download.
User would select item of that list to download the file (.pdf);
Application create http request with given url to process download mechanism.
After download finished, all books that have been downloaded will be displayed and ready
to read by click on of items in list.
C. Features .
Flat design and easy to apply various color scheme.
Easy to customize layout and functionality.
Support by well documented web application as REST service. See www.cibonfire.com and
https://github.com/philsturgeon/codeigniter-restserver
Support .pdf, .ebz, .xps file
Open source pdf reader ( www.mupdf.com ).
Support Android 2.2 up
Support small,medium and large screen devices

The purpose of this app template is to help you rapidly get started in building ebook store .
This App template has been inspired by a particular industry but if you like the way it looks you can change
the elements to suite your own need! Change it however you like!

Please read the instructions below for further detail.

App Structure
In package includes

Application folder contains ebook.zip and AndroidEbookProject.zip


Documentation folder contains this file
ebook.zip is a cibonfire web application, this application is used to manage all books you want to
publish to Android eBook aplication. So if you want to test Android application you also have to
install this web application to your server / localhost you want to host your ebook files.
AndroidEbookProject.zip contains root folder for Eclipse project.
...

Setup and Start


1) Install web application.
a. Extract ebook.zip to www or htdocs directory in your server or (you can use
locahost for testing).
b. Open file bonfire/application/config/database.php and change
$db[default][hostname] = localhost -- change to your
database host
$db[default][username] = root change to your database
user
$db[default][password] = password change to your
database password
Open file bonfire/application/config/rest.php
Line 109 : $config*rest_valid_logins+ = array(admin => 1234) admin is
username and 1234 password for api service if you change this you also have to
change username & password in Android application.
Open .htaccess file and change line 120 to path of ebook folder if you dont install
web application is sub-directory
RewriteBase /ebook/ to RewriteBase /path/to/ebook
c. Create database ebookstore and import ebookstore.sql to your database server,
you can use phpmyadmin or any other database client.
d. Open web browser and fill http://www.yourdomain.com/path/to/ebook and
should look like this

e. Login by click Sign In and use admin@android.com as email and admin1234 as


password.

f.

Click Go to Control Panel to enter administration dashboard

g. Click Content-> Book to manage book you want to publish

h. Click New on top right corner to create new book

i.

Test JSON-API server, open browser and type


www.yourdomain.com/ebook/api/book and use rest valid login that you have set
when install web application. You should JSON format response.

2) Import Android project to Eclipse.


1. Extract AndroidEbookProject.zip to folder eBook
2. In Eclipse click File -> Import.
3. Expand Android, and click Existing Android Code into Workspace, click Next.
4. Browse Root Directory to eBook folder .

5. Click Finish.
6. After importing finished, open res/values/setting.xml and edit some field.

7. Fill HOST to hostname where you install the web application (without http://).
8. Fill BASE_API_URL to base path url relative to hostname where you install web
application, for example if you install in http://www.example.com/ebook so the
BASE_API_URL is /ebook/api/ and HOST is www.example.com .
9. Set API_PASSWORD to what you set as api service password, and also API_USERNAME

10. Run it on real device and make sure your device has internet connection or can access
host address that you use to install web application.
11. Dont forget to Rename Application Package to your own package except package
com.odilogy.mupdf because its contains .java file that load static library and wont
work if the package name doesnt same.

Help
This Android application using basic UI component and apply simple color scheme. Feel free to customize all
UI design to suite your needs. For web application you can customize in JSON API, user management, display
layout.

Reference
Cibonfire
http://www.cibonfire.com/
codeigniter-rest-server
https://github.com/philsturgeon/codeigniter-restserver
mupdf
http://www.mupdf.com
color scheme
http://www.colorcombos.com

Screenshot
Screenshot in Sony Experia J (medium screen)

Screenshot in Samsung Galaxy Tab 7 (large screen)

*The aim of this document is to explain how to write a Documentation for your project. Feel free to include
as more information as possible, it will reduce the number of support questions that you could potentially
receive*

You might also like