Android Question WhatsAPP - not sending text but asking to push a button

IamTrying

Active Member
Licensed User
My app from background need to send text via WhatsAPP. I applied following but WhatsAPP GUI open with number filled in and text filled in. WhatsAPP do not send the text WhatsAPP wait to push the send button manually. How do i do it automagically? (without human requirement)

B4X:
        Dim Intent1 As Intent
        Intent1.Initialize(Intent1.ACTION_VIEW, $"https://api.whatsapp.com/send?phone=${myService.sms_to}&text=${myService.sms_text}"$)
        StartActivity(Intent1)
 

DonManfred

Expert
Licensed User
Longtime User
This is by design. Whatsapp did NOT provide an Api for this. The User MUST be involved to prevent someone being a BOT.
 
Upvote 0

IamTrying

Active Member
Licensed User
Oh no. Thats disaster in my case.
My app has to run in an unhuman existing datacenter rack rooms (per rack),
to send notification via WhatsAPP for emergency: site down, booting, server mulfuntion etc.

I cant put human in datacenter rack-rooms. Is there any other notification built-in apps (from B4A or others) which can be used just like WhatsAPP but completely automated?
 
Upvote 0

IamTrying

Active Member
Licensed User
Skype has URL-Scheme.
B4X:
- (IBAction)skypeMe:(id)sender
{
  BOOL installed = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"skype:"]];
  if(installed)
  {
   [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"skype:echo123?call"]];
  }
  else
  {
   [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.com/apps/skype/skype"]];
  }
}

skypeurijavascriptcallouts.png


Can we from B4A execute/notify via Skype on iOS, Android ? (few years ago i did cant remember exactly). I do not want to put my own app to random end users because of GDPR and other terms and conditions.

I am trying to keep it simple and cheap.

https://msdn.microsoft.com/en-us/skype/skypeuris/skypeuritutorial_iosapps

https://msdn.microsoft.com/EN-US/library/office/dn745885(v=office.15).aspx
 
Last edited:
Upvote 0

IamTrying

Active Member
Licensed User
OK - I hate WhatsAPP let me down on my project.
I will use Skype (i am mostly robot apps implementer), it has what i needed.

thanks anyway!!
 
Upvote 0

BillMeyer

Well-Known Member
Licensed User
Longtime User
I agree with @DonManfred - provided you get the subscription topics correct - it works like a dream

OR

Given that you have access to racks and servers you could possibly also take a look at MQTT by installing the Mosquitto Broker (now called Server) and use a lightweight B4J Non-Gui server to handle your messaging centre with a Chat Type module in your app that is invoked by running a service on the respective device.
 
Upvote 0

IamTrying

Active Member
Licensed User
I did that but iOS release refused so i drop all those projects and decided to use third party apps WhatsAPP. But they want human operator and refuse the way i needed. So its a fail approach.

I have my push-server's running on CentOS which works with Android but failed to release on iOS so i drop that project and decided to not waste time on that it was done project for me.

Thanks i have figured out how i will hack this i have few alternatives except WhatsAPP.

- Asterisk (Voice call from server, SMS)
- Texting using Xmpp protocol from server
- Fallback calls, using Skype
 
Upvote 0
Top