Android官方API文档完整版,内容参考:onBindpublicfinalIBinderonBind(Intentintent)从类Service复制的描述Returnthecommunicationchanneltotheservice.Mayreturnnullifclientscannotbindtotheservice.ThereturnedIBinderisusuallyforacomplexinterfacethathasbeendescribedusingaidl.Notethatunlikeotherapplicationcomponents,callsontotheIBinderinterfacereturnedheremaynothappenonthemainthreadoftheprocess.MoreinformationaboutthiscanbefoundinApplicationFundamentals:ProcessesandThreads.指定者:类Service中的onBind参数:intent-TheIntentthatwasusedtobindtothisservice,asgiventoContext.bindService.NotethatanyextrasthatwereincludedwiththeIntentatthatpointwillnotbeseenhere.返回:ReturnanIBinderthroughwhichclientscancallontotheservice.
1