how to send text message from android application using 4 digit numbers - android-studio-3.0

Is it possible to send the message to recipient through my android application with the 4 number, means the recipient will receive the message from 4 digit number.

Related

WhatsApp chats real time recording

I have requirement from compilance to backup my business WA users chats (for reasonable price...)
Ive googled a lot and seems (correct me if Im wrong) only solution is to build own chat app (or use app delivered by API provider)
I've checked eg twilio, 360dialog, chat-api
I played a bit witch twilio and I know how to save incoming messages (sent by eg client), but not outgoing (sent by my users)
Also I know how to send WA msgs from my own app (so I can record those)
But my preference would be users to use WA on mobile phones or WA web and listen some hooks to record that.
Any idea how to implement that? Maybe WA buisness API can do that?
There is no straight way to do this using WhatsApp Business APIs,
You need to record both the messages in one place/table/collection whether it is sent from our business phone number or received from the clients/users.
We can do it but have to use proper logic, let's see both the scenario and how to record it in one place/table/collection,
Send Message from WhatsApp Business API (from our business phone number) to clients/users:
You can record the message whenever Business sends any message to clients/users because Webhook does not give that sent message content, yes it will notify us about status updates like sent, delivered, read, failed, etc.
Things we can record:
Message ID (This is important, you will get in response whenever we send a message from Business API)
From Phone Number (Business phone number)
Message Content
To Phone Number (Client/user phone number)
Message Status (sent, read, delivered, failed)
Sent Date
Updated Date (updated message status date)
Type (from business)
Receive Messages from clients/users to our Business Phone Number:
You can get message content from Webhook, so we can record that received message content object in our table/collection,
Things we can record:
Message ID (This is important, Get in Webhook)
From Phone Number (Client/User phone number)
Message Content
To Phone Number (Business phone number)
Message Status (sent, read, delivered, failed)
Sent Date (message received date)
Updated Date (updated message status date)
Type (from user/client)
Other Things that I am not sure about:
We can't get message content If a Business phone number sends a message to a client/user from WhatsApp Business App.

Using Twilio SMS I want to send a multi-segment message but tell Twilio where to break the message

I want to send SMS messages greater than 160 characters (say 240) and normally Twilio willl auto-segment as necessary. I would like to tell Twilio where to break the messages (say three segments of 80 each). We want to be sure the each segment arrives to the destination in the correct order and with logical message breaks.
It is not possible to programmatically handle the segmentation yourself. A SMS message over a certain length (based on GSM7 or UCS2 encoding) will be automatically handled. If you want to send 3 separate segments of 80 bytes, make 3 separate API requests overtime which will show up as 3 separate SMS messages on the mobile terminated device.
Does Twilio support concatenated SMS messages or messages over 160 characters?

Between operator transfered phone numbers not receiving sent sms by twilio where UNDELIVERED status is RETURNED

In Morocco we have 3 operators:
=> IAM, INWI and ORANGE
=> My personal phone number was originally purchased from IAM operator then i have transfered it to INWI (and this is the problem)
I am integrating Twilio in my software and have made some tests and observed this when sending a new sms to someone :
- If the phone number is normal (not transfered as in my case) the SMS is delivered correctly
- If the phone number is transfered from an operator to an other as in my case the SMS is not Delivered
Am i missing any config or something ?
I am testing with postman via post http call to Twilio REST API url :
https://api.twilio.com/2010-04-01/Accounts//Messages.json

Twilio Studio: send response message based on incoming message content

I already have a Twilio application with this use case :
The incoming message is forwarded to a client
The client replies to the message by sending a message to the twilio number. The message body will contain the phone number at the beginning followed by the message content.
The web hook checks if the message is received from the client and it contains a phone number. If so, it forwards the message to the phone number in the body.
I would like to implement this use case using Twilio studio.
Is this possible?
You can use the Split widget and use a regular expression to test whether the input from Step 2 contains a phone number or not.

(Error: 30004) Message blocked. The destination number you are trying to reach is blocked from receiving this message

i got this message while i am trying to send sms with twilio. i never blocked any number
In my case it happened for an Indian number. For Indian number it could be blocked by the end user -
Limitations sending SMS messages to Indian mobile devices
SMS messages entering into India are categorized as “Transactional” or “Promotional” and may result as an "Error - 30004".
By default, all SMS messages sent from Twilio phone numbers are categorized as “Promotional” and are subject to the following limitations:
They cannot be sent to any phone number in India’s Do Not Call Registry
If you’ve been having trouble sending SMS messages to an Indian number, see if that number is registered on the National Do Not Call Registry.
If the owner of the phone number wishes to start receiving SMS messages from Twilio, they can update the DNC settings by following the instructions on this website.
More details : https://support.twilio.com/hc/en-us/articles/223134167-Limitations-sending-SMS-messages-to-Indian-mobile-devices
Twilio developer evangelist here.
Error 30004 doesn't mean that you blocked a number, but that the number you are trying to send to has blocked messages from your number. They could have done so by texting "STOP," "CANCEL" or other particular words to your number.
If you don't believe that this has happened, then I recommend you get in touch with Twilio support with the number that is causing this error and they will look into it.

Resources