Which library I have to use to work with archives(like rar, zip) on android. Some sample code. I can’t find any example of archiving files.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you zipping or unzipping? (or both?)
Previously I’ve used ZipInputStream.
The tactic you use may depend on where the Zip is stored (on the SD Card / in the Assets of the APK / in an APK Extension).
If its an asset, for example, you can use AssetManager to open a file as an InputSteam.
If it’s on the SD card, you might want to use ZipFile.
There’s a Java tutorial here that may help:
http://java.sun.com/developer/technicalArticles/Programming/compression/