B4A Library WhatsApp Library

MarcoRome

Expert
Licensed User
WhatsApp Library
Version: 1.1

This is a wrapper for this Github-project.


2015-03-07 22.12.56.png




WhatsApp
Author:
Devil-App
Version: 1.1
  • Whatsapp
    Fields:
    • AUDIO_TYPE As Int
    • IMAGE_TYPE As Int
    • VIDEO_TYPE As Int
    Methods:
    • OpenChatWithNumber (phoneNumber As String)
      Open Chat with Number
      Example:<code>
      Dim whapp As WhatsApp
      whapp.OpenChatWithNumber("+39334336444")</code>
    • createPhoneNumber (displayName As String, mobileNumber As String, email As String)
      This method create a contact.
      Example:<code>
      Dim whapp As WhatsApp
      whapp.createPhoneNumber("Devil","+393343365647","info@devil-app.com"</code>
    • existPhoneNumber (phoneNumber As String) As Boolean
      This method determines if a mobileNumber is a contact.
      Example:<code>
      Dim whapp As WhatsApp
      if whapp.existPhoneNumber("+393343365647") then MsgBox("Ok","msg")</code>
    • isInstalled As Boolean
      This method determines if Whatssap are installed.
      Example:<code>
      Dim whapp As WhatsApp
      if whapp.isInstalled then MsgBox("Installed","Msg")</code>
    • launchMarket
      This method go to Market.
      Example:<code>
      Dim whapp As WhatsApp
      whapp.launchMarket</code>
    • shareMediaWithContact (uri As Uri, mediaType As Int)
      Share Media with Contact
      Example:<code>
      Example: shareMediaWithContact(Activity.this, uriMedia, IMAGE_TYPE);
      Example: shareMediaWithContact(Activity.this, uriMedia, AUDIO_TYPE);
      Example: shareMediaWithContact(Activity.this, uriMedia, VIDEO_TYPE);
      Dim whapp As WhatsApp
      whapp.shareMediaWithContact(uriMedia, whapp.VIDEO_TYPE)</code>
    • shareTextWithContact (text As String)
      Share Text with Contact
      Example:<code>
      Dim whapp As WhatsApp
      whapp.shareTextWithContact("Hi...how are you")</code>
    Permissions:
    • android.permission.READ_CONTACTS
    • android.permission.SEND_SMS
    • android.permission.WRITE_CONTACTS

Example ( with mp4, mp3 example 3.7 Mb ) and so you can download here: Devil-App
Library in attachment
LAST REL 1.1
Bye
Marco
 

Attachments

Last edited:

MarcoRome

Expert
Licensed User
Great work!!!

I try to send text to contact but always open whatsapp contact list to choose.... i would like to send text direct to contact....
Hi jsanchezc.
This library is a wrapper for this project Github-project. In this project isnt present this function "direct"
Unfortunately there is no "direct call" as you desire, or rather it is not documented anywhere (i haven't found the same working).
In any case, if you can find something working i can integrate it into the library.
 

scsjc

Well-Known Member
Licensed User
Hello,
very nice library, but i have a question.... why need : android.permission.SEND_SMS ???
i need only share image, and this permission is not very nice to people ( red alert displayed on screen before install )

thanks.
 

MarcoRome

Expert
Licensed User
Hello,
very nice library, but i have a question.... why need : android.permission.SEND_SMS ???
i need only share image, and this permission is not very nice to people ( red alert displayed on screen before install )

thanks.
You are right ... you have in attachment new version 1.1 without permission SEND_SMS.
 

Roberto P.

Well-Known Member
Licensed User
I have a question for this interesting library: you think you can use this system to send bulk messages to contacts? such as sending commercial messages to customers of a shop without using sms?
thank you
 

MarcoRome

Expert
Licensed User
I have a question for this interesting library: you think you can use this system to send bulk messages to contacts? such as sending commercial messages to customers of a shop without using sms?
thank you
Hi Roberto. I dont think. But anyway you have gateway SMS with very competitive prices
 
Top