As Jabit uses Gradle, it is also used for this documentation. If you’re used to Maven
it should be simple enough to deduce what you’ll need to put into your pom.xml.
Add Jabit as Gradle dependency:
Unless you want to implement your own, also add the following:
And if you want to import from or export to the Wallet Import Format (used by PyBitmessage) you might also want to add:
For Android clients use jabit-cryptography-spongy instead of jabit-cryptography-bouncy.
Usage
First, you’ll need to create a BitmessageContext:
This creates a simple context using a H2 database that will be created in the user’s home directory. Next you’ll need to
start the context and decide what happens if a message arrives: