Cleanup default landmark storage on N97
Hi all,
I've got the following problem: I've converted successfully a data file consisting of approx. 8000 landmarks to lmx format - opening the file by file manager was possible, but during import of these landmarks the landmark application has crashed (closed without error message). Now, it's still possible to open the landmark application but neither it's possible to see the already imported landmarks (nothing is showed) nor it is possible to import or manual create further landmarks. It seems that the only solution (without device resetting) is to cleanup the default landmark storage. OK, one (clean) way might be to write a code snippet in C++ to do this - but my question is: is there another way, e.g. by identifying the corresponding database file on the device an deleting it? By Y-Browser I was not able to find a file like "eposlm.ldb" or any other "*ldb"-files - what is the name of the default landmark database storage file? Where is it stored under S60 5th edt. on a N97?
Thanks in advance.
Re: Cleanup default landmark storage on N97
The database is in a private directory so deleting it is not really an option. Then again, searching private folders is not really an option either ;)
You can try to do cleanup from an application, using the Landmarks API or you can reset the device (after backing-up your other data)
Re: Cleanup default landmark storage on N97
Hi,
thanks - ok, let's try it by C++ code. I've compiled the example app LocationLandmarksRefAppForS60 from N97 SDK v1.0. I've changed the code so that each time the application is starting the landmark database is initialized:
LandmarksEngine.cpp:
[CODE]TBool CLandmarksEngine::StartInitializeDbIfNecessaryL(
MLandmarksOperationObserver* aObserver)
{
// if (iDb.IsInitializingNeeded())
if (ETrue)
{
// Create initialize operation
CPosLmOperation* operation = iDb.InitializeL();
iObserver = aObserver;
iActiveOperation = EInitializeDb;
iStatus = KRequestPending;
SetPriorityAndSetActive();
// Start asynchronous initialization
TBool reportProgress = ETrue;
iLmOpWrapper->StartOperation(operation, iStatus, reportProgress);
return ETrue;
}
else
{
return EFalse;
}
}[/CODE]
When I start the application I found that indeed the application is trying to initialize the database "Database initializing..." but the progress bar is then hanging at approx 99%. I've found in the application and in the library that [CODE]CPosLandmarkDatabase::InitializeL[/CODE] is used for initializing, but this doesn't seem to work. Is there another way?
Thanks.
One addition: Also when I try to delete the complete default database by [CODE]CPosLmDatabasemanager::DeleteDatabaseL[/CODE] it doesn't work - instead, I get the error message "already in use" also when no application is running on the N97.
Re: Cleanup default landmark storage on N97
Sorry - my fault. Of course it was my own application which was opening the default landmark database by OpenL() statement before I've tried to delete it - after changing the code, deletion of default landmark database was possible and my problem has been solved.
Re: Cleanup default landmark storage on N97
[QUOTE=schadan;636395]Sorry - my fault. Of course it was my own application which was opening the default landmark database by OpenL() statement before I've tried to delete it - after changing the code, deletion of default landmark database was possible and my problem has been solved.[/QUOTE]
I have exatly the same problem and need to delete the landmark database. Unfortunately I am not capable of developing my own application to do this. Is it possible for you to upload an application to do this?
Many thanks if you are able to help.
Paul