Skip to content

How to start Example app

Jakub Dzubak edited this page Oct 12, 2023 · 4 revisions

For Mobile Messaging Plugin we've provided an Example app, which can be easily setup and started with your credentials.

How to run example application

Prepare application configuration in portal

As the first step, you will need to have an Mobile Messaging application profile set up in Infobip Portal for your account. If you already have it, then you can skip this section, otherwise:

Android

  1. Prepare your Firebase Cloud Messaging to get google-services.json file and Server API Key.

  2. Prepare your Infobip account to get your application code:

    1. Create new application on Infobip portal.
    2. Navigate to your Application where you will get the application code.
    3. Mark the "Available on Android" checkbox.
    4. Insert previously obtained FCM Server Key (Server API Key).
    CUP Settings Android

iOS

  1. Prepare your App ID, provisioning profiles and APNs certificate (APNs Certificate Guide).

  2. Prepare your Infobip account to get your application code:

    1. Create new application on Infobip Push portal.
    2. Navigate to your Application where you will get the application code.
    3. Mark the "Available on iOS" checkbox.
    4. Click on "UPLOAD" under "APNS Certificates" and locate the .p12 certificate you exported from your Keychain earlier.
    CUP Settings iOS

Run example application

  1. Clone plugin repository and navigate to the project folder.
  2. Run flutter pub get to install dependencies.
  3. Provide your application code from previous step in /example/lib/main.dart file:
await InfobipMobilemessaging.init(
  Configuration(
    applicationCode: "Your Application Code",

Android

  1. Uncomment apply plugin: 'com.google.gms.google-services' at the end of your example/android/app/build.gradle in order to apply Google Services Gradle Plugin.
  2. Add google-services.json you obtained in previous step to the example/android/app folder as described in Firebase documentation.

iOS

To complete setup for iOS you need to open install Cocoapod dependencies - run cd example/ios & pod update to install them. Then open the project in the XCode and select your development team for signing the app for Example target:

Running In-app chat example

Within the example application we offer chat for testing all available In-app chat features first-hand, and for comparing its source code with yours, in case you are facing any issue in your implementation.

In order to test the In-app chat in example application follow instructions in In-app chat Intro.

Our In-app chat has different list of options, from the basic ways of presenting the In-app chat, to not forgetting the change of language for the UI, multiple threads feature, etc. We invite you to play with it and discover everything Livechat has to offer.

Running In-app chat example with WebRTC calls

Within the example application we offer chat with calls for testing all calls features first-hand, and for comparing its source code with yours, in case you are facing any issue in your implementation.

In order to test the In-app chat with calls in example application follow instructions in WebRTC Calls and UI section.

Our calls UI has different list of options: ability to capture video through both, front and back camera, option to mute and use the speaker, ability to capture and share the screen of your mobile device, option to minimise the call UI in a picture-in-picture mode, and more. We invite you to play with it and discover everything Livechat calls have to offer.