Android - Creating your Module
In Android, modules (also referred to as libraries) allow you to extend and customize the functionality of the Q2 Mobile Application with custom native code. Whether you are building UI components, handling lifecycle events, defining API methods, or integrating push notifications, modules provide a structured way to add and manage native features. To enable
Types of Modules
There are several types of modules, each serving a specific purpose:
- UIModule – UI focused module that can be used to display your own activity and fragments.
- MethodModule – Background threading function perfect for api requests, memory intensive needs, or anything else you can need which does not require UI control.
- LifecycleModule – Tap into the lifecycle of the Q2 Mobile Application itself, giving access to key android lifecycle events and user events.
- PushReceiverModule – Be noticied when new notifications are sent to the device, control their response and data, or push local notifications as needed with this module type.
Configuring Modules
To integrate modules into your project, you’ll need to define them in the settings.json
file. Learn how to correctly set up module entries:
Using Third-Party Libraries
If your module relies on external dependencies, you may need to configure your project to support them. Find out how to integrate third-party libraries:
Get Started
Explore the different module types to determine which one fits your needs, and follow the setup guides to integrate them into your project.
Looking to create a module? Start with Configuring settings.json.