Any API in Blackberry to make a call and send data? - blackberry

Any API in blackberry to make a call and send data. I want to dial a number and send some data using GSM data(not GPRS). Any help or pointers would be appreciated.

you can use a StreamConnection
String url = "socket://" + host + ":" + port
+ (checked ? "":";deviceside=true");
StreamConnection connection = (StreamConnection) Connector.open(url,
Connector.READ_WRITE, true);
deviceside=false indicates that the blackberry will connect to the Internet with a proxy in your MDS
deviceside=true open a direct TCP connection

You can send and receive data by SMS:
BlackBerry KB - What Is - Different ways to send SMS messages
BlackBerry KB - What Is - Different ways to listen for SMS messages
BlackBerry KB - How To - Use SMS to notify an application
If you want, you can hook call and send SMS automatically:
BlackBerry KB - How To - Implement the PhoneListener interface

Related

Twilio - Super Sim - Incoming SMS to Sim card

I am trying to achieve 2 way messaging with a super sim. I have been able to successfully configure sms received on my virtual Twilio number to be delivered to my sim by Http post (with authentication).
I would like to find a way to send an SMS from the sim and receive the SMS at a specific phone number. I've tried several flows without any success. I was able to get this working on Make.com and retrieve the data structure of the webhook but I still cant get this working on Twilio.
Thank you for the reply.
The sim is in an iot device and I am able to achieve 2 way communication utilizing webhooks with make.com. What I would like to achieve is to utilize a virtual number with Twilio to be the associated number for the iot device.
I have successfully received incoming "SMS" messages (commands) to the iot device, using a studio flow. When an sms is received via my virtual number number on twilio, the studio flow fires an https Post with the appropriate payload, populated from the received webhook from the virtual number., in turn receiving the "SMS" on the iot device.
Now I would like to create a flow or something similar on Twilio, that would generate a Twilio webhook that would listen for SMS commands (replies) "sent from" my appropriate Super Sim.
On Make.com I am able to generate the webhook and analyze the data structure, successfully receiving the payload of the webhook, from my Sim Fleet. I would like to utilize only Twilio for the webhooks, if possible. Do you have any more suggestions? Thank you in advance.
The Twilio Super Sim is not intended for use in a phone and does not support voice or regular SMS.
The Super Sim does support sending and receiving command (machine to machine, M2M) messages over SMS which can be used to send instructions to the device or receive data from a device. In this case the sim card can send messages to the number 000 and those messages will be received by Twilio and turned into a webhook request.
There is some documentation for how to send command messages from the Super Sim from a Raspberry Pi 4 or Raspberry Pi Pico and an in depth article on AT Commands that you can use to control the Sim.

Blackberry Push Implementation and waiting for acknowledgement

I already implemented the first 4 steps of the push initiator for blackberry
Send a push request
BlackBerry service returns a response
BlackBerry service pushes data to an assigned, specific port on device
Device returns response to BlackBerry service
Now I am working on the following two steps but nothing has happened yet:
5. BlackBerry service forwards acknowledgement to content provider
6. Read notification is returned to the BlackBerry service
Does anyone know how to implement that? I provided a domain when filling out the request but how do I achieve connection between me and the blackberry servers and how long do I have to wait for their response?
Actually your content provider send message to blackberry server and also specified the pin number of the device to which content provider want to send the message.
Your device automatically register with bb server if you have bb data service.
Your application is listening in the background on a particular port and your application also has particular app id that is provided by the rim.
So when content provider send message to bb server it also specify the app id and bb server has info about the port corresponding to this app id.and send message to the port of device whose pin is specified by the content provider.

Query related to Connection type BIS-B Socket in Blackberry application

I am trying to establish BIS Socket connection. I am able to establish BIS Http connection from my service provider.
I have downloaded one chat application that checks network types supported by my device/service plan which has following list:
1)BIS-Http : OK
2)BIS-SOCKET :OK
3)BES-HTTP : NA
4)BES-SOCKET : NA
5)TCP-HTTP : BAD DNS
6)TCP-SOCKET : TIMED OUT
As I know direct TCP is not supported by my service provider. So I would like to use BIS-Socket connection.
Can anypne please help me in achieving this type of connectivity?
Use of BIS-B connectivity is available to members of the Blackberry Developer Alliance program. Not being a member I can't tell you if if supports random socket connection or not.
Normal BIS access available through the API supports web protocols and is not a TCP/IP protocol between the Blackberry and the BIS. Hence the deviceSide= parameter in the connection stream. DeviceSide=true the Blackberry uses an internal TCP stack to establish a connection through direct access to the wireless carrier's access point (APN). DeviceSide=false (the default) the Blackberry sends the necessary data to the BIS (or BES) MDS server using a presumably proprietary protocol. The MDS server then establishes the TCP connection on behalf of the Blackberry.
If direct TCP is not available to you, and you can't use BIS-B, you will have to carry your data on top of an http connection. In most cases this is straight forward and works quite well.
To use BIS you need pay $2000. Have you done that? how you know you're using BIS?

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