1.在MmsCofig.java文件中添加 
private static int mSmsToMmsTextThreshold = N;
public static int getSmsToMmsTextThreshold() {
return mSmsToMmsTextThreshold;
}
并在loadMmsSettings(Context context)方法的else if ("int".equals(tag))分支中添加
else if ("smsToMmsTextThreshold".equalsIgnoreCase(value)) {
mSmsToMmsTextThreshold = Integer.parseInt(text);
}
2. 在MmsConfig.xml文件中新增 // sergeycao
<!-- Maximum number of SMS message segments in a long text message before converting
the SMS message to an MMS message. -->
<int name="smsToMmsTextThreshold">N</int>
3.在WorkingMessage.java中添加方法
public void setLengthRequiresMms(boolean mmsRequired) {
updateState(LENGTH_REQUIRES_MMS, mmsRequired, true);
}
4. 在ComposeMessageActivity.java文件的updateCounter(CharSequence text, int start, int
before, int count)方法中添加:
// Force send as MMS once the number of SMSes required reaches a configurable
threshold.
mWorkingMessage.setLengthRequiresMms(msgCount >=MmsConfig.getSmsToMmsTextThreshold());
        private static int mSmsToMmsTextThreshold = N;
public static int getSmsToMmsTextThreshold() {
return mSmsToMmsTextThreshold;
}
并在loadMmsSettings(Context context)方法的else if ("int".equals(tag))分支中添加
else if ("smsToMmsTextThreshold".equalsIgnoreCase(value)) {
mSmsToMmsTextThreshold = Integer.parseInt(text);
}
2. 在MmsConfig.xml文件中新增 // sergeycao
<!-- Maximum number of SMS message segments in a long text message before converting
the SMS message to an MMS message. -->
<int name="smsToMmsTextThreshold">N</int>
3.在WorkingMessage.java中添加方法
public void setLengthRequiresMms(boolean mmsRequired) {
updateState(LENGTH_REQUIRES_MMS, mmsRequired, true);
}
4. 在ComposeMessageActivity.java文件的updateCounter(CharSequence text, int start, int
before, int count)方法中添加:
// Force send as MMS once the number of SMSes required reaches a configurable
threshold.
mWorkingMessage.setLengthRequiresMms(msgCount >=MmsConfig.getSmsToMmsTextThreshold());
                  
                  
                  
                  
                            
本文介绍如何通过修改MmsCofig.java和MmsConfig.xml文件来设置短信转换为多媒体消息(MMS)的文本长度阈值,并展示了如何在WorkingMessage.java及ComposeMessageActivity.java中实现相应功能。
          
      
          
                
                
                
                
              
                
                
                
                
                
              
                
                
              
            
                  
					536
					
被折叠的  条评论
		 为什么被折叠?
		 
		 
		
    
  
    
  
            


            