Setup OpenPGP Library for Android

Here we are going to discuss the setup process of DidiSoft OpenPGP Library for Android. We assume that you have already downloaded and unpacked either the trial version of the library or the production version (obtained after purchase).

Table of contents

Library JAR files
Setup in Android Studio
Setup in Eclipse

Library JAR files

The library consists of four main JAR files, located under the /Library folder where you have unpacked the distribution ZIP archive.

pgplib-android-1.3.jar
core-1.51.0.0.jar
prov-1.51.0.0.jar
pg-1.51.0.0.jar

For LDAP connection methods you have to include:

/Library/ldap/unboundid-ldapsdk-me.jar

For PGP/MIME functionality you  have to include:

/Library/Mail/pgplib-mail-android-1.3.jar
/Library/Mail/activation.jar
/Library/Mail/additionnal.jar
/Library/Mail/mail.jar

Setup in Android Studio

  1. In your Android Studio Project switch to Project view
  2. Copy the library JAR files and paste them in the app/libs folder


Setup in Eclipse

In order to use the library in your Android project, you have to include the library JAR files in the project build path.

Follow the steps below:

1. Right click your project in the Eclipse Package Explorer view.
2. Choose the ‘Properties‘ menu item
3. Choose the ‘Java Build Path‘ in the left navigation list of the Properties dialog
4. Choose the ‘Libraries‘ tab
5. Click the ‘Add External JARs…’ button and select the JARs from the /Library folder where you have unpacked the distribution ZIP archive

After including the library JAR files, you can start using the OpenPGP functionality that it provides.