Android Telephony InternalsWord格式文档下载.docx

上传人:b****5 文档编号:8485645 上传时间:2023-05-11 格式:DOCX 页数:13 大小:29.55KB
下载 相关 举报
Android Telephony InternalsWord格式文档下载.docx_第1页
第1页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第2页
第2页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第3页
第3页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第4页
第4页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第5页
第5页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第6页
第6页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第7页
第7页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第8页
第8页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第9页
第9页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第10页
第10页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第11页
第11页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第12页
第12页 / 共13页
Android Telephony InternalsWord格式文档下载.docx_第13页
第13页 / 共13页
亲,该文档总共13页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

Android Telephony InternalsWord格式文档下载.docx

《Android Telephony InternalsWord格式文档下载.docx》由会员分享,可在线阅读,更多相关《Android Telephony InternalsWord格式文档下载.docx(13页珍藏版)》请在冰点文库上搜索。

Android Telephony InternalsWord格式文档下载.docx

PhoneStateListener 

classesrelyonthistocommunicatewithPhoneApp.The 

ServiceManager 

classisalsoused.

Tomarshalldataforremotemethods,thepackageincludesAIDLfiles.Forinstance,thefollowingAIDLcomesfrom 

IPhoneStateListener.aidl:

onewayinterfaceIPhoneStateListener{

voidonServiceStateChanged(inServiceStateserviceState);

voidonSignalStrengthChanged(intasu);

voidonMessageWaitingIndicatorChanged(booleanmwi);

voidonCallForwardingIndicatorChanged(booleancfi);

//weusebundlehereinsteadofCellLocationsoitcangettherightsubclass

voidonCellLocationChanged(inBundlelocation);

voidonCallStateChanged(intstate,StringincomingNumber);

voidonDataConnectionStateChanged(intstate);

voidonDataActivity(intdirection);

}

15.2.2.Theandroid.internal.telephonyPackage

ThispackagecontainstheclassesandinterfacesPhoneAppusestoprovideservicestootherapplicationsthatwanttostartphonecalls,andclassesthatdefineanAPItotheRIL.

PhoneApp,likeallpartsofAndroid,istheoreticallyreplaceable.IfyourapplicationneedstomodifytheclassesusedbyPhoneApp,yourapplicationwillprobablyhavetoreplaceormodifyPhoneApp,andshouldprovidethesameservicestootherapplications,usingtheclassesinthispackage.

ThedescriptionoftheseclassesshouldhelpyouunderstandhowAndroidinterfacestoamobileradio,andthecapabilitiesthatareexposed—andnotexposed—by 

PhoneApp 

tootherapplications.Thisisalargeandcomplexpackage,andacompleteunderstandingwillrequirereadingtheAndroidsourcecode.Thesedescriptionswillhelpyoufindwheretostartforyourpurposes:

ATParseEx

Extends 

RuntimeExceptionandisthrownbymethodsofthe 

ATResponseParser 

class.

ATResponseParser

Thisclassparses 

partoftheATcommandsyntaxusedtocommunicatewiththemobileradiohardwareinamobilehandset.Thisis,infact,acommandsyntaxverymuchliketheATcommandsyntaxusedbymodems,astandarddescribedinthe3GPPdocumentnumberTS27.007andrelatedspecifications.Thisprotocolforcontrollingmobileradiosiswidelyused.

Call

Thisclassisan 

abstractbaseclass.Otherclassesuseitasabasisforobjectsthatrepresentphonecallsandthestateofthosecalls.

CallerInfo

Thisclass 

holdsinformationaboutthepartythatoriginatedanincomingcall.ThisclassstartswithcallerIDinformationfromthemobilenetworkinterfaceandlooksupotherinformationaboutacallerinthedatabaseofcontacts.

CallerInfoAsyncQuery

enablesasynchronousdatabasequeriesforinformationthatcouldbefoundaboutacallerbasedonthecallerIDinformation.

CallStateException

Theclass 

extendsExceptionandisthrownbymethodsthatmaintaincallstateincaseswherestateisinconsistent.

Connection

isanabstractbaseclassusedbyotherclasses,andisabasisforobjectsthatrepresentconnectionsonthemobilenetworkandthestateoftheseconnections. 

Connection 

objectscanbeassociatedwitha 

Call 

object,buttheycanalsoexistindependently.ThedatainaConnection 

objectcanbeespeciallyusefulindiagnosingthereasonacallfailed.

DefaultPhoneNotifier

implementsthePhoneNotifierinterfaceinordertoreceivenotificationsfroma 

Phone 

object.ItthenusestheAndroidservicesystemtocommunicatestatetoActivityinstancesthathaveregisteredtoreceivethosenotifications.Seethe 

Handler 

Mailbox 

classesforinformationonhowtoreceivenotifications.

IPhoneStateListener

This 

interfacedefinesthesignaturesofmethodsanapplicationimplementstoreceivenotificationofcallstatechange,andchangestoforwardingandmessage-waitingstates.

IPhoneSubInfo

Thisinterface 

isusedtoobtainsubscriberinformation.

ITelephony

interfacedefinestheinter-processinterfaceusedinTelephonyManagertoenableapplicationstocommunicatewithPhoneApp.

ITelephonyRegistry

interfaceisthecallbackinterfacefromtheRILdaemon.

MmiCode

