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
ALChannelService * channelService = [[ALChannelService alloc] init | |
]; | |
ALContactDBService * contactDBService = [[ALContactDBService alloc] init]; | |
[applozicClient getLatestMessages:NO withCompletionHandler:^(NSMutableArray *messageList, NSError *error) { | |
if(!error){ | |
for (ALMessage *message in messageList) { | |
/// Message text | |
NSLog(@"Recent message text %@", message.message); |
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. Find the method launchChatWith(contactId in ALChatmanager.swift file and replace it with below code for adding custom back button | |
func launchChatWith(contactId: String, from viewController: UIViewController, configuration: ALKConfiguration, prefilledMessage: String? = nil) { | |
let alContactDbService = ALContactDBService() | |
var title = "" | |
if let alContact = alContactDbService.loadContact(byKey: "userId", value: contactId), let name = alContact.getDisplayName() { | |
title = name |
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
/* | |
In NativeScript, the app.js file is the entry point to your application. | |
You can use this file to perform app-level initialization, but the primary | |
purpose of the file is to pass control to the app’s first module. | |
*/ | |
/* | |
Do not place any code after the application has been started as it will not | |
be executed on iOS. |
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
/* | |
In NativeScript, the app.ts file is the entry point to your application. | |
You can use this file to perform app-level initialization, but the primary | |
purpose of the file is to pass control to the app’s first module. | |
*/ | |
import { Application, Utils } from '@nativescript/core'; | |
/// START APPLOZIC NativeScript |
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
/* | |
In NativeScript, the app.js file is the entry point to your application. | |
You can use this file to perform app-level initialization, but the primary | |
purpose of the file is to pass control to the app’s first module. | |
*/ | |
/// START APPLOZIC NativeScript | |
const { Application} = require("@nativescript/core"); | |
const { Utils} = require("@nativescript/core"); |
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
NOTE: Call this below API in ASYNC task or any other as this is server call. | |
CODE : | |
UserClientService userClientService = new UserClientService(MainActivity.this); | |
Set<String> userIds = new HashSet<>(); | |
userIds.add("<RECIVER-USER-ID>"); // PASS the userID : | |
String response = userClientService.getUserDetails(userIds); | |
Log.i("USER", "The Response is :" + response); | |
if (TextUtils.isEmpty(response) || !TextUtils.isEmpty(response) && response.equals("error")) { |
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. Select Applozic.xcodeproj and Click TARGET Applozic and go to Build settings search Build libraries for Distribution and make it to YES | |
2. In same TARGET Applozic go to Build settings search Skip install and make it to NO | |
3. Go to cd /Applozic-iOS-SDK/sample-with-framework in terminal and execute the below command from A to C one by one by copy pasting it in terminal one by one wait for one command to complete | |
A) xcodebuild archive -scheme Applozic -archivePath archives/ios -sdk iphoneos SKIP_INSTALL=NO | |
B) xcodebuild archive -scheme Applozic -archivePath archives/ios-sim -configuration Debug -sdk iphonesimulator SKIP_INSTALL=NO |
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.Add this code in your class | |
import Applozic | |
/// Fetchs the contact from local db | |
func fetchContactsFromDB() -> [ALContact] { | |
let dbHandler = ALDBHandler.sharedInstance() | |
let fetchReq = NSFetchRequest<DB_CONTACT>(entityName: "DB_CONTACT") | |
var predicate = NSPredicate() |
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.Add the MyFCMService.java attached file in your project by download that and drag and drop in your android project under package app> main> java >in your packge folder | |
NOTE: make sure that the MyFCMService.java as your package name in place of package com.myapp.pushnotification; | |
2.Addd this in your android manifest file | |
in RNFirebaseMessagingService.java | |
<service |
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.Add the RNFirebaseMessagingService.java attached file in your project by download that and drag and drop in your android manifest under your app> main> java >in your packge folder | |
NOTE: make sure that the RNFirebaseMessagingService.jav as your package name in place of package com.mysamplereact; | |
in RNFirebaseMessagingService.java | |
2.Addd this in your android manifest file | |
<service | |
android:name=".RNFirebaseMessagingService" | |
android:exported="false" |
NewerOlder