android - Loop through content resolver columns when we dont know all the columns' datatype -


i want loop thru columns of content resolver print values. possible when dont know data type of each column?

i did below, fails null pointer exception. getstring wont work data types.:

while(c.movetonext()){ bw.newline(); for(int i=1;i<=c.getcolumnnames().length;i++){  if(i!=1) bw.write("\t");  bw.write(c.getstring(i-1));  } } 

appreciate response

have @ following link solve problem

getting type of column in sqlite


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -