ELECTRONIC DEVICE AND METHOD OF PROVIDING UNIT INFORMATION
A method of providing unit information on an electronic device is provided. The method includes displaying a message composition interface on the electronic device, and, in response to identifying a recipient of a message in the message composition interface, identifying a location associated with the recipient, analyzing message content to identify values and units of measurement, in response to identifying a first value and a first unit of measurement in the message, converting the first value and the first unit of measurement into a second value and a second unit of measurement associated with the location, and adding the second value and the second unit of measurement to the message content prior to sending the message.
1 . A method of providing unit information on an electronic device, the method comprising:
displaying a message composition interface on the electronic device;
in response to identifying a recipient of a message in the message composition interface:
identifying a location associated with the recipient;
analyzing message content to identify numerical values and associated units of measurement;
in response to identifying a first numerical value and first unit of measurement in the message, converting the first numerical value and first unit of measurement to a second numerical value and second unit of measurement associated with the location; and
adding the second numerical value and second unit of measurement to the message content prior to sending the message.
2 . The method according to claim 1 , wherein the message content is continually analyzed during entry of the message content to identify the numerical values and units of measurement during entry of the message content.
3 . The method according to claim 2 , wherein the second numerical value and second unit of measurement is added to the message content during entry of the message content and prior to receipt of a send command at the electronic device.
4 . The method according to claim 1 , wherein analyzing the message content comprises comparing strings in the message content to known units of measurement to identify the units of measurement.
5 . The method according to claim 4 , wherein analyzing the message content comprises identifying numerical values and identifying associated strings.
6 . The method according to claim 1 , wherein the location associated with the recipient is identified based on information stored in a contacts database.
7 . The method according to claim 6 , wherein the location associated with the recipient is identified based on at least one of a contact number and an address stored in association with the recipient in the contacts database.
8 . The method according to claim 1 , wherein the message comprises a text message and the location associated with the recipient is identified based on a number in a recipient field of the message.
9 . The method according to claim 1 , wherein identifying the location associated with the recipient comprises comparing recipient information to information associated with locations to identify an associated one of the locations.
10 . The method according to claim 1 , wherein the second numerical value and second unit of measurement is added to the message without deleting the first numerical value and first unit of measurement.
11 . A non-transitory computer-readable medium having computer-readable code stored thereon, the computer-readable code executable by at least one processor of a portable electronic device to perform the method according to claim 1 .
12 . An electronic device comprising:
a display; and
a processor operably coupled to the touch-sensitive display and configured to:
display a message composition interface on the display;
in response to identifying a recipient of a message in the message composition interface:
identify a location associated with the recipient;
analyze message content to identify values and units of measurement;
in response to identifying a first value and first unit of measurement in the message, convert the first value and first unit of measurement into a second value and second unit of measurement associated with the location; and
add the second value and second unit of measurement to the message content prior to sending the message.
13 . The electronic device according to claim 12 , wherein the message content is continually analyzed during entry of the message content to identify the values and the units of measurement during entry of the message content.
14 . The electronic device according to claim 13 , wherein the second value and second unit of measurement are added to the message content during entry of the message content and prior to receipt of a send command at the electronic device.
15 . The electronic device according to claim 12 , wherein the message content is analyzed by comparing strings in the message content to known units of measurement to identify the units of measurement.
16 . The electronic device according to claim 15 , wherein the message content is analyzed to identify numerical values and associated strings.
17 . The electronic device according to claim 12 , wherein the location associated with the recipient is identified based on information stored in a contacts database.
18 . The electronic device according to claim 17 , wherein the location associated with the recipient is identified based on at least one of a contact number and an address stored in association with the recipient in the contacts database.
19 . The electronic device according to claim 12 , wherein the message comprises a text message and the location associated with the recipient is identified based on a number in a recipient field of the message.
20 . The electronic device according to claim 12 , wherein the location associated with the recipient is identified by comparing recipient information to information associated with locations to identify an associated one of the locations.