I am querying the CallLog content provider and want to identify the column types.
In Honeycomb and more recent (API Level 11+) you can aquire a posts preferred data type by calling the technique Cursor.getType(int columnIndex) which returns among the following types:
How do i make this happen on pre-Honeycomb <11 devices? I have attempted the next: for ( int i = i < cursor.getColumnCount() i++ ) Area_TYPE_INTEGER catch ( Exception ignore ) Area_TYPE_STRING catch ( Exception ignore1 ) Area_TYPE_FLOAT catch ( Exception ignore2 ) Area_TYPE_BLOB catch ( Exception ignore3 ) Area_TYPE_NULL However, the same is tossed. The information is definitely casted within the first type you’re checking for, within this situation getInt(). Which means, I recieve the right values when the column type is Integer but a for those other forms.