WhatsApp integration

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
weblike
Posts: 1165
Joined: Sun Dec 02, 2012 12:00 pm
Location: Europe

WhatsApp integration

Post by weblike »

Hi,

Has anyone knowledge about the possibility of WhatsApp integration in an Aware app?
A plugin or something?

Thx,
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: WhatsApp integration

Post by BenHayat »

WhatsApp? :D

What feature of "WhatsApp" you want to use and what is it that you want to accomplish?
weblike
Posts: 1165
Joined: Sun Dec 02, 2012 12:00 pm
Location: Europe

Re: WhatsApp integration

Post by weblike »

BenHayat wrote:WhatsApp? :D

What feature of "WhatsApp" you want to use and what is it that you want to accomplish?
whatsapp web for example
i'm interested in a real live chat between users.
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: WhatsApp integration

Post by mrbdrm »

there is no API for whatsapp.
i use https://apps.applozic.com/
its great and easy to use.
weblike
Posts: 1165
Joined: Sun Dec 02, 2012 12:00 pm
Location: Europe

Re: WhatsApp integration

Post by weblike »

mrbdrm wrote:there is no API for whatsapp.
i use https://apps.applozic.com/
its great and easy to use.
How do you use it? Can users chat with each others? Do you use it in a multi tenant app?
Can you share some tips?

Thank you.
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: WhatsApp integration

Post by mrbdrm »

all you do is create an app in their website. and then in aware you pass the LoginName and DisplayName, for example. using the tags <<LoginName>>
thats it.
you will have a real time chat direct or group like whatsapp with file sharing too.

look at their docs you will see some examples

i don't know about multi tenant app, but i guess its up to you how to implement it.
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: WhatsApp integration

Post by BenHayat »

mrbdrm wrote:there is no API for whatsapp.
i use https://apps.applozic.com/
its great and easy to use.
I looked at this product and it's done very nicely, and it should work with Aware 8.1 REST system nicely.

I'm actually such a Real-Time app for a different industry, so I could appreciate the work that has gone to Applozic. Of course, this is a much more extensive product than mine.
RLJB
Posts: 914
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: WhatsApp integration

Post by RLJB »

Well this is interesting mrbdrm....

I'm curious how it looks IN your aware app, could you share a screenshot please?
Rod. Aware 8.6 (latest build), Developer Edition, on OS Linux (Ubuntu) using GUI hosted on AWS EC2, MYSQL on AWS RDS
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: WhatsApp integration

Post by mrbdrm »

sure
here how its looks in webapp (i have another look on the native mobile app if your interested i will post them)
be aware i use RTL language

before opening the chat
1.png
1.png (83.15 KiB) Viewed 39706 times
here after you open it
2.png
2.png (122.91 KiB) Viewed 39706 times
the great thing is you can open tabs in your app without the chat app being affected (modal)
hpl123
Posts: 2611
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: WhatsApp integration

Post by hpl123 »

Very nice, does the external service do other connections like Telegram etc.?
Henrik (V8 Developer Ed. - Windows)
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: WhatsApp integration

Post by mrbdrm »

you mean other than text chat?
there is voice and video calls i believe. but i didn't test them.
hpl123
Posts: 2611
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: WhatsApp integration

Post by hpl123 »

mrbdrm wrote:you mean other than text chat?
there is voice and video calls i believe. but i didn't test them.
Yeah, I mean other text chat apps like Telegram (similar to Whatsapp). I couldn't really make out from their site if they supported other integrations.
Henrik (V8 Developer Ed. - Windows)
RLJB
Posts: 914
Joined: Tue Jan 05, 2010 10:16 am
Location: Sydney, Australia

Re: WhatsApp integration

Post by RLJB »

hey mrbdrm...

Could I bother you for some high level pointers/tips/steps you took to integrate this into Aware? I had a quick look at the documentation and it wasn't super obvious to me what you did. Just an idea of what it does, how it interacts with Aware user records, etc.

