藍牙車(chē)載產(chǎn)品的兼容性設計
對于號碼字段的提取,關(guān)鍵字不僅是HOME、WORK、CELL、CAR,還要把PREF、VOICE作為可以被識別的關(guān)鍵字,而且有手機不帶關(guān)鍵字,把不帶關(guān)鍵字的處理為CELL即手機屬性即可。
本文引用地址:http://dyxdggzs.com/article/108773.htm呼叫時(shí)間,其字段以X-IRMC-CALL-DATETIME表示,其標準格式舉例如下:20080112T1212,年四個(gè)字節,月和日分別兩個(gè)字節,但對于部分手機,其月和日沒(méi)有嚴格遵循該規范,月+日字段共兩個(gè)字節或共三個(gè)字節,這就需要根據月和日的特性進(jìn)行特殊處理了。處理代碼如下,月日字節數為temp_month_date_length,存放在temp_month_date數組中,
if(temp_month_date_length==2)
{
temp_month=temp_month_date[0]-0x30;
temp_date=temp_month_date[1]-0x30;
}
else if(temp_month_date_length==3)
{
if(temp_month_date[0]>0x31)//then the character must be month
{
//214-2 14
temp_month=temp_month_date[0]-0x30;
temp_date=(unsigned char)((temp_month_date[1]
-0x30)*10+(temp_month_date[2]-0x30));
}
else if(temp_month_date[1]>0x32)
{
//130-1 30
temp_month=temp_month_date[0]-0x30;
temp_date=(unsigned char)((temp_month_date[1]
-0x30)*10+(temp_month_date[2]-0x30));
}
else
{
//114 to month=11 date=4
temp_month=(unsigned char)((temp_month_date[0]
-0x30)*10+(temp_month_date[1]-0x30));
temp_date=temp_month_date[2]-0x30;
if(temp_month>=11)
{
temp_month=0;
temp_date=0;
}
}
}
結語(yǔ)
兼容性是藍牙產(chǎn)品開(kāi)發(fā)中的難點(diǎn)問(wèn)題,本文分析了兼容性問(wèn)題出現的原因,并結合具體實(shí)例分析其解決方法,有很好的借鑒意義。
評論