Unable to trigger Bulk SMS using Twilio Notify API - java

I have to create a functionality where I must send same SMS text to multiple numbers in an array. For that I am using Notify API. As part of the requirement I created a Notify Service and Messaging Service with the existing number used for normal sms service and linked them up under my Trail Twilio Account.
Wrote the code, as present in the docs and tested over a API hit. The code executed successfully and on the twilio logs, it is coming as sent. But I am not able to receive any sms notification on the number provided.
Where am I going wrong??

If you are using a Twilio trial account, there are certain limitations. Can you look under your debugger (the bug icon in the upper right corner of your Twilio Console) to see if there any are any events?
Also, once you upgrade your account, verify SMS geographic permissions are set for the destinations you are trying to send messages to

Related

i want to send notification to my all authenticated app user

I have an application that contains order data . I want to send this to all users of this app as notification.My target is to send Push Notifications to all of the users of my applications. How would I accomplish that?
To begin with your app mush already be using GCM and listening to the correct topic. Otherwise you have to roll out an update with the new GCM feature and hope that all users update it.
If you want to see some code for this take a look at this sample i crated some time ago. What you need to implement from the sample is the "SubscribeTopic" part. And to test if its working you can use this java program.
The good thing about topics is that you don’t need to save the users registration tokens and the message is sent to everyone listening for that exact topic.
Use Apache kafka
The original use case for Kafka was to be able to rebuild a user
activity tracking pipeline as a set of real-time publish-subscribe
feeds. This means site activity (page views, searches, or other
actions users may take) is published to central topics with one topic
per activity type. These feeds are available for subscription for a
range of use cases including real-time processing, real-time
monitoring, and loading into Hadoop or offline data warehousing
systems for offline processing and reporting.
To start with, note that a full GCM implementation requires both a client implementation and a server implementation. Before you can write client apps that use GCM, you must have an application server that meets the following criteria:
Able to communicate with your client.
Able to send properly formatted requests to the GCM connection
server.
Able to handle requests and resend them using exponential back-off.
Able to securely store the API key and client registration tokens.
Note: never include the API key in any client code.
For XMPP, the server must be able to generate message IDs to uniquely
identify each message it sends (GCM HTTP connection server generates
message IDs and returns them in the response). XMPP message IDs
should be unique per sender ID.
Complete documentation, how-to-guides for sending messages and links to examples can be found from Cloud Messaging - Messaging Concepts and Options.
You may also check ANDROID AND GCM – BROADCAST YOURSELF for the tutorial and demonstration on the use of GCM for the broadcast of messages to an Android client from a Tomcat server and use of sending broadcastintents from a service and receiving those broadcastintents from an app's activity.

Android-Server SMS Verification code

I have an android app and I want to allow a user to login using a verification code. I want to send the verification code in an SMS to the user's phone. What is the best solution to verify if the verification code matchs on the server side?
Is the creation of new table that contains verification codes a good idea?
Here are a couple ways to implement user verification on Android:
Some apps build it themselves with SMS / Voice APIs
Others use a verification specific API
With SMS / Voice APIs
You'll need to generate a code (huge security threat)
Send it via the channel you use primarily
Set some kind of time delay job (queue,worker, whatever)
Send a fallback message should you get no response
from the user
Nexmo’s Verify API
Instead of paying different fees for each country, Nexmo allows you to go globally with a simple API call for a flat fee of 10 cents per verification, NOT per attempt (unsuccessful attempts will not be charged towards your account)
Verification code should arrive to your phone as an SMS. If you wait a while, you'll also get a phone call, and the code will be read to you. The timing and channels used depends on the type of number, the country, and the carrier.
You can also use Verify's Android SDK, which enables you to build Verify into your Android app by simplifying this integration. After importing this library into your app, you will only need the user's phone number, while the SDK will take care of the remaining steps required to verify your users.
Take a look at Nexmo's Verify Android SDK here
Full disclosure, I work at Nexmo.

Android app uninstallation event for analytics

I wonder what are the ways/patterns to detect app uninstallation for any kind of analytics on android? I know the limitations of ACTION_PACKAGE_REMOVED intent - not received by application being removed. I am using flurry at the moment and have also discovered that they do not provide any kind of support for deinstallation events. This type of event is definitely something you want in your analytics but so far have not found any clear solution. Any ideas?
Here's a possible approach. In your Android app, implement support for receiving push messages from Google Cloud Messaging (GGM). Then, implement a server that sends GCM "are you there?" messages to all users at regular intervals (e.g. daily). Google's GCM service will notify your service of all targeted recipients which no longer have your app installed. To correlate uninstall data with other metrics such as app version, user demographics, date of installation, etc, collect that data in your app and supply it to your server when registering for GCM messages. Then when you get notified of an uninstall, match it with the installation data. From there, you could report it to a service like Google Analytics for additional slicing and dicing, graphical visualization, date range comparison, etc.

