How to send App to App message - android

Is there a way to send messages directly from application to application? I'm making an app that needs verification from another phone, but I only send the messages via SMS, so there is a big chance that a false message having the same format might end up being recognized by the application as a legit one.

I don't think it's possible. For functionality like this you would usually use server, and, maybe Google Cloud2Device to send Push messages.

If both phones are in close proximity to each other, you could make a bluetooth connection and transfer the data that way. It would work like that Bump app that transfers files when the phones are bumped together.
As a work around to the way you are doing it now, you could do a simple encryption of the messages so that they are not plain text and won't match a real text message. If you wanted to make it pretty, you could encode the data in a picture so it doesn't look like a garbage text to the end user.

Related

Sending Too much messages programmatically in Android jellyBean

I'm trying to send Text messages to different contacts in a bulk. The contacts are several hundred and i'm reading them from a text file. Now when my app tries to send messages , A Dialog Appears telling
App is sending too much messages => Allow , Deny
I've studied several forums that it's a restriction introduced in JellyBean to prevent malicious activity and it can't be undone without rooting your device and running some weird scripts. Is there a fix to this problem? if there isn't any fix , then can we Programatically click Allow button on that message dialog within our app?
Thanks in advance.
Is there a fix to this problem?
Send fewer messages.
Or, send the messages at a slower rate.
Or, use some sort of online SMS gateway to send the messages, perhaps through a serve of yours, rather than sending them through Android's SmsManager. You can find some of these by searching for online sms gateway on your favorite search engine.
can we Programatically click Allow button on that message dialog within our app?
No. The point behind the block is so that the user gets a vote as to whether your app can spend quite so much money (or SMS allotment from a post-paid plan) on the user's behalf. Bulk SMS is not designed to be done from Android, but rather from an online SMS gateway.

Sending messages between Android Wear & Mobile?

I'm writing an app which sends a predefined message to a predefined number. It then gets the response and displays this to the user. I've got the mobile side working, and I am now working on the Wear app, however have become a little stuck as to how to do it.
I've managed to send the message from the Wear device by implementing a listener on the mobile app, which then triggers the activity to send a message. What I can't figure out how to do, is that the response the app gets and send it back to the Wear device.
Looking here:https://developer.android.com/training/wearables/data-layer/index.html
I have used the MessagesAPI for sending the message, however unsure what to use if I want to receive a message. Does anyone know what the best way to do this would be? My initial instinct says I'm going to have to ditch the messagesApi and use the Data one?
You should send the response the same way you used to send the first message, but this time the wearable will be listening for messages (usually in your WearableListenerService).
Take a look at this: https://github.com/heinrisch/talkclient
Either you can use the library or look at the code. I would look at the code, its quite easy to follow.
It sounds like you can use either data or message api, depending on your needs. To receive a message you either have the app active and get it though a listener, or you create a service.

Use of text messages to communicate between two phones through android application

Is there a way to communicates between application running on two different android phones without the server in between?
I thought that simple information can be sent using text messages which instead of going to user application reads.
Is it possible?
Also if it is, will it also work for iphone?
Is there any way other than text, I can use without server?
You can, you don't want to. If you send a text message, it will appear in the user's messaging app. That would be a bad user experience. Also many users pay per sms message at obscene rates (compared to data)- they won't appreciate it at all.
Also, remember that SMS is limited to 160 bytes per message, messages may not be received in order, and may not be received for hours (or never). So you need to account for all of those facts when you write both the sending and receiving side. So its very limiting.
If you do decide to do this, use port based sms. That way it may not appear in the regular text messaging app.

capture the Sms exactly before being sent

I’m trying to develop an application to do some manipulation (compression and security matters) on the outgoing Sms regardless of the composer application. The main challenge is that I cannot capture the Sms exactly before being sent. For instance the user compose the message body using Go Sms Pro and when the send button is pressed , right before the sms is actually sent we capture it and do the compression and security matters on .
Any solution or replacement idea appreciated.
Starting with KitKat, the SMS content provider has been opened up (finally): http://developer.android.com/about/versions/android-4.4.html
To make this work with previous versions of android, you could set up a content observer to watch content://sms/, query the appropriate tables in that database, and then do whatever you like to erase the message before it goes out. This is just a thought mind you, but whatever you do will likely involve using this method.
This is not possible, short of via your own custom build of the Android OS. You have no ability to intercept, let alone modify, the calls from an arbitrary app via SmsManager to the OS to send an SMS message.

Android: Is there an onSMSSend event?

I've got an idea for an Android Application, however I am unsure if it would work. Essentially what I want to do is "intercept" all text messages sent from any SMS App and make modifications to them.
For example, say I write out the following SMS:
Hi {Name}, how are you today? Can you tell {Boss} I'll be 15 minutes late today.
The onSMSSend function in my application(assuming it is currently running in the background) would then be able to edit the content of the message(Eg. Replacing variables with ones defined in the application), and then send it on to the recipient.
Is Android able to provide this functionality?
No it is not. Android may be able to inform you after an SMS was send. But there is no way to intercept a message that should be sent and apply changes to it on a non rooted phone.
What you could do is to write a new messaging App that allows the user to type a message, choose a number and send the message. Now you have full control over the message that is send but building a replacement for the sms app is a fair amount of work.

Categories

Resources