T toro1950 Active Member Licensed User Aug 31, 2024 #1 Hello, I need to send a message with whatsapp to a specific phone number, with the following code I can send a message but I have to choose the recipient from the contact list and if they are different as in my case it is quite annoying. B4X: Dim testo As String testo= "Hello,......................." Dim avc As ActivityViewController avc.Initialize("avc", Array(testo)) avc.Show(B4XPages.GetNativeParent(Me), Root) Wait For avc_Complete (Success As Boolean, ActivityType As String) With BA4 with the following code you can send a message to a specific number B4X: Dim testo As String testo= "Hello,..................."" Dim Intent1 As Intent Intent1.Initialize(Intent1.ACTION_VIEW, $"https://api.whatsapp.com/send?phone=${phone number}&text=${testo}"$) StartActivity(Intent1) Is there any possibility to do the same thing with B4i? maybe through a library or something Thanks in advance to anyone who can help me
Hello, I need to send a message with whatsapp to a specific phone number, with the following code I can send a message but I have to choose the recipient from the contact list and if they are different as in my case it is quite annoying. B4X: Dim testo As String testo= "Hello,......................." Dim avc As ActivityViewController avc.Initialize("avc", Array(testo)) avc.Show(B4XPages.GetNativeParent(Me), Root) Wait For avc_Complete (Success As Boolean, ActivityType As String) With BA4 with the following code you can send a message to a specific number B4X: Dim testo As String testo= "Hello,..................."" Dim Intent1 As Intent Intent1.Initialize(Intent1.ACTION_VIEW, $"https://api.whatsapp.com/send?phone=${phone number}&text=${testo}"$) StartActivity(Intent1) Is there any possibility to do the same thing with B4i? maybe through a library or something Thanks in advance to anyone who can help me
Andrew (Digitwell) Well-Known Member Licensed User Longtime User Aug 31, 2024 #2 How about this? Send message to some WhatsApp number Hello, i did it in Android, but i could not find how to do it in iOS. Here is the code in B4A: Dim Intent1 As Intent Intent1.Initialize(Intent1.ACTION_VIEW, $"https://api.whatsapp.com/send?phone=55${number}&text=${""}"$) Intent1.SetComponent("android/com.android.internal.app.ResolverActivity")... www.b4x.com Upvote 0
How about this? Send message to some WhatsApp number Hello, i did it in Android, but i could not find how to do it in iOS. Here is the code in B4A: Dim Intent1 As Intent Intent1.Initialize(Intent1.ACTION_VIEW, $"https://api.whatsapp.com/send?phone=55${number}&text=${""}"$) Intent1.SetComponent("android/com.android.internal.app.ResolverActivity")... www.b4x.com