1. Technical Field
Embodiments of the present disclosure relate to alarm systems and methods, and more particularly to an electronic device, a storage medium and a method for controlling an alarm function of the electronic device.
2. Description of Related Art
Electronic devices often have an alarm function provided to be set to output voice alarms at a specific time. When a current time of the electronic device matches the specific time, the user of the electronic device has to select to turn off the alarm function or repeat the alarm function after a predetermined time delay. Sometimes, the user may open eyes to do the selection of the alarm function. That is, it is not convenient for the user to control the alarm function.
The disclosure is illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment in this disclosure are not necessarily to the same embodiment, and such references mean at least one.
In general, the word module, as used herein, refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware, such as in an EPROM. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable medium include CDs, DVDs, BLU-RAY, flash memory, and hard disk drives.
The electronic device 1 further includes a processor 20 and a storage system 30. The processor 20 executes one or more computerized codes and other applications for the electronic device 1, to provide the functions of the alarm function control system 10. The storage system 30 stores different kinds of data. The storage system 30 may be a memory, an external storage card, such as a smart media card, or a secure digital card.
In block S10, the setting module 100 sets an alarm time, an alarm mode and a plurality of control modes of the alarm function of the electronic device 1, and sets a shaking frequency and an audio file corresponding to each of the control modes in the storage system 30. In one embodiment, the alarm mode may be a ring mode or a vibration mode. The control modes represent different modes of controlling the alarm when a current time of the electronic device 1 matches the alarm time. In one embodiment, the control modes includes a close mode for turning off the alarm function, a first delay mode for the alarm function of the electronic device 1 to ring again after a first time duration (e.g. “5” minutes), a second delay mode to ring again after a second time duration (e.g. “10” minutes), for example.
A value of the shaking frequency represents how many times the electronic device 1 has been shaken. The shaking frequency is a trigger condition for triggering different control modes of the electronic device 1. The audio file of each of the control modes includes voice content of the each of the control modes, for indicating that which control mode has been chosen. For example, the value of the shaking frequency corresponding to the close mode may be set as “1”, and the audio file corresponding to the close mode may include the voice content of “turn off the alarm function”. In one embodiment, the user of the electronic device 1 shakes the electronic device with the shaking frequency corresponding to one of the control modes to choose the control mode.
In block S11, the first determination module 101 determines whether the current time of the electronic device 1 matches the alarm time. If the current time of the electronic device 1 matches the alarm time, block S12 is implemented. If the current time of the electronic device 1 does not match the alarm time, block S11 is repeated until the current time of the electronic device 1 matches the alarm time.
In block S12, the start module 102 starts the alarm function of the electronic device 1 by activating the alarm mode, and enables the monitor unit 50 to monitor the acceleration values of the electronic device 1.
In block S13, the reading module 103 reads the acceleration values from the monitor unit 50, and records a first shaking frequency of the electronic device 1 in a first predetermined time limit (e.g. 5 seconds) according the acceleration values. An initial value of the first shaking frequency is set as 0. In one embodiment, if one of the acceleration values exceeds a predetermined shaking value, the reading module 103 confirms that the electronic device 103 is shaken one time, and increments the value of the first shaking frequency by one. The predetermined shaking value is a threshold value for indicating that the electronic device 1 has been shaken one time.
In block S14, the output module 104 confirms the control mode corresponding to the first shaking frequency of the electronic device 1, and outputs the audio file corresponding to the confirmed control mode by the voice output device 40. The voice output device 40 outputs the audio file to prompt that the confirmed control mode has been chosen. For example, if the recorded value is equal to 2, the output module 104 confirms that the control mode is the first delay mode to ring again after “5” minutes according to the recorded value “2”, then the audio file of “ring again after 5 minutes” is output by the voice output device 40. In one embodiment, if there is no control mode corresponding to the recorded value, the output module 104 first confirms a closest value of the set shaking frequency of the recorded value, and confirms the control mode corresponding to the closest value. A difference value between the closet value and the recorded value is lowest.
In block S15, the second determination module 105 determines whether the first shaking frequency is updated in a second predetermined time limit (e.g. 3 seconds) after outputting the audio file by the voice output device 50. In one embodiment, the second predetermined time limit may be the same as the first predetermines time limit. If the first shaking frequency is updated, block S16 is implemented. If the first shaking frequency is not updated, block 17 is implemented.
In block S16, the process module 106 confirms a second shaking frequency of the electronic device 1, and confirms the control mode corresponding to the second shaking frequency. The process module 106 subtracts the first shaking frequency from the updated first shaking frequency for obtaining the second shaking frequency.
In block S17, the process module 106 controls the alarm function of the electronic device 1 according to the confirmed control mode. For example, if the confirmed control mode is the close mode for turning off the alarm function, the process module 106 turns off the alarm function.
All of the processes described above may be embodied in, and be fully automated via, functional code modules executed by one or more general-purpose processors. The code modules may be stored in any type of non-transitory readable medium or other storage device. Some or all of the methods may alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory readable medium may be a hard disk drive, a compact disc, a digital video disc, a tape drive or other suitable storage medium.
The described embodiments are merely possible examples of implementations, and have been set forth for a clear understanding of the principles of the present disclosure. Many variations and modifications may be made without departing substantially from the spirit and principles of the present disclosure. All such modifications and variations are intended to be included herein within the scope of this disclosure and the described inventive embodiments, and the present disclosure is protected by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
2011 1 0424465 | Dec 2011 | CN | national |
Number | Name | Date | Kind |
---|---|---|---|
7522031 | Lim | Apr 2009 | B2 |
7633836 | Choi et al. | Dec 2009 | B2 |
20030142591 | Baweja et al. | Jul 2003 | A1 |
20080259742 | Tadanori | Oct 2008 | A1 |
20120307604 | Wang | Dec 2012 | A1 |
Number | Date | Country | |
---|---|---|---|
20130155818 A1 | Jun 2013 | US |