2011-06-13 5 views
0

내가 게시물을 How to send image via MMS in Android? 사용하여 프로그래밍 방식으로 MMS를 전송하려고를 전송하는 동안 ....문제 MMS

나는 APN은 MMSC, MMSProxy 및 MMSPort 값 검색하기 위해 노력하고, 하지만 MMSProxy 및 MMSPort에 대한 값이 비어 있습니다. "Settings -> Wireless & Networks -> MobileNetworks -> AccessPointNames -> MMS ->" 을 탐색하여 HTC 장치에서이 값을 확인했습니다. 하지만 여기에 실제로 아무 것도 MMSProxy 및 MMSPort에 대해 설정되었습니다 .... 하지만 수동으로 MMS를 보낼 수 있습니다 ..
MMSProxy 및 MMSPort 값을 얻는 방법을 알려주세요 .. 또는 plz 내게 내장 된 MMS 신청서 다른 기계 장치를 사용하여 MMS를 보냅니다 .. ??

PLZ는

+0

APN을 가져 오는 데 문제가 있습니다. http://stackoverflow.com/questions/14452808/sending-and-receiving-sms-mms-in-android – toobsco42

답변

0

그것은 중요하지 않을 수는, 프록시는 "대체"경로를 의미 할 수있다 ...이 날 도움이됩니다. MMS를 보내면 대체 경로가 필요하지 않으므로 null일까요?

내장 된 MMS 앱은 TransactionSettings.java라는 클래스를 사용하며 해당 클래스는 Telephony 콘텐츠 공급자 (코드 발췌문)를 쿼리합니다.

public TransactionSettings(Context context, String apnName) { 
    String selection = (apnName != null) ? APN + "='" + apnName.trim() + "'" : null; 

    Cursor cursor = SqliteWrapper.query(context, context.getContentResolver(), Uri.withAppendedPath(Uri.parse(TELEPHONY_CONTENT_URI), "current"), 
      APN_PROJECTION, selection, null, null); 

    if (cursor == null) { 
     Log.e(TAG, "Apn is not found in Database!"); 
     return; 
    } 

    boolean sawValidApn = false; 
    try { 
     while (cursor.moveToNext() && TextUtils.isEmpty(mServiceCenter)) { 
      // Read values from APN settings 
      if (isValidApnType(cursor.getString(COLUMN_TYPE), APN_TYPE_MMS)) { 
       sawValidApn = true; 
       mServiceCenter = cursor.getString(COLUMN_MMSC).trim(); 
       mProxyAddress = cursor.getString(COLUMN_MMSPROXY); 
       if (isProxySet()) { 
        String portString = cursor.getString(COLUMN_MMSPORT); 
        try { 
         mProxyPort = Integer.parseInt(portString); 
        } catch (NumberFormatException e) { 
         if (TextUtils.isEmpty(portString)) { 
          Log.w(TAG, "mms port not set!"); 
         } else { 
          Log.e(TAG, "Bad port number format: " + portString, e); 
         } 
        } 
       } 
      } 
     } 
    } finally { 
     cursor.close(); 
    } 

나는이 방법을 사용하며 여전히 null 값을 얻는다.

어쩌면 당신은 행운을 빕니다.

관련 문제