Home » Android » Receiving Cell Broadcast for showing current location (Channel 50) in android

Receiving Cell Broadcast for showing current location (Channel 50) in android

Posted by: admin June 15, 2020 Leave a comment

Questions:

I’ve developed an Android application which shows current location (Channel 50) using Cell Broadcast message. I can’t find any solution to enable/disable cell broadcast using my application. I enabled cell broadcast in standard SMS settings. The application is working well. One problem is that it also showing location name notification area of android and message as standard SMS application. It is annoying.

Is there any solution to prevent showing these messages in notification area and in standard messages and only show in my application?

How to&Answers:

Make sure your BroadcastReceiver has a very high priority, and when you want the SMS not to go to the notifications and database, in your broadcast receiver call the following –

this.abortBroadcast();