Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
nativescript-applozic-chat-fork
Advanced tools
Nativescript plugin from Applozic that wraps the Native chat UI for android and iOS
Readme
For NativeScript 7 compatibility, run.
tns plugin add nativescript-applozic-chat@2.0.0
For NativeScript 6 compatibility, run.
tns plugin add nativescript-applozic-chat@1.7.2
Goto src folder and run
npm run demo.ios
Add import
var nativescript_applozic_chat = require("nativescript-applozic-chat");
And then inside your funcation you can create the object of ApplozicChat to access it.
var applozicChat = new nativescript_applozic_chat.ApplozicChat();
Add import
import { ApplozicChat } from "nativescript-applozic-chat";
And then inside your funcation you can create the object of ApplozicChat to access it.
var applozicChat = new ApplozicChat();
var alUser = {
'userId' : userId, //Replace it with the userId of the logged in user NOTE: String userId
'password' : password, //Put password here NOTE: String password
'authenticationTypeId' : 1,
'applicationId' : 'applozic-sample-app' //replace "applozic-sample-app" with Application Key from Applozic Dashboard
};
applozicChat.login(alUser, function(response) {
applozicChat.launchChat(); //launch chat
}, function(error) {
console.log("onLoginFailure: " + error);
});
applozicChat.launchChat();
applozicChat.launchChatWithUserId(userId);
applozicChat.launchChatWithGroupId(groupId, function(response){
console.log("Success : " + response);
}, function(response){
console.log("Error : " + response);
});
applozicChat.logout(function(response) {
console.log("logout success: " + response);
}, function(error) {
console.log("logout error: "+ error);
});
a) For IOS upload your APNS push notification certificate to Applozic Dashboard page under 'Edit Application' section in order to enable real-time notification.
Go to Applozic Dashboard Push Notification Push Notification -> Upload APNS Certificate for Development and Distribution environment.
b) For Android go to Applozic Dashboard Push Notification and update the GCM/FCM server key under Push Notification -> GCM/FCM Key.
Prerequisites:
google-services.json
file.Steps to follow:
Copy the pushnotification
folder from the above downloaded files and paste it in path <your project>/platforms/android/src/main/java/com/tns/
Add these lines in file <your project>/platforms/android/src/main/AndroidManifest.xml
inside <application>
tag
<service android:name="com.tns.pushnotification.FcmListenerService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service
android:name="com.tns.pushnotification.FcmInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
Add the same lines from step 2 in <your project>/app/App_Resources/Android/AndroidManifest.xml
file inside <application>
tag
Paste thegoogle-services.json
file in <your project>/platforms/android/
folder
Open <your project>/platforms/android/build.gradle
:
add this inside dependency mentioned in top of the file (below classpath "com.android.tools.build:gradle:2.2.3"
) :
classpath "com.google.gms:google-services:3.1.1"
add this below apply plugin: "com.android.application"
:
apply plugin: "com.google.gms.google-services"
Call PushNotificationTask in onSuccess of applozic login as below:
applozicChat.registerForPushNotification(function(response){
console.log("push success : " + response);
}, function(response){
console.log("push failed : " + response);
});
Note : Everytime you remove and add android platform you need to follow steps 1,2,4 and 5.
Download delegate.ts file from this delegate.ts link and paste it under your project folder-->app-->delegate.ts
Download app.ts file from the app.ts link and replace the app.ts file in your project if you have any changes then you can merge only required changes from the app.ts file link
NOTE : Above push notification setup for android and ios is in the case if your not using native script push plugin in your project
FAQs
Nativescript plugin from Applozic that wraps the Native chat UI for android and iOS
The npm package nativescript-applozic-chat-fork receives a total of 0 weekly downloads. As such, nativescript-applozic-chat-fork popularity was classified as not popular.
We found that nativescript-applozic-chat-fork demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.