Sending Flash SMS in UCS2 (that is encoding) on smpp - network-programming

In order to send a flash SMS on smpp protocol we use the data-coding field (ver. 3.4 or 5.0) inside the PDU. On the other hand, if we want to send a normal sms in any language we use the same field so as to support the extended characters in that language. So smpp protocol has added some optional fields, which are called TLV so as to support such a functionality. In gsm protocol there is no such a problem because they introduced 'message class' see : 3GPP protocol . So, to come back to smpp protocol, they use the TLV dest_addr_subunit but is not clear how to use it so as to send a sms with ucs2. Can you give an example or a way to support that feature?

For Flash SMS, you set TLV DATA_CODING to 0x18 value.

Related

How to auto fill OTP textfield on OTP code received from firebase in iOS, Swift? (WITHOUT TAPPING)

I want to know a callback function that is automatically called and fill the OTP text field (after I receive the OTP code from firebase).
I have already tried:
textfield.contentType = onetimecode.
But this is not what I am looking for, this just gives the otp code fetched from sms as a autocomplete.
I am actually looking for a callback function that is auto fired after I receive OTP code on my phone.
I think picture makes it clear, I want to fill the textfield without tapping (keyboard placeholder thingy) the received OTP code.
By design, iOS apps have no access to incoming SMS messages. There are many discussions out there on a similar topic.
Link 1
Link 2
Link 3
Link 4
The main reason for the restriction is privacy. There is no documented public API to receive a callback when SMS is received. If you try to hack iOS and listen for private notifications then might be your app will be rejected by the App Review team.
While doing research on this topic I found something interesting, you can create an extension that can receive incoming SMS and call events for the purpose of SPAM filtering. This type of extension is called the SMS and Call reporting extension in Apple's ecosystem. While looking at the documentation of this extension, at first glance I thought we can achieve the asked behavior if we can notify our host app about the incoming messages. But while scrolling to the end of the document I found that by design this extension has some additional restrictions:
The extension cannot share data with the host app.
The extension can't access the network directly.
The extension receives the event only if the sender's number is not on the contact list
Anyways it's all about docs, I have not tried anything on the extension. What you can do is try to create an extension and see for other possible solutions.
Example:
1 bad solution in my mind is your extension call your server with the SMS content and then your server forward the SMS content in a silent push notification payload. When your app received the silent notification it serves the purpose of prefilling the field. But again this is not the intended purpose of the extension.
In my opinion, the best is what you have already achieved i.e. setting the text field's content type.

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.

SMS from Server to be sent to a particular port number in Blackberry

In Blackberry SMSDemo Sample application uses a particular port number through which the message will not be displayed in inbox.
That application works properly if message is sent from a device to device.
I was wondering, if there is a way to send message from server to that particular port number so that the message which is sent from the server will not be displyed in the inbox.
We have tried many method but have been unsuccesfull upto now.
Hoping to hear from you soon
Thanks In Advance
Krishnan.
It is possible to send to a specific port on a handset from a server via UDH.
According 3GPP TS 23.040 section 9.2.3.24 (I used version 6.8.1), you can set Information Element Identifier octet to any one of the following values and achieve port addressing:
0x04 (Application port addressing scheme, 8 bit address)
0x05 (Application port addressing scheme, 16 bit address)
16 bit port addressing is commonly used.
Dependency
There are two dependency for UDH to work:
Carrier
Handset
Officially, UDH is supported only in GSM carriers. A GSM carrier may decide to block messages with UDH or remove the UDH part of messages. Non-GSM carriers are not required to support UDH, but they may.
The handset also should have capability to parse UDH messages.

How to programmatically send MMS in blackberry?

How to programmatically send an MMS in blackberry?
MMS API (4.6 and >)
There is a net.rim.blackberry.api.mms class which "Provides advanced utilities for interaction with the MMS messaging system.". But this gives only ability to "modify the message before it is sent or deny it from being sent completely" using addSendListener
Using MMS protocol in connection
from javax.microedition.io.Connector API:
mms
This protocol opens an MMS connection across the wireless network. The open request should be formatted as follows:
(MessageConnection) Connector.open("mms://[<peer_address >]:[<application_Id>]");
where:
< peer_address > is the phone number or the email address of recipient.
< application_Id > is used to identify a Java application.
For example, to send a mms message to specific application use
Connector.open("mms://+123456789:applicationID");
To open a server mode MessageConnection use
Connector.open("mms://:applicationID");
Also see Introduction of MMS in J2ME and sample code - How to send MMS? and Sending and Receiving MMS on J2ME devices
I have never tried this approach, so I can't tell if it's working.
Invoking Messages application
Other option is open Messages application programmatically, to compose MMS:
Invoke.invokeApplication(Invoke.APP_TYPE_MESSAGES,
new MessageArguments(MessageArguments.ARG_NEW_MMS));
Also see Invoking MMS with attachment using application.

Can a native Blackberry application (not MIDlet) use MIDP Push Registry?

If I am writing a MIDlet, and if the device supports SMS push registration (i.e. supports WMA 1.1 spec), I will be able to send push messages to the application that is installed on the phone and is listening to SMS messages at the assigned port.
However, if I am writing a Blackberry application, can I still go ahead and use the procedure that applies to MIDP 2.0 devices. If so, can I specify static SMS push registration in JAD file, as we do for a MIDlet?
Would the appropriate JAD property be still specified as MIDlet-Push-1:{}?
Another question, that is not totally unrelated is- are there any bulk SMS providers that allow SMS bearers specify the destination ports that can be integrated with this kind of a solution?
Thanks
A regular blackberry application does not support the push registry. You'll have to keep a DatagramConnection open and listen for the incoming SMS messages that way.
DatagramConnection connection = (DatagramConnection)Connector.open("sms://:1234");
Datagram dgram = connection.newDatagram(connection.getMaximumLength());
connection.receive(dgram); // blocking call so this should be in a separate thread
String message = new String(dgram.getData());
where 1234 is the port you're listening on.
As to you're second question I'm not entirely sure, but I think mblox supports port directed SMS.
For the second question, if the bulk SMS service provider provides you with HTTP API which included the UDH field, you can send messages to application listening in that particular port

Resources