Wrox Programmer Forums
BOOK: Beginning Android Programming with Android Studio, Fourth Edition
This is the forum to discuss the Wrox book Beginning Android Programming with Android Studio, Fourth Edition by Jerome F. DiMarzio; ISBN: 978-1-118-70559-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Android Programming with Android Studio, Fourth Edition section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 27th, 2017, 03:54 PM
Registered User
Join Date: Aug 2017
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Smile Chapter 9, page 300 sendSMS method

As the book is written, the sendSMS method will only send to the phone or emulator the app is running on. The fix for Android Studio Version 3.00 is to replace following code:
SmsManager sms = SmsManager.getDefault();

with the following code:
SmsManager sms = android.telephony.SmsManager.getDefault();

Rebuilding the app and loading the app to a phone allows the sms message to be sent to different phones :)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 10 page 271 Shuffle method xpw BOOK: Beginning Visual C# 2010 0 February 9th, 2012 06:44 AM
chapter 8, page 300 misken BOOK: Beginning SharePoint 2010 Development 3 September 13th, 2010 05:17 PM
Page 210:Page object calling a private method from BasePage? aperture8 BOOK: Beginning ASP.NET 4 : in C# and VB 6 August 9th, 2010 07:04 AM
Master Page Method: Code-Behind for Content Page kwilliams ASP.NET 2.0 Professional 3 June 2nd, 2008 12:57 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.