1. getService
getService与addService函数配对使用,一般使用在Android的C/C++层,一般会指定一个16字节大小的Service名称
IBinder b = ServiceManager.getService(serviceName);
2.getSystemService
getSystemService只能获取在Context.java(frameworks/base/core/java/android/Content)下定义的Service.
FMPlayer mFMPlayer = (FMPlayer)getSystemService("FMPlayer");