Workflow improvements in electronic devices for scanning optical patterns
Features described herein generally relate to electronic devices for scanning optical patterns and workflow improvements in such electronic devices. An image depicting an optical pattern in a scene can be captured using a camera of an electronic device. The optical pattern can be decoded to obtain code data for the optical pattern. The code data can be inserted into an application object corresponding to an application installed on the electronic device. The application object can be sent to the application such that information associated with the optical pattern can be used by the application.
1 . An electronic device comprising:
a camera;
a processing system comprising one or more processors; and
one or more computer readable storage media storing instructions which, when executed by the one or more processors, cause the electronic device to perform operations comprising:
ascertaining whether the electronic device is in a first scanning mode or a second scanning mode;
in response to determining that the electronic device is in the first scanning mode:
generating a capturing command;
in response to generating the capturing command, capturing, using the camera, an image depicting one or more optical patterns in a scene;
decoding, based on the image, a first optical pattern of the one or more optical patterns to obtain first code data for the first optical pattern;
inserting the first code data into an application object corresponding to an application of a plurality of applications installed on the electronic device; and
sending the application object to the application; and
in response to determining that the electronic device is in the second scanning mode:
generating second code data for a second optical pattern of the one or more optical patterns; and
sending the second code data to the application.
2 . The electronic device of claim 1 , the operations further comprising:
generating a scanning command; and
in response to generating the scanning command, generating, using a laser scanner, the second code data.
3 . The electronic device of claim 2 , wherein the scanning command is generated in response to input received at a button of the electronic device.
4 . The electronic device of claim 1 , wherein the capturing command is generated in response to input received at a display of the electronic device.
5 . The electronic device of claim 1 , the operations further comprising:
prior to generating the capturing command:
displaying, on a display of the electronic device, a graphical user interface page of the application, a preview of the scene, and a capturing button, wherein the preview of the scene and the capturing button partially overlay the graphical user interface page.
6 . The electronic device of claim 5 , wherein the capturing command is generated in response to a user touching a portion of a surface of the display, the portion of the surface corresponding to a position in which the capturing button is displayed.
7 . The electronic device of claim 1 , wherein the inserting the first code data into the application object comprises accessing user data stored in a cloud-based server and formatting the application object based on the user data.
8 . The electronic device of claim 7 , wherein the user data identifies an operating system of the electronic device.
9 . The electronic device of claim 7 , wherein the user data identifies an application type for the application.
10 . The electronic device of claim 1 , wherein the application object is a first application object, and the operations further comprising:
generating a scanning command;
in response to generating the scanning command, generating, using a laser scanner, third code data for a third optical pattern of the one or more optical patterns;
inserting the third code data into a second application object corresponding to the application; and
sending the second application object to the application.
11 . The electronic device of claim 1 , wherein the application object is a first application object, wherein the application is a first application, and the operations further comprising:
decoding, based on the image, a third optical pattern of the one or more optical patterns to obtain third code data for the third optical pattern;
inserting the third code data into a second application object corresponding to a second application of the plurality of applications installed on the electronic device; and
sending the second application object to the second application.
12 . A method comprising:
ascertaining whether a electronic device is in a first scanning mode or a second scanning mode;
in response to determining that the electronic device is in the first scanning mode:
generating a capturing command;
in response to generating the capturing command, capturing, using a camera, an image depicting one or more optical patterns in a scene;
decoding, based on the image, a first optical pattern of the one or more optical patterns to obtain first code data for the first optical pattern;
inserting the first code data into an application object corresponding to an application of a plurality of applications installed on the electronic device; and
sending the application object to the application; and
in response to determining that the electronic device is in the second scanning mode:
generating second code data for a second optical pattern of the one or more optical patterns; and
sending the second code data to the application.
13 . The method of claim 12 , further comprising:
generating a scanning command; and
in response to generating the scanning command, generating, using a laser scanner, the second code data.
14 . The method of claim 12 , further comprising:
prior to generating a capturing command:
displaying, on a display of the electronic device, a graphical user interface page of the application, a preview of the scene, and a capturing button, wherein the preview of the scene and the capturing button partially overlay the graphical user interface page, wherein the capturing command is generated in response to a user touching a portion of a surface of the display, the portion of the surface corresponding to a position in which the capturing button is displayed.
15 . The method of claim 12 , wherein the application object is a first application object, and the method further comprising:
generating a scanning command;
in response to generating the scanning command, generating, using a laser scanner, third code data for a third optical pattern of the one or more optical patterns;
inserting the third code data into a second application object corresponding to the application; and
sending the second application object to the application.
16 . The method of claim 12 , wherein the application object is a first application object, wherein the application is a first application, and the method further comprises:
decoding, based on the image, a third optical pattern of the one or more optical patterns to obtain third code data for the third optical pattern;
inserting the third code data into a second application object corresponding to a second application of the plurality of applications installed on the electronic device; and
sending the second application object to the second application.
17 . One or more non-transitory computer-readable media storing computer-readable instructions that, when executed by one or more processors, cause an electronic device to perform operations comprising:
ascertaining whether the electronic device is in a first scanning mode or a second scanning mode;
in response to determining that the electronic device is in the first scanning mode:
displaying, on a display of the electronic device, a graphical user interface page of an application of a plurality of applications installed on the electronic device, a preview of a scene, and a capturing button, wherein the preview of the scene and the capturing button partially overlay the graphical user interface page;
generating a capturing command, wherein the capturing command is generated in response to a user touching a portion of a surface of the display, the portion of the surface corresponding to a position in which the capturing button is displayed;
in response to generating the capturing command, capturing, using a camera of the electronic device, an image depicting one or more optical patterns in a scene;
decoding, based on the image, an optical pattern of the one or more optical patterns to obtain code data for the optical pattern;
inserting the code data into an application object corresponding to an application of a plurality of applications installed on the electronic device by converting a first format of the code data to a second format associated with the application and generating the application object based on the code data formatted in the second format; and
sending the application object to the application; and
in response to determining that the electronic device is in the second scanning mode:
generating second code data for a second optical pattern of the one or more optical patterns; and
sending the second code data to the application.
18 . The one or more non-transitory computer-readable media of claim 17 , the operations further comprising:
generating a scanning command; and
in response to generating the scanning command, generating, using a laser scanner, the second code data.
19 . The one or more non-transitory computer-readable media of claim 17 , wherein the application object is a first application object, and the operations further comprising:
generating a scanning command;
in response to generating the scanning command, generating, using a laser scanner, third code data for a third optical pattern of the one or more optical patterns;
inserting the third code data into a second application object corresponding to the application; and
sending the second application object to the application.
20 . The one or more non-transitory computer-readable media of claim 17 , wherein the application object is a first application object, and the operations further comprising:
decoding, based on the image, a third optical pattern of the one or more optical patterns to obtain third code data for the third optical pattern;
inserting the third code data into a second application object corresponding to a second application of the plurality of applications installed on the electronic device; and
sending the second application object to the second application.