Twilio sms with interactive replies (we're doing Startup Weekend please help!)

Is it possible to use the Twilio API with the Java SDK to accept/parse replies to SMS messages.
Can anyone point to any documentation that might explain this. So far I have not seen anything that suggests this is possible, but it was possible with Tropo - although it wasn't always "fun".
I would normally take the time to do this research myself, but I'm in the middle of a Startup Weekend so would really appreciate any help.
When Twilio receives an SMS it will request, either via GET or POST the URL you have configured against the number that has just received the SMS at.
You can see the process here: http://www.twilio.com/sms/api
A user texts your number
Twilio receives the text
Twilio makes a request to your application and your app responds.
In the request Twilio makes to your app there will be a body parameter in the GET or POST request. You also have some other data which gets sent - more information can be found in the Twilio documentation here: http://www.twilio.com/docs/api/rest/sms
Once your app receives the request you just need to do any processing required and you could then even SMS the person back to confirm it's being recieved.

What can you use to get an application to be able to receive SMS message?

Do you need to use some kind of provider?
Can you setup your own SMS server?
Does any open source solutions exist?
I am an SMS newbie so any insight on how this is accomplished would be great. I am partial to Java but any language is fine.
This is easy. Yes, you need a "sms gateway" provider. There are a lot out there. These companies provide APIs for you to send/receive SMS.
e.g. the German company Mobilant provides an easy API. If you want to receive a SMS just program a simple PHP / JSP / s.th.else dynamic web page and let Mobilant call it.
e.g.
Mobilant receives a SMS for you
Mobilant calls your web page http://yourpage.com/receive.php?message=...
You do what you need to do
You really don't want to setup your own SMS Server or Center ;-) This is really expensive, takes months to setup and costs some nice ferraris.
Use a provider and pay per SMS. It's the cheapest and fastest way.
I used kannel on a linux box with an old mobile phone connected via a serial cable to the box. Got a pre-paid card in the phone as I was using it for private use only. Worked like a charm!
You might take a look at Gammu if you're running on a Linux box:
http://www.gammu.org
Using Gammu, you can configure it to periodically poll a mobile phone for new SMS messages. When Gammu finds new messages, it can store them in an SQL database. You can then write another program to periodically poll the database and take action on new messages.
Using this general setup I successfully deployed a homemade 2-way SMS application. I configured Gammu to pull messages off of the phone over Bluetooth. Gammu placed them in a MySQL database, which I had a Tomcat web application periodically poll for new messages. When a new message was found, the system processed the message.
This is a somewhat "duct-tape and bailing wire" setup, but it worked quite well and was more reliable than many of the "professional" SMS gateways I tested beforehand. YMMV.
We've used mBlox (http://www.mblox) in the past, as they provide comprehensive international coverage, premium SMS, various levels of Quality of Service vs Price, and a solid Java-based API for both inbound and outbound SMS.
You will need an SMS gateway, googling "SMS gateway" will reveal many. I have used http://www.clickatell.com/products/sms_gateway.php with great success.
I do not know of any open source implementations, but will be monitoring this thread in case someone else does!
First, you need an SMS gateway. Take a look at Kannel SMS Gateway.
Agreed with Kannel. You can set it up on a LAMP server with a GSM modem too.
I'm not up with Java, so here's a nice guide on how to do it in Ruby on Rails: http://www.lukeredpath.co.uk/2007/8/29/sending-sms-messages-from-your-rails-application
If you want to send 'true' SMS you'll need to use an SMS gateway, (use of one is outlined in the above guide).
You can use MMS to send messages, to an email address that looks something like 1234567890# messages.whatever.com. You can use mail functions to do this. There's some information about that here: http://contentdeveloper.com/2006/06/open-source-sms-text-messaging-application/
TextMarks provides a service where they map an incoming SMS to them to an HTTP GET to a URL you provide and then send the response back as another SMS. They don't charge you if you let them add some advertising to the reply SMS. The problem is they don't provide this for free anymore for T-Mobile due to T-Mobile charging them. I'd be willing to pay per message, but they charge $0.20 per user-month, which is rather steep. Anyone know of anyone who provides this service?
You actually don't need an SMS gateway; nearly every cell phone can send/receive SMS messages to/from any email address. I built an SMS service (http://www.txtreg.net) using Nearly Free Speech's ability to forward email to a URL as a POST request. User sends a text to an email address, PHP script processes it, and sends an email right back to their phone.
Try SMS Enabler software. To receive SMS messages it uses a 3G/4G/GSM USB modem connected to a pc. It can forward incoming messages to a URL over HTTP, or store them in a database table, or write them to a CSV file, in real-time.

Categories