Hi,
I'm trying to get the current ringtone programmatically. However when I do so the result I get is gibberish. To be exact: "f@@@ffr"
When I set the ringtone, it does work. I also have the correct capabilities (otherwise setting a ringtone would surely not work)
here's the code snippet I use:
If anyone has a good idea, please tell me. I've been staring too long.... what am I missing? ;^)Code:MProEngEngine* engine = ProEngFactory::NewEngineL(); CleanupReleasePushL(*engine); MProEngProfile* activeProfile = engine->ActiveProfileL(); CleanupReleasePushL(*activeProfile); MProEngTones& tones = activeProfile->ProfileTones(); //query current tone TDesC currentTone = tones.RingingTone1(); //convert to ascii TBuf<255> currentTone16(currentTone); TBuf8<255> currentTone8; currentTone8.Copy(currentTone16); //log the filename to check if it worked char *oldFilename = (char*)currentTone8.Ptr(); int oldFilenameLength = currentTone8.Length(); FILE *fp; fp = fopen("c:\\data\\others\\debug.txt","w"); if(fp) { fwrite(oldFilename, oldFilenameLength, 1, fp); fclose(fp); fflush(fp); }
Thanks
Reinier



