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!
GermainZ · Mar 4, 2015 at 07:09 pm · no comments

A Look at the Telegram+ Situation

Most of this article doesn't only apply to Telegram+ -- it just happens to be an example that got a lot of coverage elsewhere, with many authors or commentators putting the full blame on Google, Telegram, the Telegram+ developer or even WhatsApp Inc (eh?). In this article, we'll try to look at the different aspects to provide a clear view of what actually happened, and what can (and hopefully will) improve with regards to developers in general and the Play...

XDA NEWS
Aamir Siddiqui · Mar 4, 2015 at 12:11 pm · 2 comments

Multi Boot: The Fall of Nandroid?

Ever since custom recoveries and roms became popular, nandroid backups have been the fall back method for all android enthusiasts, irrespective of their confidence levels. They allow easy backup and restore in case things go wrong, which happens invariably when a modification is being tested. With that being said, how relevant are Nandroid Backups to this day? Back in 2011, when the world of Android was being awed by the likes of the Samsung Galaxy S2, a little modification made its appearance...

XDA NEWS
Emil Kako · Mar 4, 2015 at 11:49 am · 1 comment

HTC One M8 Owners: Upgrade to the M9, or Skip?

While HTC's latest flagship brings many new features, the aesthetic design of the device remains largely untouched in comparison to its predecessor. Many Android enthusiasts throughout the community were expecting a large redesign of one of the most beautiful handsets ever released, but what we got is something more along the lines of an 'HTC One M8S". So this begs the question, is the M9 worth the upgrade if you already own the M8? Current HTC One M8 users chime in and let us know your thoughts.

DISCUSS
Share This