This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// A) First we will check the group is created or not. if group is created with booking id then we will launch the chat using AlGroupInformationAsyncTask from STEP 1 | |
/// B) If the group is not exist we will create the group in onFailure of AlGroupInformationAsyncTask | |
/// C) In OnSuccess of group create callback of ALChannelCreateAsyncTask we will launch the group chat using STEP2 | |
/// | |
/// | |
Step 1: Checking if group is created or not if created onSuccess will launch extsting group else we create a group in onFailure callback | |
AlGroupInformationAsyncTask.GroupMemberListener taskListener = new AlGroupInformationAsyncTask.GroupMemberListener() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity | |
android:name="com.applozic.mobicomkit.uiwidgets.people.activity.MobiComKitPeopleActivity" | |
android:configChanges="keyboardHidden|screenSize|smallestScreenSize|screenLayout|orientation" | |
android:label="@string/app_name" | |
android:parentActivityName="com.applozic.mobicomkit.uiwidgets.conversation.activity.ConversationActivity" | |
android:theme="@style/ApplozicTheme" | |
android:windowSoftInputMode="adjustResize" | |
tools:node="replace"> | |
<meta-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Applozic | |
let registerUserClientService = ALRegisterUserClientService() | |
registerUserClientService.logout { (response, error) in | |
// Logout success error checking is not required | |
if(error != nil){ | |
// NOTE: Logout failed if your using APNS then register the push notifcations again here . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Applozic | |
import Kommunicate | |
1) Use age for getting the unread count . | |
if KMUserDefaultHandler.isLoggedIn() { | |
// Check your user deafults as this method is called once if its called once then you can directly get the count from the method in else part | |
// Sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--> Add this below code in your app androidmanifest file and change the `parentActivityName` it will be complete package name of the class | |
<activity | |
android:name="com.applozic.mobicomkit.uiwidgets.conversation.activity.ConversationActivity" | |
android:configChanges="keyboardHidden|screenSize|locale|smallestScreenSize|screenLayout|orientation" | |
android:label="@string/app_name" | |
android:launchMode="singleTask" | |
android:parentActivityName="<parentActivityName>" | |
android:theme="@style/ApplozicTheme" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void startChatWithUserId(String userId, Context context) { | |
UserClientService userClientService = new UserClientService(context); | |
ContactDatabase contactDatabase = new ContactDatabase(context); | |
Contact contact = contactDatabase.getContactById(userId); | |
if (contact != null) { | |
Intent intent = new Intent(this, ConversationActivity.class); | |
intent.putExtra(ConversationUIService.USER_ID, userId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AppContactService appContactService = new AppContactService(this); | |
Contact contact = appContactService.getContactById("reciverUserIdhere"); | |
if(contact.getLastSeenAt() != 0 ){ | |
//Check from db if the last seen is there then user is there else will check from server | |
// User is registerd | |
}else{ | |
// API call make it in async task |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) For starting the contact activity use the below code | |
Intent intent = new Intent(this, MobiComKitPeopleActivity.class); | |
startActivityForResult(intent, ConversationUIService.REQUEST_CODE_CONTACT_GROUP_SELECTION); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Change the method for checking applozic notification or in place of AL_VALUE use this | |
let service = ALPushNotificationService() | |
if(service.isApplozicNotification(notification.request.content.userInfo)){ | |
//applzoic notification | |
}else{ | |
// YOur notiifcation | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Do the changes in messaging.ios.js file | |
1)For registring APNS token to applozic server | |
Open the file messaging.ios.js and go to this line method name will be applicationDidRegisterForRemoteNotificationsWithDeviceToken | |
line number in ts file looks like this make sure you edit the change in .js file not in ts file | |
https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/master/src/messaging/messaging.ios.ts#L159 |