hi
i want to be able to send messages using both whatsapp or whatsapp W4B
both apps are installed on the phone
before i activated whatsapp i managed to send throught W4B easy
once activated whatsapp i show a menu to the user to choose between them
i manage to identify which is installed or if both
but now none is working
any way to resolve this issue?
any better way to send whatsapp & whatsapp W4B ?
bellow is the code i'm using
thanks
i want to be able to send messages using both whatsapp or whatsapp W4B
both apps are installed on the phone
before i activated whatsapp i managed to send throught W4B easy
once activated whatsapp i show a menu to the user to choose between them
i manage to identify which is installed or if both
but now none is working
any way to resolve this issue?
any better way to send whatsapp & whatsapp W4B ?
bellow is the code i'm using
thanks
B4X:
Try
Intent1.Initialize(Intent1.ACTION_VIEW, $"https://api.whatsapp.com/send?phone=${PhoneNumber}&text=${TextMessage}"$)
Select Case SendUsing
Case "WHATSAPP"
Intent1.SetPackage("com.whatsapp")
Case "WHATSAPP.W4B"
Intent1.SetPackage("com.whatsapp.w4b")
End Select
Intent1.SetComponent("android/com.android.internal.app.ResolverActivity")
StartActivity(Intent1)
Catch
Log(LastException.Message)
End Try