2012-05-25 2 views

답변

1

VOIP에서만 안드로이드 애플리케이션은 통화 중 오디오 스트림에 액세스 할 수 없습니다. 스피커폰 모드에서 약간 가짜로 만들 수 있습니다.

+0

스피커폰 모드에서는 어떻게합니까? Tonegenerator 사용 하시겠습니까? –

+0

다음 코드 ToneGenerator mToneGenerator로 시도해 보았습니다. \t \t \t mToneGenerator = 새로운 ToneGenerator ( \t \t \t \t \t AudioManager.STREAM_VOICE_CALL, 100); \t \t \t \t \t \t \t \t \t 경우 (mToneGenerator = 널!) { \t \t \t \t 톤 ++; \t \t \t \t mToneGenerator.startTone (tone, 500); \t \t \t \t 경우 (계조 == 9) \t \t \t \t \t { \t \t \t \t 톤 = 0; \t \t \t \t} \t \t \t} 그러나 다른 한편으로는 –

-2

이 방법을 사용해보십시오(). 사용자의 수와 지연이 나타납니다.

private void call(int profileid) {//call procedure logic 
     ProfileDo profile = adapter.getProfile(profileid); 
     if (profile.getStepCount() == 0) { 
      Toast.makeText(getApplicationContext(), "Please edit the profile and add atleast one value to make a call", 10000).show(); 
      return;} 
      String call = "tel:"; 
     for (StepDO step : profile.getSteps()) { 
      String value = URLEncoder.encode(step.getValue()); 
      int delay = step.getDelay(); 
      String pausesStr = ""; 
      for (int i = 0; i < delay/2; i++) { 
       pausesStr += PhoneNumberUtils.PAUSE; 
      } 
      call += value + pausesStr; 
     } 
     startActivity(new Intent("android.intent.action.CALL", Uri.parse(call)));  
    } 
관련 문제