# TIP: Intercept Incoming SMS on Android

DevFeed: [TIP: Intercept Incoming SMS on Android](<https://devfeed.tech/articles/tip-intercept-incoming-sms-on-android-19585.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/tip-intercept-incoming-sms-on-android/>)

Author: Shai Almog

Published: 2017-09-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [App](<https://devfeed.tech/topics/app.md>), [Code](<https://devfeed.tech/topics/code.md>), [API](<https://devfeed.tech/topics/api.md>), [XML](<https://devfeed.tech/topics/xml.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [app](<https://devfeed.tech/tags/app.md>), [callback](<https://devfeed.tech/tags/callback.md>), [code](<https://devfeed.tech/tags/code.md>), [implement](<https://devfeed.tech/tags/implement.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [interface](<https://devfeed.tech/tags/interface.md>), [native](<https://devfeed.tech/tags/native.md>), [permission](<https://devfeed.tech/tags/permission.md>)

## AI overview

This tutorial explains how to intercept incoming SMS messages on Android to streamline application account activation. It covers using a broadcast receiver, registering permissions and the receiver in the manifest through build hints, and exposing the native functionality through an interface and a simple API.

## Source excerpt

Last week I talked about using SMS to activate your application which is a pretty powerful way to verify a user account. I left a couple of things out though. One of those things is the ability to grab the incoming SMS automatically. This is only possible on Android but it's pretty cool for the users as it saves on the pain of typing the activation text. Broadcast Receiver In order to grab an incoming SMS we need a broadcast receiver which is a standalone Android class that receives a specific event type. This is often confusing to developers who sometimes derive the impl class from broadcast receiver... That's a mistake...