How to set default open with(dialog) option to my android app? -
i have file in devise called test.csv. when click on file opened through app.how set default open with(dialog) option app in android?
above sample dailog.how add app dialog list?
i think may want read csv file. csv file path. see following.
public static void readcsv(file file) { bufferedreader reader = null; stringbuilder stringbuilder = new stringbuilder(); try { inputstreamreader isr = new inputstreamreader(new fileinputstream(file));// csv file reader = new bufferedreader(isr); string line = null; // every time read 1 line while ((line = reader.readline()) != null) { stringbuilder.append(line); stringbuilder.append("\n"); } } catch (exception e) { e.printstacktrace(); } { try { reader.close(); } catch (ioexception e) { e.printstacktrace(); } } }
the stringbuilder.tostring() csv file's content. sorry english.
Comments
Post a Comment