Is it possible to fake incoming SMS on Android?

In a certain situation, I want my application to be able to "fake" an incoming SMS message on a user device as a kind of notification. This will save me money when I usually use Twilio to send text to my users, but I know that they already have the application. Is there any way to do this? I guess this will have something to do with Intents and Content Providers, but I don't know where to start.

To clarify: I'm not new to Android, and I respect all the usual notification methods. However, my application will have a choice for text messages, and I would like them to be able to run them for free rather than pay for it. This is intended for use in SMS messages only, and not to replace a regular notification.

+5
source share
2 answers

Yes (although I really do not support this), theoretically it is possible by creating and broadcasting the right intention. In particular, they android.provider.Telephony.SMS_RECEIVEDintend to receive anyone who listens to SMS messages, including the default SMS application. This, in turn, will result in a notification being displayed.

, Android . , ( , ). , PDU, SMS-. , .

, . Notification.

+2

apk ApiDemos-debug.apk, SDK,

<Api Demos> > App > Notification > IncomingMessage

<SDK root>/samples/android-xx/ApiDemos
+1

All Articles