2012-04-07 4 views
0

나는 자동으로 안드로이드 2.1에서 들어오는 호출에 응답하는 몇 가지 코드를 찾고 있습니다. 스택 오버플로에서 사용 가능한 스레드를 살펴 보았지만 Android 2.1에서는 작동하지 않는 것 같습니다.안드로이드 2.1에서 자동 응답 전화

누구나 나를 도와 줄 수있는 코드가 있습니다. 미리 감사드립니다.

답변

1

//은 전화 서비스와의 통신 설정 (Tedd의 드로이드 도구 덕분에!)

TelephonyManager tm = (TelephonyManager) getSystemService(TELEPHONY_SERVICE); 
Class c = Class.forName(tm.getClass().getName()); 
Method m = c.getDeclaredMethod("getITelephony"); 
m.setAccessible(true); 
ITelephony telephonyService; 
telephonyService = (ITelephony)m.invoke(tm); 
// Silence the ringer and answer the call! 
telephonyService.silenceRinger(); 
telephonyService.answerRingingCall(); 

LINK1LINK2

+0

ITelephony 안드로이드 2.1의 일부가 아닌 참조하십시오. 위치는 어디입니까? 제 3 자 등급입니까? –

+0

링크를 언급 했습니까? –