Coder Social home page Coder Social logo

engage-digital-messaging-android-location's Introduction

Engage Digital Messaging Maps SDK for Android

Engage Digital Messaging Maps SDK for Android is a plug-in for the Engage Digital Messaging Android SDK. It allows your users to send location messages through you Engage Digital Messaging channel using Google APIs.

Supported Versions

The Engage Digital Messaging Maps SDK for Android is currently supporting Android 5.0 (API 21) and above and is only compatible with the Engage Digital Messaging Android SDK version 2.3.0 and above.

Please note that the Engage Digital Messaging Maps SDK for Android will require the usage of AndroidX

Getting Started

Before going through any of the following step please make sure that you have a working implementation of the Engage Digital Messaging Android SDK.

Follow these steps to install/initialize the Engage Digital Messaging Maps SDK for Android:

  1. Installation using gradle
  2. Google API keys
  3. Initialize the Engage Digital Messaging Maps SDK
  4. Customize the Engage Digital Messaging Maps SDK appearance

Install the Engage Digital Messaging Maps SDK for Android using Gradle

Add these to your Grade file:

Repositories

repositories {
    maven {
        url "https://raw.github.com/ringcentral/engage-digital-messaging-android-location/master"
    }
}

Dependencies

dependencies {
    implementation 'com.ringcentral.edmessagingmapssdk:edmessagingmapssdk:1.0.0'
}

API keys

The Engage Digital Messaging Maps SDK for Android takes advantage of the Google APIs to provide maps capabilities to the Engage Digital Messaging Android SDK and thus requires the usage of Google API keys.

Key Restriction(s) Purpose(s)
Android key Maps SDK for Android Used to display the map.
Maps key Places API Used to enable the address search.

Engage Digital Messaging Maps initialization

  1. Add your Android key (see API keys) to your application's manifest (please bear in mind that the Engage Digital Messaging Android SDK won't show the location button if this API key is not present):
<application
  <meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_API_KEY" />
</application>
  1. Initialize the EngageDigitalMessagingMaps singleton instance:
EngageDigitalMessagingMaps engageDigitalMessagingMaps = EngageDigitalMessagingMaps.getInstance();
  1. (OPTIONAL) Set your Maps key (the search button won't be displayed if this API key is not present):
engageDigitalMessagingMaps.setMapsApiKey("YOUR_MAPS_KEY");
  1. Override the onLocationButtonClick on your DimeloListener:
Dimelo dimelo = Dimelo.getInstance();
Dimelo.DimeloListener dimeloListener = new Dimelo.DimeloListener() {
    ...
    @Override
    public void onLocationButtonClick(Chat chat) {
        super.onLocationButtonClick(chat);
        engageDigitalMessagingMaps.build(MainActivity.this);
        engageDigitalMessagingMaps.setMapsListener(new EngageDigitalMessagingMaps.EngageDigitalMessagingMapsListener() {
            @Override
            public void sendLocationMessage(Intent data) {
                super.sendLocationMessage(data);
                Dimelo.getInstance().sendLocationMessage(data, chat);
            }
        });
    }
};

Customizing the Engage Digital Messaging Maps SDK Appearance

See how to customize the Engage Digital Messaging Maps SDK appearance using the Android Resource folders.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.