Changes

Optical code

2,582 bytes added, 12:36, 14 April 2021
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)
[[Category:Client|Optical code]]
== Searching for objects ==
=== Searching online ===
When the Internet is avaiable 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.
 
{{Attention|The unlock codes are always compared case sensitive.}}
 
=== 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 [[SYSCLS_UNLOCK_BY_SCAN|unlocked]]. [[SYSCLS_UNLOCK_GROUP_BY_SCAN|A group of objects sharing the same unlock code]] are unlocked as well.
 
=== Unlock mode {{Version/XamarinSince|1.2}} ===
[[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 unlock code are unlocked in the background.
* 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;
* 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.
 
 
Example XAML code to enable the unlock mode:
<tabs>
<tab name="UWP">
<source lang = "xml">
<Button
...
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>
 
</source>
</tab>
 
<tab name="Xamarin">
<source lang = "xml">
<Button
...
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>
 
</source>
</tab>
</tabs>
== Technical background ==