Sorry, usually I can get a bit more from the screen shots, but my Arabic is a bit rusty :D
Rod. Aware 8.6 (latest build), Developer Edition, on OS Linux (Ubuntu) using GUI hosted on AWS EC2, MYSQL on AWS RDS
hpl123
Posts: 2611
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: WhatsApp integration

Post by hpl123 »

RLJB wrote:hey mrbdrm...

Could I bother you for some high level pointers/tips/steps you took to integrate this into Aware? I had a quick look at the documentation and it wasn't super obvious to me what you did. Just an idea of what it does, how it interacts with Aware user records, etc.

Sorry, usually I can get a bit more from the screen shots, but my Arabic is a bit rusty :D
1+
Henrik (V8 Developer Ed. - Windows)
mrbdrm
Posts: 349
Joined: Tue Oct 16, 2012 11:44 am

Re: WhatsApp integration

Post by mrbdrm »

Sure
they only thing im doing is passing the variables i need from the RU object.

their system create the user if its not found automatically

so for example in main VP panel you add this code in the render script:

Code: Select all

   (function(d, m){var s, h;       
   s = document.createElement("script");
   s.type = "text/javascript";
   s.async=true;
   s.src="https://apps.applozic.com/sidebox.app";
   h=document.getElementsByTagName('head')[0];
   h.appendChild(s);
   window.applozic=m;
   m.init=function(t){m._globals=t;}})(document, window.applozic || {});
now login the user (or create a new one automatically):

Code: Select all

 window.applozic.init({
    appId: applozicApplicationKey,      //Get your application key from https://www.applozic.com
    userId: <<LoggedInRegularUser.LoginName>>,                     //Logged in user's id, a unique identifier for user
    userName: <<LoggedInRegularUser.FullName>>,                 //User's display name
    imageLink : '',                     //User's profile picture url
    email : '',                         //optional
    contactNumber: '',                  //optional, pass with internationl code eg: +13109097458
    desktopNotification: true,
    source: '1',                          // optional, WEB(1),DESKTOP_BROWSER(5), MOBILE_BROWSER(6)
    notificationIconLink: 'https://www.applozic.com/favicon.ico',    //Icon to show in desktop notification, replace with your icon
    authenticationTypeId: 1,          //1 for password verification from Applozic server and 0 for access Token verification from your server
    accessToken: '',                    //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
    locShare: true,
    googleApiKey: "AIzaSyDKfWHzu9X7Z2hByeW4RRFJrD9SizOzZt4",   // your project google api key 
    mapStaticAPIkey: "AIzaSyCWRScTDtbt8tlXDr6hiceCsU83aS2UuZw",
    googleMapScriptLoaded : false,   // true if your app already loaded google maps script
    autoTypeSearchEnabled : true,     // set to false if you don't want to allow sending message to user who is not in the contact list
    loadOwnContacts : false, //set to true if you want to populate your own contact list (see Step 4 for reference)
    onInit : function(response) {
       if (response === "success") {
          // login successful, perform your actions if any, for example: load contacts, getting unread message count, etc
       } else {
          // error in user login/register (you can hide chat button or refresh page)
       }
   },
   contactDisplayName: function(otherUserId) {
         //return the display name of the user from your application code based on userId.
         return "";
   },
   contactDisplayImage: function(otherUserId) {
         //return the display image url of the user from your application code based on userId.
         return "";
   },
   onTabClicked: function(response) {
         // write your logic to execute task on tab load
         //   object response =  {
         //    tabId : userId or groupId,
         //    isGroup : 'tab is group or not'
         //  }
   }
  });


thats it!
for more options see https://github.com/AppLozic/Applozic-Web-Plugin

as for mobile app i ended up using iframe inside the VP panel.

ps: i contacted them for lower price and they have a 50$/month option not showing on the website.

hope this help.
Post Reply