How send sms using Cloudhopper SMPP - java

I write an Android application which send a sms to client about your meeting (reminder). Today I can’t use Android SMS Manager because Google’s privacy policy prohibits.
So, I use a library Cloudhopper SMPP by Fizzed (forked from Twitter).
But I can't connect. I do not understand how to do it. And this example is test. I interesting how to connect without test!
What should I do for a direct connection? if possible in more detail and understandably.
Thanks!

Related

How to receive sms in a web application in java ?

i'm trying to create a web application that sends and receive SMS. I've already contacted a local SMS gateway and the connection is working.
I'm using Jsmpp as the library and i'm able to send and receive SMS through a sample application i build using Java SE.
Now i need to migrate this feature to web application. Sending SMS should be ok. But how can i add a listener to listen to the SMSC through my web application ? I'm using Spring and j2ee.
The SMSC doesnt expose a web api and dont have the ability to send sms to a api i expose. The only way they allow is the communicate through the SMPP protocol.
Thanks In Advance.
did you try the program in the link - http://www.java-samples.com/showtutorial.php?tutorialid=22?
If you are looking for any Bulk SMS Solution, You can use APIs provided by vendors such as https://www.textlocal.in/ or any other vendor whichever is feasible.
If you are looking to setup a gateway for yourself, you can check a solution like http://www.ozekisms.com/
Earlier there were Network Vendor provided Gateway which you can freely use, now there are no such gateway you can use freely.
More links,
https://www.quora.com/How-can-I-send-a-SMS-with-a-Java-code
http://www.airtel.in/aes/Global+Business/Global+Voice/Enterprise+Voice+Solutions/Mobility+Solutions/Enterprise+VAS/Bulk+SMS+Solutions
After lots of trial and error i managed to find a solution for the question.
The way i implemented it was to run a standalone java application as a Linux service that would listen to the SMSC. I used the sample project SMSRouter (https://smsrouter.org/) as the basis. Apache camel smpp component was used in this sample project to handle sms sending and receiving.
I then created queues inside Jboss application server for inbox and outbox to store incoming and outgoing sms messages.
Once a SMS is received by SMSRouter it will use JMS to add the SMS message to the inbox queue inside Jboss which will trigger a Message Driven bean that would keep listening to the inbox queue.
When the Web Application needs to send a SMS it will add a JMS message to the outbox queue which will then trigger the SMSRouter which is listening to the outbox queue. SMSRouter will use Apache Camel to send the SMS to the SMSC.

Sending SMS in java via SMPP protocol

I am new to SMPP protocol. Please kindly advice me what are needed to build java project to send sms via SMPP protocol. How to setup SMPP server and SMPP clients? Need to setup SMS Gateway? If so how to install it? What is OpenSMPPBox?
Loot at this Twitter's Java project https://github.com/twitter/cloudhopper-smpp. It has both server and client parts.
SMPPSim http://www.seleniumsoftware.com/user-guide.htm is a great simple SMPP simulator. Written in Java.
smppsink https://github.com/PowerMeMobile/smppsink is also a simulator, but allows to give instructions to the simulator, for example what submit or delivery status to return. Written in Erlang.

Can GCM be used as a two way communication?

Can GCM (Google Cloud Messaging) be used as a two way communication between the device and the server?
Please Help with the links.
Yes it can. That's what GCM CCS (Cloud Connection Server) is all about. It enables you to use GCM both both cloud to device and device to cloud messaging. The older version of GCM (the HTTP version) only supports messages from the server to the device (cloud to device).
Yes you can use XMPP and HTTP to complete what you are looking for. GCM offers both services. You can find a great starter tut here http://www.grokkingandroid.com/xmpp-server-google-cloud-messaging/
The google documentation isn't bad either. https://developer.android.com/google/gcm/server.html
The Smack API is what you will use to get XMPP working on the server side. You can find that here http://www.igniterealtime.org/projects/smack/
We also use Retrofit http://square.github.io/retrofit/ which is great for handing off objects via http.
Good luck, be sure to ask questions, figuring it all out in the beginning is a bit painful but worth it in the end. Also checkout RabitMQ http://www.rabbitmq.com/, it's similar to GCM

How to listen for email messages

Is there a way to listen for incoming/outgoing email messages or access the inbox directly?
I read that since there is no default mail client in the Android SDK it is not possible unless the client used on the phone implements some custom mechanisms. Is this still the case?
Emails are not part of the Android OS so you cannot code a global Broadcast Receiver (like you would for incoming SMS). The obvious workaround is to code Broadcast Receivers for the top X most popular email clients on Android OS which do broadcast incoming emails.
K9 does give you the flexibility of registering Broadcast Receivers for incoming emails - see https://github.com/k9mail/k-9/wiki/Intents.
Gmail does not have any official / documented API for receiving info about incoming emails. But until a while back, you could make use of Content Observers for monitoring changes to Gmail. I believe this no longer works though.
I think the real issue here is privacy and security. Emails contain much more info compared to SMS. As a user, you really would not want an app ecosystem where third party apps can start monitoring your personal and professional emails.

Sending SMS using Java

I am developing a Java web application . I will need to send SMS to a mobile user from the application . How do I achieve this without using a mobile phone for sending SMS?.
I am relatively new to Networks . Please advice .
If you are in the US you could use Twilio. It costs 1 cent per SMS and you can send the messages through their REST API. They also have Java libraries.
http://sourceforge.net/projects/java-sms-api/
http://www.ozekisms.com/index.php?owpn=581
https://www.google.com/search?gcx=w&sourceid=chrome&ie=UTF-8&q=java+sms&safe=images
You should use SMS gateway. See here some gateways
Did you make a decision of what protocol has to be used for sms sending? A lot of SMS centers provide REST or SOAP API to send SMS messages. SOAP and REST are much more simpler than SMPP protocol (that is rather low-level) to my mind.
If you will decide to use SMPP protocol, there is SMPPSim tool which is SMSC (Short Message Service Centre) simulator and allows to test SMS sending functionality in a simple way. So you don't need access to any of real SMSCs.
If your SMS provider allows to use SOAP to send SMS messages, you can use SoapUI Service Mocking that also allows to develop a client for a SOAP service without access to the real one.

Categories

Resources