用了以下方法:
public boolean isTypeSupported()
{
boolean supported = false;
String version = System.getProperty("microedition.media.version");
if(version != null){
String [] ringType = Manager.getSupportedContentTypes(null);
for(int j = 0;j < ringType.length;j++){
if(ringType[j] == ringTypeString[tempIndex])
supported = true;
}
}
return supported;
}
如果支持的话,client端就会发送请求数据到server端,否则会出现一个Alert警告页面:
if(isTypeSupported())
GameNet.setURL((GameNet.getStringUrl().append("7&ringope=3&id=" + newsType[tempIndex])).toStrin());
else{
Alert alert = new Alert("警告","您的手机不支持此类型音乐",null,AlertType.ERROR);
alert.setTimeout(Alert.FOREVER);
XFort.dis.setCurrent(alert);
}