All Projects → AppLozic → Applozic Android Sdk

AppLozic / Applozic Android Sdk

Licence: bsd-3-clause
Android Real Time Chat & Messaging SDK

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Applozic Android Sdk

Qiscus Sdk Android
Qiscus provide everything you need to power up your app with chats. And it's now made simple.
Stars: ✭ 175 (-71.36%)
Mutual labels:  chat, messenger, firebase-cloud-messaging, fcm, realtime-messaging, realtime
Applozic Ios Sdk
iOS Real Time Chat & Messaging SDK
Stars: ✭ 104 (-82.98%)
Mutual labels:  chat, notifications, messenger, communication, realtime-messaging, real-time
Kotlin Firebase Group Chat
Group and OneonOne chat using firebase built in Kotlin similar to whatsapp.
Stars: ✭ 44 (-92.8%)
Mutual labels:  chat, firebase-cloud-messaging, fcm, realtime-messaging, realtime
Channelize-iOS-Chat-SDK-Sample
Open-source JavaScript SDK to enable Real-time Messaging
Stars: ✭ 30 (-95.09%)
Mutual labels:  real-time, communication, messenger, realtime-messaging
andpush
Android Push Notification in Ruby: The fastest client for FCM (Firebase Cloud Messaging)
Stars: ✭ 83 (-86.42%)
Mutual labels:  notifications, gcm, fcm, firebase-cloud-messaging
Chaskiq
A full featured Live Chat, Support & Marketing platform, alternative to Intercom, Drift, Crisp, etc ...
Stars: ✭ 1,263 (+106.71%)
Mutual labels:  chat, messenger, messenger-platform
Chat Ui Kit React
Build your own chat UI with React components in few minutes. Chat UI Kit from chatscope is an open source UI toolkit for developing web chat applications.
Stars: ✭ 131 (-78.56%)
Mutual labels:  chat, messenger, communication
Onesignal Gradle Plugin
Use with OneSignal-Android-SDK to help integrate it into your Android Studio or Gradle project. https://onesignal.com
Stars: ✭ 49 (-91.98%)
Mutual labels:  gcm, notifications, fcm
accelerator-textchat-ios
OpenTok Text Chat Accelerator Pack enables text messages between mobile or browser-based devices.
Stars: ✭ 13 (-97.87%)
Mutual labels:  communication, realtime, realtime-messaging
Chatify
A Laravel package that allows you to add a complete user messaging system into your new/existing Laravel application.
Stars: ✭ 885 (+44.84%)
Mutual labels:  chat, realtime-messaging, real-time
Node Gcm
A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
Stars: ✭ 1,286 (+110.47%)
Mutual labels:  gcm, notifications, firebase-cloud-messaging
FCMBundle
A Bundle for Symfony projects to send notifications in mobile devices through Firebase Cloud Messaging API
Stars: ✭ 43 (-92.96%)
Mutual labels:  notifications, fcm, firebase-cloud-messaging
PUSHTestFCM
[FireMonkey] Push test project
Stars: ✭ 17 (-97.22%)
Mutual labels:  notifications, gcm, fcm
accelerator-core-ios
Syntax sugar of OpenTok iOS SDK with Audio/Video communication including screen sharing
Stars: ✭ 30 (-95.09%)
Mutual labels:  real-time, communication, realtime
Mangosta Ios
MongooseIM client for iOS
Stars: ✭ 28 (-95.42%)
Mutual labels:  chat, realtime-messaging, real-time
Wire Ios
📱 Wire for iOS (iPhone and iPad)
Stars: ✭ 3,079 (+403.93%)
Mutual labels:  messenger, communication, messenger-platform
Rpush
The push notification service for Ruby.
Stars: ✭ 1,886 (+208.67%)
Mutual labels:  notifications, firebase-cloud-messaging, fcm
Electron Push Receiver
A module to bring Web Push support to Electron allowing it to receive notifications from Firebase Cloud Messaging (FCM).
Stars: ✭ 158 (-74.14%)
Mutual labels:  notifications, firebase-cloud-messaging, fcm
laravel-firebase
Laravel FCM (Firebase Cloud Messaging) Notification Channel
Stars: ✭ 25 (-95.91%)
Mutual labels:  notifications, fcm, firebase-cloud-messaging
MongoosePush
MongoosePush is a simple Elixir RESTful service allowing to send push notification via FCM and/or APNS.
Stars: ✭ 101 (-83.47%)
Mutual labels:  notifications, gcm, fcm

Android Chat SDK

Overview

Applozic brings real-time engagement with chat, video, and voice to your web, mobile, and conversational apps. We power emerging startups and established companies with the most scalable and powerful chat APIs, enabling application product teams to drive better user engagement, and reduce time-to-market.

Customers and developers from over 50+ countries use us and love us, from online marketplaces and eCommerce to on-demand services, to Education Tech, Health Tech, Gaming, Live-Streaming, and more.

Our feature-rich product includes robust client-side SDKs for iOS, Android, React Native, and Flutter. We also support popular server-side languages, a beautifully customizable UI kit, and flexible platform APIs.

Chat, video, and audio-calling have become the new norm in the post-COVID era, and we're bridging the gap between businesses and customers by delivering those exact solutions.

Getting Started

To integrate android chat library into your android app, signup at Applozic to get the App ID.

Documentation: Applozic Android Chat & Messaging SDK Documentation

Step 1: Add the following in your build.gradle dependency:

implementation 'com.applozic.communication.uiwidget:mobicomkitui:5.97.1'

Add the following in gradle android target:

android {

        packagingOptions {           
           exclude 'META-INF/DEPENDENCIES'      
           exclude 'META-INF/NOTICE'         
           exclude 'META-INF/LICENSE'      
           exclude 'META-INF/LICENSE.txt'    
           exclude 'META-INF/NOTICE.txt' 
           exclude 'META-INF/ECLIPSE_.SF'
           exclude 'META-INF/ECLIPSE_.RSA'
         }    
    }               

Step 2: Addition of Permissions,Activities, Services and Receivers in androidmanifest.xml:

Note: Add meta-data, Activities, Services and Receivers within application Tag <application> </application>

Note: Add Permissions outside the application Tag <application>


<meta-data android:name="com.applozic.application.key"
           android:value="<YOUR_APPLOZIC_APP_ID" /> <!-- Applozic App ID -->

<meta-data android:name="com.applozic.mobicomkit.notification.smallIcon"
           android:resource="YOUR_LAUNCHER_SMALL_ICON" /> <!-- Launcher white Icon -->
           
<meta-data android:name="com.google.android.geo.API_KEY"
           android:value="YOUR_GEO_API_KEY" />  <!--Replace with your geo api key from google developer console  --> 
<!-- For testing purpose use AIzaSyAYB1vPc4cpn_FJv68eS_ZGe1UasBNwxLI
To disable the location sharing via map add this line ApplozicSetting.getInstance(context).disableLocationSharingViaMap(); in onSuccess of Applozic UserLoginTask -->   
            
<meta-data android:name="com.package.name" 
           android:value="${applicationId}" /> <!-- NOTE: Do NOT change this, it should remain same i.e 'com.package.name' -->
                     

Note: If you are not using gradle build you need to replace ${applicationId} with your Android app package name

Define Attachment Folder Name in your string.xml.

<string name="default_media_location_folder">YOUR_APP_NAME</string> 

Paste the following in your androidmanifest.xml:

<activity android:name="com.applozic.mobicomkit.uiwidgets.conversation.activity.ConversationActivity"
           android:configChanges="keyboardHidden|screenSize|smallestScreenSize|screenLayout|orientation"
           android:label="@string/app_name"
           android:parentActivityName="<APP_PARENT_ACTIVITY>"
           android:theme="@style/ApplozicTheme"
           android:launchMode="singleTask"
           tools:node="replace">
      <!-- Parent activity meta-data to support API level 7+ -->
<meta-data
           android:name="android.support.PARENT_ACTIVITY"
           android:value="<APP_PARENT_ACTIVITY>" />
 </activity>               

Replace APP_PARENT_ACTIVITY with your app's parent activity.

Step 3: Register user account:

User user = new User();          
user.setUserId(userId); //userId it can be any unique user identifier
user.setDisplayName(displayName); //displayName is the name of the user which will be shown in chat messages
user.setEmail(email); //optional  
user.setAuthenticationTypeId(User.AuthenticationType.APPLOZIC.getValue());  //User.AuthenticationType.APPLOZIC.getValue() for password verification from Applozic server and User.AuthenticationType.CLIENT.getValue() for access Token verification from your server set access token as password
user.setPassword(""); //optional, leave it blank for testing purpose, read this if you want to add additional security by verifying password from your server https://www.applozic.com/docs/configuration.html#access-token-url
user.setImageLink("");//optional,pass your image link

 Applozic.connectUser(context, user, new AlLoginHandler() {
                @Override
                public void onSuccess(RegistrationResponse registrationResponse, Context context) {
                    // After successful registration with Applozic server the callback will come here 
                }

                @Override
                public void onFailure(RegistrationResponse registrationResponse, Exception exception) {
                    // If any failure in registration the callback  will come here 
             }
   });                                      

If it is a new user, new user account will get created else existing user will be logged in to the application. You can check if user is logged in to applozic or not by using Applozic.isConnected(context)

Step 4: Push Notification Setup

Go to Applozic Dashboard, Edit Application -> Push Notification -> Android -> GCM/FCM Server Key.

Firebase Cloud Messaging (FCM) is already enabled in my app

Add the below code and pass the FCM registration token:

1. In UserLoginTask "onSuccess" (refer Step 3)

if(MobiComUserPreference.getInstance(context).isRegistered()) {
  Applozic.registerForPushNotification(context, registrationToken, new AlPushNotificationHandler() {
                @Override
                public void onSuccess(RegistrationResponse registrationResponse) {
                   
                }

                @Override
                public void onFailure(RegistrationResponse registrationResponse, Exception exception) {

                }
    });
}

2. In your FcmListenerService onNewToken(Token registrationToken) method

