The instructions apply to DL Reader for Android v4.1.x for use with RMSDK 11.0.2, released May 20, 2015.
The following are recommended for building DL Reader for Android:
- For your Mac computer we recommend the Mac OS 10.9.5 or Mac Yosemite (OS 10.10.3) as the minimum version of your operating system.
- Java Standard Edition Development Kit (JDK) 1.6.0
- Apache Ant 1.9.4
- Via Android SDK Manager), install at least:
- Android 4.0, API level 14 SDK
- Android 5.1, API level 22 SDK
- Android SDK Build tools (latest version)
- Android NDK r9d and GCC 4.8 for the DL Reader JNI.
- OpenSSL version 1.0.1j. The same web page also provides source code distribution for earlier versions of the software.
- cURL version 7.36.0. You can download the curl-7.36.0.tar.gz file directly, or visit the download page to access earlier versions of the software. Click the Old Releases option in the Related box on the right side of the screen.
DL Reader files
DLReader for Android builds against an RMSDK binary. Beginning with RMSDK 11, DL Reader does not build RMSDK from source.
Unzip your source distribution file for DL Reader into the
samples sub-directory of your RMSDK 11 installation folder, so that your DL Reader project will be stored there.
$ cd ~/Adobe_RMSDK_11/samples $ unzip ~/Downloads/DLReader-Android-4.1.3.zip
Your DL Reader installation is now found at:
Look for the
rmsdk-exports sub-directory in your DL Reader installation folder. This directory contains two files that must be copied into the RMSDK folder structure.
- DLBuildAndroidExternals.mak. Copy this file to the root directory for the RMSDK installation package.
- Makefile. Copy this also to the RMSDK root directory.
$ cd ~/Adobe_RMSDK_11 $ cp samples/DLReader-Android-4.1.3/rmsdk-exports/Makefile
RMSDK resources directory
The RMSDK resources directory is where the fonts, hyphen dictionaries, and certificates are stored.
For each build target, the RMSDK resources directory can be found at the following path, substituting the target name for the string
So the directory might look like this:
Configure environment variables
ANDROID_NDK. Path to where you unzipped the Android NDK files.
ANDROID_SDK. Path to your Android SDKs.
For your convenience,
dlreader-seten.sh is provided in the root of your DL Reader distribution.
Open the file in an editor:
Remove the comments for two lines, for Android NDK and Android SDK:
Set their values appropriately. Modify your
PATH with the following command:
$ . dlreader-setenv.sh
Make sure that you run this shell script with the initial period ("$ . ") followed by a space.
Build external libraries
Build OpenSSL and cURL from source files before you build DL Reader. The recommended files are listed at the beginning of this page.
Datalogics provides a makefile (
DLBuildAndroidExternals.mak) for building these libraries. Make sure that you have copied it to the right RMSDK directory.
- Unpack OpenSSL into your RMSDK root directory. Rename the directory to
- Unpack Curl into your RMSDK root directory. Rename the directory to
- From your RMSDK root, run:
make -f DLBuildAndroidExternals.mak
After the build is complete, the static libraries will be placed in these directories:
Build dp module
dp library is an RMSDK module that is shared in source code format to support reader-specific implementations of RMSDK device interfaces. This library must be built from source code.
Datalogics has created a makefile for quickly building the dp library on iOS and Android platforms. Make sure that you have copied the makefile to the right RMSDK directory.
Run this command from the root directory of RMSDK:
The command can have one of these three forms. This one builds the dp library in debug mode:
This builds the dp library in release mode:
This builds both of the above targets:
The static library and/or libraries will be copied to the appropriate folders per configuration in:
Configure your development certificate
Starting with RMSDK 11, all applications built using RMSDK require a certificate file from Adobe Systems to allow you to distribute your code. Without a valid certificate, RMSDK APIs will not work properly.
There are two types of certificates, development and distribution. The development certificate is for building a new application, and can be used on multiple projects and platforms, but it expires after 60 days. When your development certificate expires, you need to submit a new form to replace it. You will need a distribution certificate when you plan to release an eReader app to market. Distribution certificates do not expire, and are good for each build of an application. But you must request a new distribution certificate whenever you change the source code for your app, or release a new build for the product.
To learn more about distribution certificates, see the files included in RMSDK11_Signing_Certificate_Info_v2.zip, provided with the RMSDK deliverables. You can download this zip file from an FTP site provided by Datalogics after you purchase the product.
Request both types of certificates from Datalogics. See the Adobe Systems Development Certificate. Look at ReadMe1st_DL.txt in RMSDK_CERTIFICATION_v3.zip for details on how to place your request.
After you receive the Adobe development certificate from Datalogics you need to configure DL Reader to find it. The certificate comes in the form of a file called
- Store the
ReaderClientCert.sigfile wherever you like.
- Look in your DL Reader directory. Find and open
rmsdk_cert.cfgfrom the build/android folder.
- Change the
cert-pathvalue to point to where you copied the
ReaderClientCert.sigfile. It will default to DropBox. The cert-path parameter references the folder where the
ReaderClientCert.sigfile is stored.
For example, edit the rmsdk_cert.cfg file to look like this:
Build DL Reader from the command line
In your DL Reader Android root directory, complete these steps:
- Run the command
- Go to the directory
- Run the command
These steps will create two files, the Android Application Package:
And the DL Reader Shared Object file:
Build DL Reader in Android Studio
Android Studio does not build the native library libdlreader-jni.so. That means that you must build DL Reader from the command line at least once before developing in Android Studio (see previous section).
- Open Android Studio.
- Open the DL Reader project:
- File / Open
- Navigate to the root directory of android-viewer and open it.
- Android Studio may ask you to download and install some Gradle plugins at this point to ensure that you are up to date.
- Run DL Reader.
- Connect an Android device with debugging enabled, or launch an Android Virtual Device.
- Under Run, select Run 'DLReader'.
DL Reader for Android offers the ability to use the Merriam Webster dictionary web service to look up the definition of a word on a page in an ebook file. This feature is turned off by default in DL Reader source code that Datalogics distributes to its customers.
To enable the dictionary feature in DL Reader, you need to register the Merriam Webster web page, to create an account, and select the type of dictionary you want to use.
This service is optional, though recommended. Note that you must pay for this dictionary service from Merriam Webster.
- Collegiate Dictionary
- Collegiate Thesaurus
- Spanish-English Dictionary
- Medical Dictionary
- Elementary Dictionary
- Intermediate Dictionary
- School Dictionary
- Learners Dictionary
You may only select one dictionary.
After you have signed up, you will be given a URL to the web service for the dictionary you selected, and a key to access the dictionary.
You need to edit an XML file found in the DL Reader directory that you copied to RMSDK/Samples to add the URL and key:
Replace the text shown, online_dictionary_url and online_dictionary_key:
After you enter these values in
customer-dictionary-config.xml, copy the file to this directory:
This way, when you build your RMSDK application this file will be copied into that application. If you don't edit this XML config file to add the URL and key, the “define” option will not be displayed when a user selects text while reading an ebook in DL Reader. After you copy the file and rebuild your application, the next time you select text in DL Reader for Android the “define” option should appear. When you tap a word, it will query the dictionary web service and display a definition.
If you do not use DL Reader source code as the base of your application, you can still use the dictionary service, but you also need to make sure that the
DictionaryLibrary.jar file is included in your application. This file is stored in the DL Reader directory you copied under RMSDK/Samples, in