Email application cannot launch soundrecorder to record sound as email attach...
时间:10-02
整理:3721RD
点击:
It’sanandroidofficialbugwhichcausedbydismatchMIMEtype.
1)DefineMIMEtype"*/*"inSoundRecorder.java
staticfinalStringANY_ANY="*/*";
2)ReviseonCreateinSoundRecorder.java
publicvoidonCreate(Bundleicycle){
super.onCreate(icycle);
Intenti=getIntent();
if(i!=null){
Strings=i.getType();
mWhoStartThis=i.getAction();
if(AUDIO_AMR.equals(s)||AUDIO_3GPP.equals(s)
||AUDIO_ANY.equals(s)||ANY_ANY.equals(s)){
mRequestedType=s;
}elseif(s!=null){
//weonlysupportamrand3gppformatsrightnow
setResult(RESULT_CANCELED);
finish();
return;
}
finalStringEXTRA_MAX_BYTES=android.provider.MediaStore.Audio.Media.EXTRA_MAX_BYTES;
mMaxFileSize=i.getLongExtra(EXTRA_MAX_BYTES,-1);
}
if(AUDIO_ANY.equals(mRequestedType)||ANY_ANY.equals(mRequestedType)){
mRequestedType=AUDIO_3GPP;
}
setContentView(R.Layout.main);