-
Notifications
You must be signed in to change notification settings - Fork 17
Example application guide 5.x
For 6.x
version - Example Application Guide
As the first step, you will need to have an Application with Push enabled set up in Infobip Portal for your account. If you already have it, then you can skip this section, otherwise:
-
Prepare your Cloud Messaging credentials to get Sender ID and Server API Key.
-
Prepare your Infobip account (https://portal.infobip.com/push/applications) to get your Application Code:
- Create new application on Infobip Push portal.
- Navigate to your Application where you will get the Application Code.
- Mark the "Available on Android" checkbox.
- Insert previously obtained FCM Server Key (Server API Key).
Clone SDK repository and open the project in Android Studio. Go to infobip-mobile-messaging-android-demo
module and add Cloud Sender ID and Application Code from previous step to strings.xml
:
<resources>
<string name="google_app_id">YOUR FCM SENDER</string>
<string name="infobip_application_code">YOUR APPLICATION CODE</string>
...
</resources>
infobip-mobile-messaging-android-demo
is an example Android application for Mobile SDK and it has multiple product flavours configured for different use-cases.
Product flavour | Description |
---|---|
push |
application with simple layout which receives messages sent from the portal or through API |
deeplink |
application which handles deeplinks in messages as described in: How to use "deeplink" to land user to a particular app page? |
web |
application which receives push messages and opens web view on notification tap as described in: How to open application webView on message tap? |
chat |
application with simple chat view layout where you can send messages and receive messages from API |
In order to run one of the flavours, select {flavour}Debug
or {flavour}Release
configuration for infobip-mobile-messaging-android-demo
in Build Variants menu in Android Studio and run it as Android application on any Android device or emulator.
Use chatDebug
or chatRelease
for debug and release configurations accordingly. Once application starts, there is a button that leads you to the chat activity where you'll be able to send and receive messages.
If you have any questions or suggestions, feel free to send an email to [email protected] or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
Geofencing API- DEPRECATED- Android Manifest components
- Privacy settings
- In-app chat
- Infobip RTC calls and UI
- Backup rules