Difference between revisions of "Optical code"
(→Unlocking objects) |
(→Unlock mode {{Version/XamarinSince|1.2}}) |
||
Line 43: | Line 43: | ||
=== Unlock mode {{Version/XamarinSince|1.2}} === | === Unlock mode {{Version/XamarinSince|1.2}} === | ||
[[File:Client_UWP_UnlockCodeNotification.png|x200px|thumb|alt=Unlock notification|Unlock notification]] | [[File:Client_UWP_UnlockCodeNotification.png|x200px|thumb|alt=Unlock notification|Unlock notification]] | ||
− | It's also possible to start a scan with an "unlock mode" (see XAML example below). In this mode, the app doesn't rely on the [[#Searching_for_objects|search mechanism]] to find the objects and, therefore, doesn't present anything in the UI. Instead, any objects having their [[SYSCLS_UNLOCK_GROUP_BY_SCAN|unlock code]] matching the scanned | + | It's also possible to start a scan with an "unlock mode" (see XAML example below). In this mode, the app doesn't rely on the [[#Searching_for_objects|search mechanism]] to find the objects and, therefore, doesn't present anything in the UI. Instead, any objects having their [[SYSCLS_UNLOCK_GROUP_BY_SCAN|unlock code]] matching the scanned one are unlocked in the background. |
− | + | * It doesn't matter whether objects having the unlock code are present at the time when that code is scanned or not. The scanned unlock code will be remembered for 15 minutes. If objects carrying that same unlock code show up on the client (locally created or downloaded from the server) within that time, they will have an unlocked status automatically; | |
− | * It doesn't matter whether objects having the unlock code are present at the time when that code is scanned or not. The scanned unlock code will be remembered for 15 minutes. If objects carrying that same unlock code show up on the client (locally created or downloaded from the server) within that time, they will have an unlocked status automatically. | + | * It's possible (but optional) to specify an expected unlock code as well. In this case, nothing gets unlocked if the scanned code doesn't match the specified one. |
Line 86: | Line 86: | ||
[[Category:Client|Optical code]] | [[Category:Client|Optical code]] | ||
− | |||
== Technical background == | == Technical background == |
Revision as of 12:41, 14 April 2021
In order for the users to find objects more efficiently, UBIK® objects can be marked with values for optical codes. Whenever a user scans an optical code, the resulting code value can be used to find all matching objects, namely objects that have the right property.
Contents
Types of optical codes
The following types are supported at the moment:
- Barcode;
- QR Code;
- ID Marker.
Types of scanners
The following scanners are used for scanning:
- ZXing Barcode Scanner (for barcodes and QR codes)
- ID Marker Scanner - based on Metaio. (for ID Markers) This is now obsolete.
- Getac Z710 integrated barcode/qr-code scanner (from version 2.4.4 on)
Searching for objects
UBIK® provides two mechanisms for searching objects: online and offline.
Searching offline
In any case (regardless of the network connection and sync mode), UBIK® always goes through all the objects currently available on the device and find the ones that match the scanned results.
Searching online
When the Internet is available and UBIK® is not running under offline mode, the search result is enhanced by online search. This means any objects that match the scanned results can be found even if they don't yet exist locally.
Presenting results of a search
Once the objects are found, they are displayed in a list. The users can then browse to any of the objects for more information by clicking on the objects.
Unlocking objects
In some scenarios where topics such as security, regulations etc. are of higher importance, some objects can often be locked by default until certain codes are scanned.
Unlock after a search
By default, a search is started for every scanned code. If an object is found, it is presented in the UI and unlocked. A group of objects sharing the same unlock code are unlocked as well.
Unlock mode
It's also possible to start a scan with an "unlock mode" (see XAML example below). In this mode, the app doesn't rely on the search mechanism to find the objects and, therefore, doesn't present anything in the UI. Instead, any objects having their unlock code matching the scanned one are unlocked in the background.
- It doesn't matter whether objects having the unlock code are present at the time when that code is scanned or not. The scanned unlock code will be remembered for 15 minutes. If objects carrying that same unlock code show up on the client (locally created or downloaded from the server) within that time, they will have an unlocked status automatically;
- It's possible (but optional) to specify an expected unlock code as well. In this case, nothing gets unlocked if the scanned code doesn't match the specified one.
Example XAML code to enable the unlock mode:
UWP
...
xmlns:controls="using:UBIK.WinX.Controls"
Command="{Binding NavigateToScanPageCommand}">
<Button.CommandParameter>
<controls:KeyValueList>
<controls:KeyValueParameter Key="UnlockMode" Value="true" />
<controls:KeyValueParameter Key="UnlockCode" Value="$LWP01" />
</controls:KeyValueList>
</Button.CommandParameter>
</Button>
Xamarin
...
xmlns:classes="clr-namespace:UBIK.CPL.Classes;assembly=UBIK.CPL"
Command="{Binding NavigateToScanPageCommand}">
<Button.CommandParameter>
<classes:KeyValueList>
<classes:KeyValueParameter Key="UnlockMode" Value="true" />
<classes:KeyValueParameter Key="UnlockCode" Value="$LWP01" />
</classes:KeyValueList>
</Button.CommandParameter>
</Button>
Technical background
In order for objects to be identifiable through optical codes, they have to carry the SYSCLS OBJECTWITHIDMARKER classification.
The data types of different optical codes are listed as follows:
- Barcode - String;
- QR Code - String;
- ID Marker - Integer.
The service query used for online searching is IDMARKERSCANQUERY.
See also
- Find Objects by Optical Codes
- Make an Object be found by Optical Codes
- SYSCLS OBJECTWITHIDMARKER (Classification)
- SYSCLS OBJECTWITHRFIDTAG (Classification)
- SYSCLS IDMARKERSCANQUERY (Classification)
- SYSCLS RFIDTAGSCANQUERY (Classification)