Skip to content Skip to sidebar Skip to footer

Save Xml File On Android Device And Read It

I have issues with storing and reading an XML file on my Acer Iconia Tab A 100. The steps I followed are: 1) Plug in the tab to my system. 2) Copy test.xml file from my laptop to A

Solution 1:

File length

publiclonglength()

Returns the length of the file denoted by this abstract pathname. The return value is unspecified if this pathname denotes a directory.

Returns: The length, in bytes, of the file denoted by this abstract pathname, or 0L if the file does not exist

So just check it, whether file exist or not,

By using File.exist();

Also, By looking in File Explorer -> DDMS via eclipse find the exact path of the file. It also show size of the file.

Post a Comment for "Save Xml File On Android Device And Read It"