This is an Android application that demonstrates how to create, update, and subscribe to a Diffusion topic.
You can build the example from the command line using gradle, but we recommend importing the example into Android Studio as a project. The following has been tested with Android Studio 2024.1.1 Patch 1.
-
Copy the
diffusion-android.jarto theapp/libsdirectory. -
Start Android Studio. Use the
File/New/Import Project...menu option, and select theexamples\android\pubsubdirectory. -
Use the
Build/Make Projectmenu option.
-
Start the Diffusion server.
-
Create and/or start a virtual device, using API level 19 or higher.
-
Use Android Studio (
Run/Run "app") to deploy the example to the Android emulator. -
Updates to the 'counter' topic will be displayed on the virtual device UI.