if (MobiComUserPreference.getInstance(this).isRegistered()) {
     new RegisterUserClientService(this).updatePushNotificationId(registrationToken);
}
For Receiving Notifications in FCM

Add the following in your FcmListenerService in onMessageReceived(RemoteMessage remoteMessage)

 if (MobiComPushReceiver.isMobiComPushNotification(remoteMessage.getData())) {
           MobiComPushReceiver.processMessageAsync(this, remoteMessage.getData());
           return;
   }

GCM is already enabled in my app

If you already have GCM enabled in your app, add the below code and pass the GCM registration token:

1. In UserLoginTask "onSuccess" (refer Step 3)

if(MobiComUserPreference.getInstance(context).isRegistered()) {
  Applozic.registerForPushNotification(context, registrationToken, new AlPushNotificationHandler() {
                @Override
                public void onSuccess(RegistrationResponse registrationResponse) {
                   
                }

                @Override
                public void onFailure(RegistrationResponse registrationResponse, Exception exception) {

                }
     });
}

2. At the place where you are getting the GCM registration token in your app.

if (MobiComUserPreference.getInstance(this).isRegistered()) {
     new RegisterUserClientService(this).updatePushNotificationId(registrationToken);
}
For Receiving Notifications In GCM

Add the following in your GcmListenerService in onMessageReceived

if(MobiComPushReceiver.isMobiComPushNotification(data)) {            
        MobiComPushReceiver.processMessageAsync(this, data);               
        return;          
}                                          

Don't have Android Push Notification code ?

To Enable Android Push Notification using Firebase Cloud Messaging (FCM) visit the Firebase console and create new project, add the google service json to your app, configure the build.gradle files in your app ,finally get server key from project settings and update in
Applozic Dashboard under Push Notification -> Android -> GCM/FCM Server Key.

In case, if you don't have the existing FCM related code, then copy the push notification related files from Applozic sample app to your project from the below github link

Github push notification code link

And add below code in your androidmanifest.xml file

<service android:name="<CLASS_PACKAGE>.FcmListenerService"
android:stopWithTask="false">
        <intent-filter>
            <action android:name="com.google.firebase.MESSAGING_EVENT" />
        </intent-filter>
</service>

Setup PushNotificationTask in UserLoginTask "onSuccess" (refer Step 3).

Applozic.registerForPushNotification(context, Applozic.getInstance(context).getDeviceRegistrationId(), new   AlPushNotificationHandler() {
                @Override
                public void onSuccess(RegistrationResponse registrationResponse) {
                   
                }

                @Override
                public void onFailure(RegistrationResponse registrationResponse, Exception exception) {

                }
    });

Step 5: For starting the messaging activity:

Intent intent = new Intent(this, ConversationActivity.class);            
startActivity(intent);                               

For starting individual conversation thread, set "userId" in intent:

Intent intent = new Intent(this, ConversationActivity.class);            
intent.putExtra(ConversationUIService.USER_ID, "receiveruserid123");             
intent.putExtra(ConversationUIService.DISPLAY_NAME, "Receiver display name"); //put it for displaying the title.  
intent.putExtra(ConversationUIService.TAKE_ORDER,true); //Skip chat list for showing on back press 
startActivity(intent);

Step 6: On logout, call the following:

Applozic.logoutUser(context, new AlLogoutHandler() {
                @Override
                public void onSuccess(Context context) {
                    
                }

                @Override
                public void onFailure(Exception exception) {

                }
        });     

Trying out the demo app:

Open project in Android Studio to run the sample app in your device. Send messages between multiple devices.

Display name for users: You can either choose to handle display name from your app or have Applozic handle it. From your app's first activity, set the following to disable display name feature: ApplozicClient.getInstance(this).setHandleDisplayName(false); By default, the display name feature is enabled.

Documentation:

For advanced options and customization, visit Applozic Android Chat & Messaging SDK Documentation

Changelog

Changelog

Features:

One to one and Group Chat

Image capture

Photo sharing

File attachment

Location sharing

Push notifications

In-App notifications

Online presence

Last seen at

Unread message count

Typing indicator

Message sent, Read Recipients and Delivery report

Offline messaging

User block / unblock

Multi Device sync

Application to user messaging

Customized chat bubble

UI Customization Toolkit

Cross Platform Support (iOS, Android & Web)

Sample source code to build messenger and chat app

https://github.com/AppLozic/Applozic-Android-SDK/tree/master/app

Help

We provide support over at [StackOverflow] (http://stackoverflow.com/questions/tagged/applozic) when you tag using applozic, ask us anything.

Applozic is the best android chat sdk for instant messaging, still not convinced? Write to us at [email protected] and we will be happy to schedule a demo for you.

Free Android Chat SDK

Special plans for startup and open source contributors, write to us at [email protected]

Github projects

Android Chat SDK https://github.com/AppLozic/Applozic-Android-SDK

Web Chat Plugin https://github.com/AppLozic/Applozic-Web-Plugin

iOS Chat SDK https://github.com/AppLozic/Applozic-iOS-SDK

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].