Sample without UI to get data from Applozic Server APIs and connect to websocket connection.
Go to src/js/app folder and add the following js files:
See modules/api/applozic.api.js file for all available functions.
.
Call the sample below code to make user login, all remaining function calls will work after login only.
Note: Replace userId, displayName and appId with your user and application key details.
			var events = {
				'onConnectFailed': function() {},
				'onConnect': function() {},
				'onMessageDelivered': function() {},
				'onMessageRead': function() {},
				'onMessageDeleted': function() {},
				'onConversationDeleted': function() {},
				'onUserConnect': function() {},
				'onUserDisconnect': function() {},
				'onConversationReadFromOtherSource': function() {},
				'onConversationRead': function() {},
				'onMessageReceived': function() {},
				'onMessageSentUpdate': function() {},
				'onMessageSent': function() {},
				'onUserBlocked': function() {},
				'onUserUnblocked': function() {},
				'onUserActivated': function() {},
				'onUserDeactivated': function() {},
				'connectToSocket': function() {},
				'onMessage': function(resp) {
					console.log(resp);
				}
			};

			window.Applozic.ALApiService.connect({
				data: { baseUrl : 'https://apps.applozic.com',
					alUser:
							{userId: 'PASS_USER_ID_HERE', password: 'PASS_PASSWORD_HERE', displayName: 'PASS_USER_DISPLAY_NAME', appVersionCode: 111, applicationId: 'applozic-sample-app'}
				},
				success: function(response) {
					console.log(response);
					window.Applozic.ALSocket.init("applozic-sample-app", response, events);
				},
				error: function() {

				}
			});