Itelephony 객체 가져오기

1461 단어
Method method = null;
IBinder binder = null;
try {
method = Class.forName("android.os.ServiceManager").getMethod("getService", String.class);
binder = (IBinder) method.invoke(null, new Object[]{Context.TELEPHONY_SERVICE});
} catch (Exception e) {
Log.e(TAG, "Error msg:" + e);
}
ITelephony mTelephony = ITelephony.Stub.asInterface(binder);

전재 대상:https://www.cnblogs.com/rose-jeff/p/9083848.html

좋은 웹페이지 즐겨찾기