How to change the default sound of the alarm
Hi All,
I need to change the default sound of the alarm with my appliction's sound.
I am using [B][COLOR="Blue"]RASCliSession[/COLOR][/B] class to do so.
I'm trying to [B]silent the alarm default sound [/B]and playing mine.
i.e. as soon as the status in RunL is [B][COLOR="blue"]EAlarmChangeEventTimerExpired[/COLOR][/B] i'm trying with the following APIs to silent the default sound :
1>[B]SetAlarmSoundState( EAlarmGlobalSoundStateOff )[/B]
2>[B]SetAlarmSoundsSilentFor()[/B]
3>[B]AlarmSoundsTemporarilySilenced()[/B]
4>[B]SetAlarmSoundsSilentUntil()[/B]
But none of the API's are able to make it silent.
[B]Experts plz reply and tell the solution or other way around to change the default sound of alarm.[/B]
I'm very needfull.Plz reply.I will appreciate every single reply.
Re: How to change the default sound of the alarm
If i can know what all capabilities you have given to the application .
Re: How to change the default sound of the alarm
[QUOTE=skumar_rao;428081]If i can know what all capabilities you have given to the application .[/QUOTE]
ReadUserData WriteUserData ReadDeviceData WriteDeviceData SwEvent UserEnvironment Location NetworkServices SurroundingsDD
Re: How to change the default sound of the alarm
Hi,
Its really strange, Please verify all the capability that are required and import the mmp once again.
have you checked the return value of the API?
Re: How to change the default sound of the alarm
Try this code
/* 06/17/2008 17:40.00.000000 */
_LIT(KMiddleDateTime,"20080617:174000.000000");
RAlarmServer almServer;
TAlarmInfo almInfo;
TTime time(KMiddleDateTime);
almInfo.iAlarmId = 0;
almInfo.iMessage = _L("Hello Pramod");
almInfo.iSound= _L("C:\\System\\Apps\\Sound\\soundfile.wav");
almInfo.iAlarmTime = time;
almServer.SetClockAlarm(almInfo.iAlarmId,almInfo.iAlarmTime,almInfo.iMessage,almInfo.iSound,EAlarmClockOnce);
almServer.AlarmEnable(ETrue,almInfo.iAlarmId);
Re: How to change the default sound of the alarm
[QUOTE=kkrish;428131]Hi,
Its really strange, Please verify all the capability that are required and import the mmp once again.
have you checked the return value of the API?[/QUOTE]
Thanks for the reply...yeah i cross checked all the required capabilities(however all needed are added) also I again imported the application but no benifit.
I have also checked with the return value of the API eg. SetAlarmSoundsSilentFor() is returning KErrNone which if successful.....SetAlarmSoundState( EAlarmGlobalSoundStateOff ) is also successfull.....but not giving the expected answer.
However AlarmSoundsTemporarilySilenced() is returning EFalse (sounds are not silent)....but i'm using it correctly
[B]So if its not possible to make it silent?
Plz tell whether [U]any other way[/U] is there to [U]overwrite or [/U][U]replace[/U] the existing alarm sound?[/B]
Re: How to change the default sound of the alarm
[QUOTE=murthy.pramod;428146]Try this code
/* 06/17/2008 17:40.00.000000 */
_LIT(KMiddleDateTime,"20080617:174000.000000");
RAlarmServer almServer;
TAlarmInfo almInfo;
TTime time(KMiddleDateTime);
almInfo.iAlarmId = 0;
almInfo.iMessage = _L("Hello Pramod");
almInfo.iSound= _L("C:\\System\\Apps\\Sound\\soundfile.wav");
almInfo.iAlarmTime = time;
almServer.SetClockAlarm(almInfo.iAlarmId,almInfo.iAlarmTime,almInfo.iMessage,almInfo.iSound,EAlarmClockOnce);
almServer.AlarmEnable(ETrue,almInfo.iAlarmId);[/QUOTE]
I think RAlarmServer is deprecated in 3rd edition, so i am not able to compile the code. Is there any other workaround using RASCliSession interface.
Re: How to change the default sound of the alarm
Experts plz reply....Plz tell a possible solution to this problem.
Also, I have heard that most of the public API's of RASCliSession do not work.Is it so?
[url]http://wiki.forum.nokia.com/index.php/KIS000639_-_Custom_alarm_sounds_and_categories_are_ignored[/url]
[url]http://discussion.forum.nokia.com/forum/showthread.php?t=102773[/url]
Experts plz do reply......
Re: How to change the default sound of the alarm
Should I assume that this is a known Issue...and there is no solution for this till date ???
So alarm sound cannot be customized with public SDK.Right???
And this problem cannot be solved!
Re: How to change the default sound of the alarm
As you have already seen in the [URL="http://wiki.forum.nokia.com/index.php/KIS000639_-_Custom_alarm_sounds_and_categories_are_ignored"]KIS000639 - Custom alarm sounds and categories are ignored[/URL] known issue the custom alarms are ignored. I will ask for this KI to be reviewed, to see if there are any changes in the alarm server implementation but I would not expect miracles.
You can try changing the global clock alarm setting but that would make all alarms to sound the same, only different than what the user has already set as a preference. Not necessarily a good idea. Alternatively you can try to use the RSheduler to wake up your application at the preset alarm time in order to play your choice of media file.
P.S. I've noticed your requests for expert help. Well, there are so many excellent contributors on these boards that can provide at least as good advice as a "Forum Nokia Expert". If however you feel that you need more focused assistance please consider using the [URL="http://www.forum.nokia.com/main/technical_services/technical_support/index.html"]Technical Support[/URL] service.