AnFengDe EPUB UI Component 20121026 is released

In this release we‘ve made a lot of modifications. We’ve realized our UI component based on HTML5 + CSS and used the same js code in android and iOS. Of course the users can always modify our js to get their desired effects, for example, a custom menu. And we’ve added the bookmark feature so that reading can be easier. At the same time we’ve included the the earlier EPub SDK example project to demonstrate the use of it.We’ve made some changes in version structure.

Our Recent Work – Test environment refactoring and UI compatibility issues

It’s been some time now since the last release. During this period, one of the most meaningful thing we did was the refactoring of test environment for EPUB books. Before, we had written unit tests for each API. Along with the more and more types that were supported, and the increase in books that were tested, the maintenance of test code was causing trouble for us. So we stopped to improve testing tools. Now, just put the book to be tested on the internal test site, then the test program automatically runs the testcases. We run these tests each time we commit the code internally. We are very grateful to those members of the epub samples team, whose website is: http://code.google.com/p/epub-samples/.

Another thing, however, turned out to be very frustrating: for UI, supporting the basic flip operation is a matter of course. Since considerable difference exists between different Android versions – simply too many inconsistencies –  providing compatible code becomes very complex. If we consider only the iOS platform, the flipping effect can be made flamboyant. No programmer wants to maintain a very complex codes, which will bring us a lot of pressure in maintenance. Maybe we should introduce a modest version and leave a better UI to the next version, or maybe we give up support for some low Android versions.

Recently, we received quite a lot emails which gave us some valuable suggestions, thank you very much. We will attach great importance to your proposals, I believe that our team will do better, our goal is that our users do the most with the least code.

Getting Started with EPUB SDK

See in google document: Get Started With EPUB SDK

Getting Started with EPUB SDK

Introduction

EPUB SDK is a development kit written in pure ANSI C, realizing EPUB 3.0 parsing and achieving excellent performance on mobile devices.
This development kit provides native development interfaces for both Android and iOS. It contains a framework for the iOS platform, a jar file and a shared library for the Android platform.
All you need to do is simple copying and importing, then you can directly reference in your own project.

Installation
The EPUB SDK is distributed as a .zip archive. The file name has the following naming convention: AnFengde-EPUB_SDK-<version>.zip, where

  • <version> is the versiom number, e.g. 20120704
  • for example: AnFengde-EPUB_SDK-20120704.zip

The distribution
After you have downloaded and extracted the archive to the desired location, you will find the following contents:

  • android    directory containing the EPUB SDK resources for the Android platform
    • EPUB_SDK_Example    directory containing the EPub SDK example for android
    • UI_Example    directory containing the UI component project for android
    • lib    directory containing the EPUB_UI library project
  • ios        directory containing the EPUB_SDK resources for the iOS platform
    • EPUB_SDK_Example    directory containing the EPub SDK example for iOS
    • UI_Example    directory containing the UI component project for iOS
    • lib     directory containing the framework AnFengDe_EPUB_SDK.framework and AnFengDe_EPUB_UI.embeddedframework
  • README.md
  • GettingStartedwithEPUBSDK.pdf
  • GettingStartedWithEPUBUIComponent.pdf

Setting Up Development Environment
For the Android platform, this guide assumes that you are using Eclipse as your Android IDE, and that you have installed and configured the Android SDK and ADT plug-in for Eclipse.
For iOS platform, this guide assumes that you are using Xcode as your IDE.
If you are using other IDEs, please consult the documentation of your IDE.

Using EPUB SDK in Your Application Project
Android Platform
In order to use our EPUB SDK in your application project, your project will need to reference both the jar file (anfengde-epub.jar ) and the shared library (libepubjni.so). You can copy the files under android/lib/EPUB_UI/libs (containing anfengde-epub.jar and armeabi/libepubjni.so) to your own project. Please put these files under project/libs folder. If no libs folder exists in your own project, you can create one manually.
Referencing the EPUB SDK implementation jar library
To add a reference to the jar library, follow these steps:

  • Method One
    • In Package Explorer, right-click on libs/anfengde-epub.jar and select Build Path->Add to Build Path.
  • Method Two
    • In Package Explorer, right-click on your project and select Properties.
    • In the Properties window, select Java Build Path, and then click on Libraries tab, then click on the Add External Jar button, and browse your jar file and click OK (Java Build Path->Libraries->Add External Jar->pick the jar file->OK).

Figure 1 – android EPUB SDK add jar-method one

Figure 2 – android EPUB SDK add jar-method two

After the above operations, you have succeeded in adding EPUB SDK to your own project, and your can use it for development.

iOS Platform
In order to use our EPUB SDK in your application project, your project will need to reference the framework of AnfengdeEpub.framework. All you need to do is to copy the framework ro your own iOS project and add it to the project.
Referencing the EPUB SDK framework
To add a reference to the framework, follow these steps:

  • In Project navigator, right-click Framework, then select Add File to “<projec name>”, and browse the framework and Add it. Then you will see as follow:

Figure 3 – Framework

Using The Sample Project
The EPUB SDK distribution package includes the sample projects to show you how you can use some of the main features of the EPUB SDK in your application.
Android platform
To open and build the sample project, follow these steps:

  • File->New->project->Android->Android Project->Next.
  • Select Creating project from existing source, and browse the sample project. And modify Project Name = Example, then click Next. Check Build Target = Android 2.2, and Next. Modify Application Name =  Example, then Finish.

Figure 4 – import the sample project

Figure 5 – load the sample project

Figure 6 – import the sample project-2

After you have setup the sample project correctly, you can then build and run the application to see the sample work.

Figure 7 – running the sample project (left is Android, right is iOS)

iOS
For the iOS sample project, you can double-click example.xcodeproj. Then you can build and run the application to see the sample work.

AnFengDe EPUB SDK iOS development enviroment setting

Please copy our framework named AnfengdeEpub.framework (under lib folder) to your project’s folder, and add it to your project.

iOS Xcode epub sdk setting

iOS Xcode epub sdk setting

Then you can call the methods in our framework.

Example

We supplied an example for your reference under example folder. The project can run on both the device and the simulator.

More

For more information, please contact us.

AnFengDe EPUB SDK Android development enviroment setting

Please copy our library files under lib folder to your android project’s libs folder. If no libs folder exists in your project, you can create one manually.

android epub sdk dev path for copy

android epub sdk dev path for copy

And now you have succeeded adding epub sdk library.

android epub sdk build setting

Example

We supplied an example for your reference under example folder. The project can run on both the device and the simulator.

More

For more information, please contact us.

AnFengDe EPUB SDK 20120704 is released.

This is a development kit written in pure ANSI C, realizing EPUB 3.0 parsing and achieving excellent performance on mobile devices.
This development kit provides native development interfaces for both Android and iOS. All you need to do is simple importing and copying, then you can reference directly in the your own project. Nothing more to do, and it’s FREE!

Well, this is only our first step. We will soon, maybe next month, launch a UI component-based development kit. We expect that programmers in electronic publishing will be able to make high-quality e-books by dragging here and there.

Need help? Do not hesitate to contact: support@anfengde.com