I'm building a simple incremental unzipper class.
It unzips the file in chunks and takes short pauses in between them, using the timer example found in http://wiki.forum.nokia.com/index.ph...implementation.
The pause is held because the zip file to be extracted is pretty huge and I don't want to choke the phone entirely.
For some odd reason when testing this on device the RunL() method is never called after calling the RTimer.After() method. I've implemented similar proggressbar & timer system for a simple audioplayer class I modified from wiki example, which is basically very same as this one. I just can't see why this wouldn't work also.
In emulator everything works fine, the timer calls the IncrementUnzip() and the zip file gets unzipped, and proggressbar updates.
But in device the RunL() isn't called even for the first time after UnzipL() has called the RTimer.After().
Any ideas why this would not work in the device?
Or am I already way off on doing this, and should I just implement CZipExtrator as ActiveObject and not use the RTimer at all?
For clarity I've only included the parts that are went through before the error occurs.
CZipExtractor* self = CZipExtractor::NewLC();
CZipExtractor* self = new (ELeave) CZipExtractor();
iTimer = CIntervalTimer::NewL(CActive::EPriorityStandard,*this);
TInt CZipExtractor::UnzipL(const TDesC& aFileName, const TFileName& aOutputFolder, MZipExtractorCallback* aLogger)
shouldStop = EFalse;
iCallBack = aLogger;
iZipFile = CZipFile::NewL(iFsSession, aFileName);
iMembers = iZipFile->GetMembersL();
iProgressDialog = new ( ELeave ) CAknProgressDialog( reinterpret_cast <CEikDialog**> ( &iProgressDialog ), ETrue );
iProgressDialog->PrepareLC( R_PLAYBACK_DIALOG );
iProgressInfo = iProgressDialog->GetProgressInfoL();
iCallBack->Log(_L("Setting timer")); //This is reached in device & emulator
void CZipExtractor::DialogDismissedL( TInt aButtonId )
shouldStop = ETrue;
void CZipExtractor::TimerExpired(TAny* /*aTimer*/,TInt aError)
iCallBack->Log(_L("TimerExpired")); //This is never reached in device?
if(IncrementUnzip()) //More to unzip
virtual void Log(const TDesC& aTxt) = 0;
virtual void ZipExtractedCallback(TInt aError) = 0;
class CZipExtractor : public CBase, public MProgressDialogCallback, MTimerNotify
static CZipExtractor* NewL();
static CZipExtractor* NewLC();
public: // public functions
TInt UnzipL(const TDesC& aFileName, const TFileName& aOutputFolder, MZipExtractorCallback* aLogger);
public: // implements MTimerNotify
void TimerExpired(TAny* aTimer,TInt aError);
private: // internal functions
private: //private variabled