Will Verduzco · Dec 1, 2013 at 06:00 pm

Write to SMS Content Provider in KitKat without Being Default SMS App

Alongside the various user-facing and security-related changes introduced Android 4.4 KitKat, Google also significantly modified how the SMS Content Provider works. In Android 4.4, users can now select a default SMS app from within Settings -> Wireless & Networks. Then, two intent broadcasts are sent: one for all SMS apps (SMS_RECEIVED_ACTION) and one for only the default SMS app (SMS_DELIVER_ACTION). Thus, non-default SMS apps are able to receive incoming SMS messages, but they are not able to do certain things such as abort the broadcast.

Despite the positive effect on software modularity afforded by being able to select a default SMS app, the change also brings a few limitations. Namely, in order to delete (or restore) an SMS message, your app must temporarily become the default app if it isn’t already. This is problematic from a UX standpoint because there will be two mandatory prompts, where the user must select the default SMS app: one to select your app and one to revert.

Thankfully, XDA Senior Member stepic came up with a workaround that allows app developers to write to the SMS Content Provider in KitKat without being the default SMS app. Stepic made his discovery by looking in the Android source code and finding a special permission: OP_WRITE_SMS. Unfortunately, this workaround either requires user interaction or root access. However, this is only a one-time affair, rather than two prompts for user input every time a non-default SMS app needs to perform certain tasks.

If you’re an app developer looking to make an SMS app for KitKat, head over to the guide thread to learn more about this workaround.


_________
Want something on the XDA Portal? Send us a tip!

Will Verduzco

willverduzco is an editor on XDA-Developers, the largest community for Android users. Will Verduzco is the Portal Administrator for the XDA-Developers Portal. He has been addicted to mobile technology since the HTC Wizard. But starting with the Nexus One, his gadget love affair shifted to Google's little green robot. He is also a Johns Hopkins University graduate in neuroscience and is now currently studying to become a physician. View willverduzco's posts and articles here.
Mathew Brack · May 5, 2015 at 04:02 pm · 3 comments

T-Mobile Steps Up The War Against Verizon

T-Mobile has today launched a new attack on Verizon under the tagline of “Never Settle For Verizon” complete with eight new adverts and risk free trials for their customers. This is in retaliation to the new campaign from Verizon sharing the same name as One Plus's "Never Settle".     Following the latest “Never Settle” advert campaign from Verizon, T-mobile has surprisingly agreed, you shouldn't settle … For Verizon and to reinforce this point they have launched no less than eight...

XDA NEWS
Faiz Malkani · May 5, 2015 at 01:01 pm · 4 comments

Google #StepInsideAdWords Event Livestream

Ahead of the annual I/O conference scheduled to take place later this month, the Google AdWords team is set to unveil a host of new products aimed at better mobile experiences, improved event-tracking, scalability and more. Yesterday, a video highlighting the upcoming features was launched on the AdWords blog, and the event itself is scheduled to take place today at 9:30 AM PST / 12:30 PM EST. You can watch the live stream right here on this page, and while it doesn't require registration....

XDA NEWS
Emil Kako · May 5, 2015 at 12:02 pm · 4 comments

How Much Do You Pay for Your Wireless Bill?

With so many different carriers and options to choose from, it can sometimes be quite a task looking for the best deals. Every carrier is battling it out to win over your hearts (and wallets), but which company offers the most bang for your buck? Let us know which carrier you subscribe to, how much you pay for your wireless bill, and what it comes with.

DISCUSS
Share This