Sunday, 13 January 2019

Sending an SMS via Intent in Android

Alchemy allows users to donate to their chose charities via text message, which it used to do automatically using Android's SmsManager functionality. Unfortunately, Google have recently updated the Play Store's terms and conditions to restrict SMS_READ and SMS_SEND to applications whose primary purpose is to act as an alternative SMS application on Android (replacing the usual Messages app for example).

I applied for an excemption for Alchemy, but this wasn't granted. This is understandable I think - Android security has a lot of issues, and excess permissions is definitely one of them - Alchemy is a good citizen and only interacts with a single SMS number, but a malicious applicaiton could easily use the same permissions for nefarious purposes.

Without an exemption, there was no choice but to update Alchemy to avoid using SmsManager. This meant instead requesting an existing SMS app to send the donation SMS instead - via an intent. It took me some time to find out exactly how to do this, but the code required to pre-populate an SMS for a user to send is


Uri uri = Uri.parse("smsto:" + charity.getNumber());
Intent intent = new Intent(Intent.ACTION_SENDTO, uri);
intent.setData(uri);
intent.putExtra("address", charity.getNumber());
intent.putExtra("sms_body", keyword);
intent.putExtra("exit_on_sent", true);
if (intent.resolveActivity(getPackageManager()) != null) {
    startActivityForResult(intent, 1);
    donationViewModel.recordDonation(this.donations, charity.getName(), smsKeywordToDonation(charity.getCost(keyword)));
} else {
    Toast.makeText(this, "No SMS provider found", Toast.LENGTH_SHORT).show();
}

The full code can be found on Github. Note that, unfortunately, SMS applications generally do not seem to respect the "exit on sent" request, so the user must navigate back manually. A bonus for this change is that Alchemy now doesn't require any additional permissions from the user. Previous donations must now be stored in Alchemy itself, instead of using SMS history. This may cause some loss of data in the migration, but should result in more robust behaviour from now on.