interfacedefinescallbacksrelatedto"

MMIcodes."

Thesearespecialnumbersausercandialandkeysequencesthatausercanenterduringacalltoaccess,control,andadministersupplementaryservices,suchascallwaiting,callhold,etc.MMIcodesandrelatedfunctionalityaredescribedinthe3GPPdocumentnumberTS22.030.

Phone

interfaceincludescallbacksandmethodsforaccessingthestateofamobilephone.

PhoneBase

classisanabstractbaseclassthatimplementsthePhoneinterface.

PhoneFactory

classcontainsmethodsusedtocreateinstancesofthe 

GSMPhone 

class,asubclassofthe 

PhoneNotifier

specifiestheAPIatelephonyimplementationusestonotifyaphonestatelistenerofstatechanges.

PhoneStateIntentReceiver

classhandles 

Intent 

objectsthathaveintenttypesspecifiedinthe 

Tele⁠pho⁠nyIn⁠tents 

class.ThisclassenablesAndroidapplicationstousetheIntentssystemtoobtainphonestateinformation.

PhoneSubInfo

containsmethodsforobtaininginformationaboutamobileservicesubscriber,suchastheuniqueidentifyingnumberforthehandset(IMEI),theuniqueidentifyingnumberforthesubscriber(IMSI),theserialnumberoftheSIMcard,etc.

SimCard

interfacedefinestheAPIforaccessingtheSIMcard.

TelephonyIntents

definesconstantsforbroadcastintentsthathavesimilarfunctionalitytotheTelephonyManagerAPI.

TelephonyProperties

definestheconstantsusedwiththe 

SystemProperties 

classforsettingandgettingtelephony-relatedproperties.

TheseclassesarenotdocumentedintheAndroidSDKdocumentation,butthedescriptionshereshouldgiveyousomeunderstandingofthesourcecodefortheseclasses.

15.2.3.Theandroid.internal.telephony.gsmPackage

ManyoftheclassesandinterfacesintheprevioussectionaretypicalofaJavaAPIthatcanhavemultipleimplementations.TheimplementationsoftheAPIdefinedinthe 

telephony.internal 

packagecorrespondtoalibraryusedintheRIL.TobetterunderstandthisAPI,wewilllookatoneimplementationherethatsupportsGSM.

Thus,thissectiondelvesfurtherintothetelephonyinternalsofAndroid,lookingespeciallyathowtheinterfacesandabstractbaseclassesareimplementedandsubclassedtoenableaccesstothefunctionalityofGSMtelephony.AlthoughitmayseemthatspecificationssuchasTS27.007covermobiletelephonyingeneral,thislayerofAndroidactuallyhastoaccommodatevariationsinmobiletelephonystandards.InCDMAtelephony,forinstance,theSIMcardisanoptionalpartofthestandardandisrarelypresentinCDMAhandsets.Inthiscase,thepackagedescribedinthissectionwouldbereplacedbyaCDMA-orientedpackagewithasimilararchitecturalrelationshiptothehigher-levelclassesdescribedintheprevioussection.TheRILcodeisalsospecifictothetypeoftelephonyinthehandset.

AttheRILlayer,thedifferencesbetweenGSMandCDMAaremainlyoutsidethecorefunctionalityofmakingphonecalls,soyoumaybewonderingwhyalltheselayersandAPIsarenecessary.But,asthedescriptionoftheclassesspecifictocommunicatingwithaGSMRILwillshow,thereareplentyofdifferencesindetail,suchasSIMcards,thetypeofmobiledatanetwork,etc.Thesemakeitimpracticaltodesignauniversalinterfacetomobileradios,despitetheuseofastandardprotocolforcommunicatingwiththem:

AdnRecord

Thisclassisusedtoloadandstore 

AbbreviatedDialingNumbers(ADNs)toandfromtheSIMcard.ADNsareshortnumbersusedforinformationcalls,emergencycalls,etc.

AdnRecordCache

Thisclasscaches 

andenablesaccesstoADNs.

ApnSetting

holdsdataspecifyingtheaccesspointname(APN)andotherparametersforconnectingtoGeneralPacketRadioService(GPRS)and3Gmobiledatanetworks.ThismobiledatatechnologyisspecifictoGSMnetworks.

BaseCommands

ThisclassimplementstheCommandsInterfaceinterface,whichisusedthroughoutthe 

GSM 

telephonyclassestocommunicatewiththeGSMradio.

CallFailCause

interfacedefinesconstantsfordecodingfailurecausecodes.

CallForwardInfo

Thisclassholds 

datathatcorrespondstotheparametersofacall-forwardingcommandtotheRIL.

CallTracker

mapsinformationfromtheRILtostatetransitionsforthe 

GSMCall 

CommandException

isanexceptionthrownwhentheRILreportsanerrorfromacommand.

CommandsInterface

definestheAPItotheGSMRIL.Thisinterfaceisimplementedbythe 

BaseCommands 

DataConnectionTracker

Thistracks 

thestateofGPRSpacketdataprotocol(PDP)connections.ThistypeofconnectionisspecifictoGSMmobiledata.

DataLink

implementstheDataLinkInterfaceinterfaceandisusedinthe 

PPPLink 

class,whichmanagespointtopointprotocol(PPP)linksinGPRSnetworking.

DataLinkInterface

class

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 幼儿教育 > 幼儿读物

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2