I am sending a file in byte[] format from web service to android device.
- If that file is an XML file i.e. byte[] array then how could i convert it to original XML file.
- If that file is an image i.e. byte[] array then how could i convert it to original Image.
I am using android sdk 2.2 on samsung galaxy tab.
Your Webservice should send you some identifier about the file type. whether the byte array is for image or is for general file. then only you can know about which type of file it is. after knowing file type you can convert the byte array into your desired file type. Also you can write to file. If you want to print that xml in logcat you can use
create a file (whether xml or image or anything) if you know the file format
Thanks
Deepak