72 comments:

  1. GPS applications that give kids a simple frenzy catch to advise guardians that there is a crisis, and they require help are by a long shot the best alternatives. sms bomber apk

    ReplyDelete
  2. That’s a nice share. You should definitely be harnessing the collective strength of marketing approaches for the growth of your business. I am really happy that slack to sms app is absolutely wonderful for my business. It is very effective and very affordable as well.

    ReplyDelete
  3. I’m happy I located this blog! From time to time, students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. nice one Tubidy Video APK Download Latest version Free

    ReplyDelete
  4. Wow, cool post. I'd like to write like this too - taking time and real hard work to make a great article... but I put things off too much and never seem to get started. Thanks though. Download prince of persia iso ppsspp

    ReplyDelete
  5. I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page! cyberflix

    ReplyDelete
  6. As it is only a start, we don't know of how fruitful it is. In any case, one thing we can say is that the client experience will improve in future with the dispatch of Instant Apps. download itools crack

    ReplyDelete
  7. Great work. That’s a nice share. You should definitely be harnessing the collective rel="nofollow" Thunderball resultsstrength of marketing approaches for the growth of your business.Can you please give me more information about this.

    ReplyDelete
  8. Whatever the occasion or the purposes, there's one SMS message in this vast collection that will suit you and your purposes. Friends SMS Sharing

    ReplyDelete
  9. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. blackmart apk free download 2016

    ReplyDelete
  10. I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much. smart glass

    ReplyDelete
  11. The motivation behind why such a large number of phones bomb so early is on the grounds that individuals throw them around, recklessly place them on racks, and just when all is said in done don't deal with them as the exceptionally refined bits of innovation that they are. Iphone reparatur Kiel

    ReplyDelete
  12. Be that as it may, the client is allowed to pick their own launcher and customize their telephones. mx player

    ReplyDelete
  13. Accounting Software for the self employed businessman in the UK does not have to be complex. There are different requirements to double entry bookkeeping that anyone self employed may fulfil and Accounting Software available to satisfy those requirements. The most important requirement of any Accounting Software purchased by a self employed businessman being the automated production of the Self Assessment tax return. site

    ReplyDelete
  14. SMS Bomber APK made it easy for us to send many messages at a time. Best bomber apk is a real joy for the people to create some fun with your friends and family
    members
    .

    ReplyDelete
  15. Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. best texting service

    ReplyDelete
  16. Yahoo mail is an web based email service. Yahoo mail service can be accessed through different devices including computer, tablets, smart phones, and more. Users with a valid Yahoo account can sign into Yahoo com to access the features of Yahoo mail. A smile web browser can be used to sign into Yahoo.com. Users can also download Yahoo app to their mobile phone and login to their account. yahoo mail sign in

    ReplyDelete
  17. Stonersdankshop established in 2016 in United States has been the best vape shop exporting vape products online to most vape shops in USA and to vape . big chief extracts

    ReplyDelete
  18. Royal photo Booths Australia At Royal Booths,we want to make a good impression with you, hence we go above & beyond when it comes to forming that initial relationship with our customers.

    ReplyDelete
  19. i can set happening my subsidiary concept from this make known. It offers in intensity opinion. thank you for this necessary endorse for all,.. Whatsapp Marketing Software

    ReplyDelete
  20. Here Are 10 Tips For Unpacking
    Moving with a family is indeed difficult from packing to unpacking, you have to do it all by yourself. You are solely responsible for taking care of all the important things to taking care of your family on the other hand. You have to pack

    ReplyDelete
  21. hiring movers in California

    So, you have decided to take a step ahead and make the very difficult decision of your life that is to relocate or plan a move. This will be the most stressful time you will ever have if you haven’t planned it properly. If you’re planning to move your house or business to an entirely new state or place then you must be cautious about how you will take the things and most importantly, how will you carry them? Right, if yes then choosing the right moving company is what you have to do.

    ReplyDelete
  22. Thank you for sharing the article. The data that you provided in the blog is informative and effective.

    Tableau Training in Hyderabad

    ReplyDelete
  23. Fashion line of beauty

    The Bridal Planner is the leading destination fashion planner based in Goa, India. Founded in 2013, by Sadneep, a former Goa engineer, after her own destination fashion in Goa. With experience as an expatriate of over 10 years in various countries prior to forming The Bridal Planner, Sadneep has gained an appreciation for client expectations of luxury, professionalism and efficiency on an international scale. Her clients have been from all over the world including celebrities and a high profile company which were featured in various media in South East Asia and Europe.

    ReplyDelete
  24. seo fastest

    SEO has never been easier with this new and exclusive SEOFASTEST SEO Planner Tool.
    Just drag and drop your favorite packages into the calendar and hit the order button!
    No multiple order processes anymore! Buy backlinks with a click of a button!

    ReplyDelete
  25. Superslot

    ซุปเปอร์สล็อต เราคือผู้ให้บริการสล็อตออนไลน์มีตัวเกมสล็อตให้เลือกเล่นจำนวนมากบนมือถืออันดับ 1 ทั้งฟรีเครดิต 50 ,100 , 150 , 200 ที่สามารถ

    ReplyDelete
  26. Superslot

    ซุปเปอร์สล็อต เราคือผู้ให้บริการสล็อตออนไลน์มีตัวเกมสล็อตให้เลือกเล่นจำนวนมากบนมือถืออันดับ 1 ทั้งฟรีเครดิต 50 ,100 , 150 , 200 ที่สามารถ

    ReplyDelete
  27. I felt very happy while reading this site. This was really very informative site for me. I really liked it. This was really a cordial post. Thanks a lot!. receive SMS free

    ReplyDelete
  28. raw feeding, dog Are you a cat or dog owner looking to maximize nourishment for your furry family members? As a pet parent, you naturally strive to provide your pets with the best lifestyle options available

    ReplyDelete
  29. reviewsyard

    At Reviews Yard Blog, we are committed to creating unique and customized content for our users that is useful for detailed information. We focus on applied information and a range of topics that can impact users in different technology areas.

    ReplyDelete
  30. gogoanime

    GogoAnime - Watch anime online in high quality for free. Watch anime subbed, anime dubbed online free. Update daily, fast streaming, no ads, no registration ...

    ReplyDelete
  31. Autoankauf Auf der Suche nach einem seriösen Autoankäufer in NRW sind Sie bei uns genau richtig. Wir garantieren Ihnen eine sichere und seriöse Abwicklung rund um den Autoankauf in NRW.

    ReplyDelete
  32. bokep jav Bokep Indo, Bokep Barat, Bokep Asia, Bokep Gay, Bokep Semi.

    ReplyDelete
  33. Thank you for oder my Gigs. Please share the details guide in the project

    shaw internet plans

    ReplyDelete
  34. kiss anime The best place to watch dub and sub anime online and absolitely for free - KissAnime. With over 10000 different animes - KissAnime is the best source for anime ...

    ReplyDelete
  35. visto per la nuova zelanda Thisare a private website offering our users online application services which include assistance with their application for Electronic Travel Authorization for travel to India. 

    ReplyDelete
  36. voyance telephone espoir. wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also add rss. keep us updated.

    ReplyDelete
  37. new zealand eta New Zealand has in place quite stringent biosecurity laws at its borders to prevent the accidental or intentional entry of harmful pests, germs, foreign pathogens or diseases. All such high risk material, food or non-food related must be declared or be binned/disposed of in marked garbage

    ReplyDelete
  38. I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great : D. Good job, cheers SMS Marketing - massen sms versenden

    ReplyDelete
  39. buy tik tok followers Increase your exposure on social media! Check out our deals and buy Instagram Followers, Buy Youtube Subscribers, and more! Fast, cheap, and 24/7 Support.

    ReplyDelete
  40. "fantastic post, very informative. I’m wondering why the other experts of
    this sector don’t notice this. You should proceed your writing.
    I’m sure, you’ve a great readers’ base already!" 메이저놀이터

    ReplyDelete
  41. "Pretty! This has been an extremely wonderful post. Thank you for providing this information.

    " 토토사이트

    ReplyDelete
  42. Very good article, I enjoyed reading your post, very good part, I want to tweet this to my followers. Thank you 먹튀검증목록

    ReplyDelete
  43. I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You 먹튀검증

    ReplyDelete
  44. Very interesting  information!Perfect just what I was looking  for! 안전놀이터

    ReplyDelete
  45. I am really impressed that there is so much information about this subject that have been uncovered and you’ve done your best, with so much class. 메이저놀이터목록

    ReplyDelete
  46. I was reading some of your content on this website and I conceive this internet site is really informative ! Keep on putting up. windshield crack repair

    ReplyDelete
  47. You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. Auto Reply Text Message

    ReplyDelete
  48. Nice And Awesome Post! So Thanks for Sharing This Information Helpful For Me. If also daily check Satta king Results. And Satta King Gali, Deshawar, Faridabad, Ghaziabad and other sattaking Result.

    ReplyDelete
  49. movie rulz APK Download for Android Mobile, Free Download MovieRulz App Telugu, Tamil, English, Kannada for your Android TV, Android.

    ReplyDelete
  50. Excellent And Awesome Post! So Thanks for Sharing This Information Helpful For Me. If also daily check Satta king Results. And Satta King Gali, Deshawar, Faridabad, Ghaziabad and other sattaking Result.

    ReplyDelete
  51. I read this article. I think You put a great deal of exertion to make this article.

    buy soundcloud plays

    ReplyDelete
  52. I was surfing the Internet for information and came across your blog. I am impressed by the information you have on this blog. It shows how well you understand this subject. flexispy review

    ReplyDelete
  53. slotxo thai


    เกมส์สล็อตออนไลน์เหล่านี้เป็นเกมส์ที่ยอดนิยม และมีผู้เล่นมากที่สุดตั้งแต่ แอพ Slotxo ได้เปิดให้บริการมานั่นเอง จากตัวอย่างจะแสดงให้เห็นได้ว่าเกมส์สล็อตออนไลน์ จาก SLOTXO นั้นมีธีมของเกมส์ที่แตกต่างหลากหลายกันออกไป ไม่ว่าจะเป็นแนว

    ReplyDelete
  54. slot joker

    For a new website, there are many promotions to choose from. HUBJOKER888 is a website that has been launched with an automatic system, whether it is making transactions, applying for membership, depositing, withdrawing, making transactions.

    ReplyDelete
  55. สำหรับท่านที่ต้องการเล่น pgslot ไม่ว่าจะเล่นผ่าน บราวเซอร์ Chrome , Firefox , Safari อื่นๆ เป็นต้น สามารถ ติดตั้งโปรแกรมบรคอมพิวเตอร์บนระบบปฏิบัติการ IOS หรือ Windows และสามารถเล่นได้สะดวกทุกที่บนมือถือที่เป็นสมาร์ทโฟน บน Iphone , Ipad และ Android .

    pg slot auto
    ทางเข้า pg slot
    pg slot โปรโมชั่น
    pg slot ทดลองเล่นฟรี
    pg slot ฝากถอนไม่มีขั้นต่ํา
    pgslot168
    pg slot game
    pg slot demo
    pgslot เครดิตฟรี
    ดาวโหลด pgslot
    pgslot auto
    pgslot 77
    queenslot pgslot
    pgslot download
    slotkub pgslot
    pgslot 100
    slotxd pgslot
    superslot pgslot
    pgslot 311
    สล็อต pgslot
    pgslotฟรีเครดิต
    pgslot สมัคร
    โปร pgslot

    ReplyDelete
  56. We offer all the major sports such as English Premier League, Spanish La Liga, Italian Serie A, UEFA Champions League, French Ligue 1, German Bundesliga 1.


    ป๊อกเด้ง
    sexybaccarat
    เกมฟรีสปิน
    tim369
    โป๊กเกอร์

    ReplyDelete
  57. หนังโป๊ฝรั่ง หนังโป๊ไทย xvideos หนังโป๊เกย์ ดูหนัง 18+ หนังอีโรติก คลิปโป๊นักศึกษา หนัง​โป๊ญี่ปุ่น เย็ดหี แตกใน xnxx Japanese Erotica.

    หนังโป๊ใหม่
    หนังโป๊ฟรี
    หนังx
    ดูหนังโป๊ออนไลน์
    หี
    เย็ด
    ควยเย็ดหี
    xxx
    porn
    free porn
    xnxx
    xvideos
    brazzers
    เอากัน
    คลิปโป๊ไทย
    คลิปโป๊ใหม่
    คลิปหลุด
    หนังav
    เกย์
    หนังโป้เลสเบี้ยน

    ReplyDelete
  58. Citycarpart

    We are a team of enthusiastic developers and entrepreneurs who decided to convert their common experience into this web store. We hope you’ll like it as much as we do and have a great shopping experience here. Our prime goal is to create a shop in which you can easily find whatever product you need.

    ReplyDelete
  59. ULTRACLUB ASIA บาคาร่าออนไลน์ มาตรฐานระดับสากล
    สมัคร ฝาก-ถอน อัตโนมัติทั้งระบบ พร้อมทีมแอดมินมืออาชีพ


    Sexy baccarat
    ไพ่แคง
    ไพ่แคง ออนไลน์
    เทคนิคบาคาร่า
    เว็บคาสิโนออนไลน์
    slotxo
    pgslot
    เว็บเดิมพัน
    บาคาร่า

    ReplyDelete
  60. เว็บไซต์ที่ให้บริการเกมส์เดิมพันคาสิโนออนไลน์ทุกรูปแบบ อาทิเช่น เดิมพัน บาคาร่าออนไลน์ ผ่านมือถือได้เงินจริง ไพ่เสือมังกร ไฮโล รูเล็ต แบล็คแจ็ค เดิมพันเกมส์ไพ่ต่างๆ ป๊อกเด้ง ไพ่แคง น้ำเต้าปูปลา ไพ่สามกอง เป่ายิงฉุบได้เงินจริง ปั่นแปะผ่านมือถือ สามารถเล่นร่วมกับสมาชิกท่านอื่นที่เดิมพันอยู่จริง

    เสือมังกร ออนไลน์
    เสือมังกร วิธีเล่น
    ไฮโลออนไลน์
    ไฮโล วิธีเล่น
    รูเล็ต วิธีเล่น
    เว็บคาสิโน
    แอพคาสิโน
    บาคาร่า

    ReplyDelete
  61. Nice post check my site for super fast Satta king Result also check Sattaking

    ReplyDelete
  62. Your content is very inspiring and appriciating I really like it please visit my site for Satta king result also check
    Sattaking
    Nice post check my site for super fast Satta king Result also check Sattaking
    Nice post check my site for super fast Satta king Result also check Sattaking
    Nice post check my site for super fast Satta Result Result also check Sattaking

    ReplyDelete
  63. you privided very informative content but i have the info about fastest satta king result Sites. this site provides
    Desawar Result superfast,
    सट्टा किंग result before any site in the world. also
    Gali Result at 5 am every morning.
    satta king result everyday, and satta king this sites gives some leaks from the company.
    Gali Result, Desawar Result And satta king this sites are giving superfast results in the world no one gives results and leaks before this sites. satta king this is very old and trusted site witch gives best info about satta king results. your info is also good but i got more informisssion realated satta king and also you contact me on desawar Result so we can join togather and know more about this things

    ReplyDelete
  64. Just admiring your work and wondering how you managed this blog so well. It’s so remarkable that I can't afford to not go through this valuable information whenever I surf the internet!
    discord sms verification

    ReplyDelete
  65. I am really happy to say it’s an interesting post to read . I learn new information from your article , you are doing a great job . Keep it up

    Devops Training in Hyderabad

    Hadoop Training in Hyderabad

    Python Training in Hyderabad

    Tableau Training in Hyderabad

    Selenium Training in Hyderabad

    ReplyDelete
  66. Nice Post Your content is very inspiring and appriciating I really like it please visit my site for Satta King Matka and Satta king disawar or for super fast result satta king delhi also checkout my site Matka Result you can also visit out site satta king result visit us on satta king and satka matka satka my new site SattaKing


    ReplyDelete
  67. thanks for this usefull article, waiting for this article like this again. mobile toilet for rent

    ReplyDelete
  68. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon. Big thanks for the useful info. high dofollow backlinks

    ReplyDelete

AWS Keyspaces - Managed Cassandra review

AWS recently went live with Keyspaces, their managed version of Cassandra ( https://aws.amazon.com/keyspaces/ ). This service is primarily a...