views:

2805

answers:

6

Does anyone know what happend with the android.provider.Telephony ? It is not there anymore.

+1  A: 

If you read this post from the android-developer mailing list you can see that android.provider.Telephony is part of the Open Source releases, but never included as part of the Official SDK.

Meaning you are free to view it, to gain a understanding of how the underlying system works, but you can't actually reference and compile against it in your Android application(s).

-Brian

Brian Gianforcaro
A: 

Thanks Brian, However, it seems Telephony used by code posted on this site http://www.anddev.org/recognize-react_on_incoming_sms-t295.html

In the code excerpt Apress ISBN: 978-1-43021-064-1 by Chris Haseman it is used too.

Here is the code excerpt from ISBN: 978-1-43021-064-1

Telephony class is used for sms messaging, (Context context, Intent intent) { SmsMessage msg[] = Telephony.Sms.Intents.getMessagesFromIntent(intent); ...

Tatyana Solovyeva
A: 

The code you linked to on anddev.org is for SDK version m5-rc14 which is from February, 2008 almost an entire year old. The current SDK version is 1.0, with two releases between it and m5-rc14.

Given the nature of the Android project they have added and removed many interfaces in it's rapid growth/adoption. A lot of people have complained that they are closing out some of the interfaces to some cool parts of the operating system, such as the Telephony interface.

You can check out android.telephony (link) package and see if there is equivalent functionality there.

Brian Gianforcaro
A: 

Yeah, that was my question, to see if anyone knows what pakage to use instead of android.provider.Telephony class. It would be also useful to know if there is a list of replaced classes from previows SDK versions to current SDK 1.0 version (as you mentioned there are a lot of replacements). The book I am referencing ISBN:978-1-43021-064-1 is published in 2009, however code in many places has to be adj. because of these changes in SDKs

Tatyana Solovyeva
A: 

I was able to send an SMS message with the G1 using the following library: android.telephony.gsm.SmsManager

So at least (for the SMS send/receive code) there is an equivalent library available.

Also be sure to check out the TelephonyManager http://code.google.com/android/reference/android/telephony/TelephonyManager.html

This isn't exactly what you were asking about, but it does provide a lot of the functionality you're looking for.

As for the APress book reference in the answer above, I wrote it. As of right now, it's a little out of date (It was published before the 1.0 SDK was published) and I'm almost done updating it. Ahhh the joys of rapidly updating technology.

haseman
A: 

You can also use it to get data from your current reception signal. Check this tutorial:

http://www.firstdroid.com/2010/05/12/get-provider-gsm-signal-strength/

Here they use the telephony manager to get data.

BR, Adrian.

azelez