Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SMSManager is Deprecated

Tags:

android

sms

i have included this file in a project of android 2.3.3

import android.telephony.gsm.SmsManager;

It shows the code as follows(strikes out the smsmanager text)
import android.telephony.gsm.SmsManager;
and a shows message "SmsManager is deprecated"
how can i fix this?

like image 351
AndroidLearner Avatar asked Jul 10 '12 08:07

AndroidLearner


2 Answers

According to the doc here :

This class is deprecated. Replaced by android.telephony.SmsManager that supports both GSM and CDMA

Since API 4.

like image 172
AMerle Avatar answered Oct 08 '22 22:10

AMerle


android.telephony.gsm.SmsManager is deprecated and was replaced by android.telephony.SmsManager that supports both GSM and CDMA. android.telephony.SmsManager is available for API level 4 and up (a.k.a Android 1.6). See the docs. You can use Android.os.Build.Version to figure out which to use on a given platform

like image 29
K_Anas Avatar answered Oct 08 '22 22:10

K_Anas