Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7171123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:21:02+00:00 2026-05-28T15:21:02+00:00

I made an application on Android and this application logs the activity into files.

  • 0

I made an application on Android and this application logs the activity into files. I have an option to export the files so I save the files in a .zip. If there is more than 1 file to add to the .zip, I get the following error.

(general purpose flags – local: 808 hex central: 8 hex).
Local and central GPFlags values don’t match.

This only happens with Android 2.3 and using winzip or 7zip. I can bypass this problem using windows explorer or winrar but I would like to solve the problem and not avoid it.

It does not happen using the same application on an Android 2.2 device.

I searched around around and found some comments about encrypting but I am not encrypting anything. I also found some comments on updating certain libraries and such but I’m using Android sdk 11 and java jdk 1.6.0_25.

I tried 2 different codes with the same result

int count = log_.getLogFileList(files_);
if (count > 0)
{                       
String inFileName;
File inFile;
String phoneNumLast =OsmoService.getAccountString(OsmoService.context).substring(6);
long date = files_.get(count - 1).lastModified();
SimpleDateFormat formatter = new SimpleDateFormat("MMddHHmmss");                     
String outdt = new String(formatter.format(new Date(date)));
String outFileName = new String("Dir Name" + "//" + "PREFIX" + "_" + outdt + ZIP_SUFFIX);

File outFile = new File(outFileName);                   
ZipOutputStream zos = new ZipOutputStream( new FileOutputStream( outFile ) );
BufferedOutputStream outBS = new BufferedOutputStream(zos, 8192 );

for (int idx = (count - 1); (idx >= 0) && !isCancelled(); idx--)
{
inFile = files_.get(idx);  
BufferedReader inBR = new BufferedReader(new FileReader(inFile), 8192);                     
inFileName = inFile.getName();
Log.v(LOG_TAG, "MailLogFiles - Zipping " + inFileName);

zos.putNextEntry( new ZipEntry(inFileName));
int zix;
while ( (zix = inBR.read()) != -1 )
outBS.write(zix);
outBS.flush();       
zos.closeEntry();    
inBR.close();
}
outBS.close();

and this

public static void compressFileList( String[] inFiles, String outFile )
throws IOException
{
ZipOutputStream zos = new ZipOutputStream(
new BufferedOutputStream( new FileOutputStream( outFile ) ));
byte data[] = new byte[2048];

  for (int i = 0; i < inFiles.length; i++)
  {
     BufferedInputStream in = new BufferedInputStream( new FileInputStream( inFiles[i] ) );
     zos.putNextEntry( new ZipEntry(inFiles[i]) );
     int count;
     while( ( count = in.read( data, 0, data.length ) ) != -1 )
        zos.write(data, 0, count);
     zos.closeEntry();
     in.close();
  }
  zos.close();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:21:03+00:00Added an answer on May 28, 2026 at 3:21 pm

    I think this is caused by a reported bug that will be fixed in Ice Cream Sandwich:
    http://code.google.com/p/android/issues/detail?id=20214

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made an application that gives the user the option to open up
i have made an android application for Project Build Target as Target name:: Android
I have an Adobe AIR application for Android. Using for this AIR 3.0 and
I made an application in android and used timer like this.. try { CountDownTimer
I have a little problem... I have made an Android application which extends the
I made an application that is using Android SDK 2.1. This application uses bluetooth
I have made a ListView in my android application. But the problem is that
I have an application made in Java for Android platforms, and I need to
I have made an application which has tabs like in HelloTabActivity, there is also
I have an android application created and built in eclipse, it's made of 2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.