Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
161 changes: 161 additions & 0 deletions img/animations/kiosk_portrait_kt0345/avd_print.xml

Large diffs are not rendered by default.

143 changes: 143 additions & 0 deletions img/animations/kiosk_portrait_kt0345/avd_scan.xml

Large diffs are not rendered by default.

89 changes: 89 additions & 0 deletions img/animations/kiosk_portrait_kt0345/avd_turn.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<animated-vector
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt">
<aapt:attr name="android:drawable">
<vector
android:name="vector"
android:width="158dp"
android:height="190dp"
android:viewportWidth="158"
android:viewportHeight="190">
<path
android:name="path_3"
android:pathData="M 58.464 50.437 L 148.444 50.437 L 148.444 55.429 L 59.75 55.429 Z"
android:fillColor="#c4c4c4"
android:strokeColor="#000000"
android:strokeWidth="2.74173"/>
<path
android:name="path_4"
android:pathData="M 55.629 61.223 L 65.903 125.546 L 60.309 126.562 L 49.351 60.456 Z"
android:fillColor="#c4c4c4"
android:strokeColor="#000000"
android:strokeWidth="2.74173"
android:strokeLineCap="round"
android:strokeLineJoin="round"/>
<path
android:name="path_5"
android:pathData="M 104.456 145.955 L 78.518 155.218 L 96.063 155.218 L 90.433 180.335 C 90.417 180.405 90.501 180.463 90.622 180.463 L 118.69 180.463 C 118.81 180.463 118.894 180.405 118.877 180.335 L 112.952 155.218 L 130.066 155.218 Z"
android:fillColor="#50a167"
android:strokeWidth="1"/>
<path
android:name="path_2"
android:pathData="M 44.104 54.964 C 44.104 54.964 50.971 66.014 57.434 59.955 C 63.897 53.897 54.889 45.914 54.889 45.914 Z"
android:fillColor="#c4c4c4"
android:strokeColor="#000000"
android:strokeWidth="2.74173"/>
<path
android:name="path_1"
android:pathData="M 11.779 189.129 L 11.779 21.869 L 46.624 21.869 L 62.584 39.457 L 30.574 66.317 L 30.574 188.961 Z"
android:fillColor="#c4c4c4"
android:strokeColor="#000000"
android:strokeWidth="2.74173"
android:strokeLineCap="round"
android:strokeLineJoin="round"/>
</vector>
</aapt:attr>
<target android:name="path_3">
<aapt:attr name="android:animation">
<objectAnimator
android:propertyName="pathData"
android:duration="1500"
android:valueFrom="M 58.464 50.437 L 148.444 50.437 L 148.444 55.429 L 59.75 55.429 Z"
android:valueTo="M 55.629 61.223 L 65.903 125.546 L 60.309 126.562 L 49.351 60.456 Z"
android:valueType="pathType"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
</aapt:attr>
</target>
<target android:name="path_4">
<aapt:attr name="android:animation">
<objectAnimator
android:propertyName="pathData"
android:duration="1500"
android:valueFrom="M 55.629 61.223 L 65.903 125.546 L 60.309 126.562 L 49.351 60.456 Z"
android:valueTo="M 58.464 50.437 L 148.444 50.437 L 148.444 55.429 L 59.75 55.429 Z"
android:valueType="pathType"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"/>
</aapt:attr>
</target>
<target android:name="path_5">
<aapt:attr name="android:animation">
<set>
<objectAnimator
android:propertyName="pathData"
android:duration="1500"
android:valueFrom="M 104.456 145.955 L 78.518 155.218 L 96.063 155.218 L 90.433 180.335 C 90.417 180.405 90.501 180.463 90.622 180.463 L 118.69 180.463 C 118.81 180.463 118.894 180.405 118.877 180.335 L 112.952 155.218 L 130.066 155.218 Z"
android:valueTo="M 104.456 135.372 L 78.518 144.635 L 96.063 144.635 L 90.433 169.752 C 90.417 169.822 90.501 169.879 90.622 169.879 L 118.69 169.879 C 118.81 169.879 118.894 169.822 118.877 169.752 L 112.952 144.635 L 130.066 144.635 Z"
android:valueType="pathType"
android:interpolator="@android:interpolator/fast_out_slow_in"/>
<objectAnimator
android:propertyName="pathData"
android:startOffset="1500"
android:duration="1500"
android:valueFrom="M 104.456 135.372 L 78.518 144.635 L 96.063 144.635 L 90.433 169.752 C 90.417 169.822 90.501 169.879 90.622 169.879 L 118.69 169.879 C 118.81 169.879 118.894 169.822 118.877 169.752 L 112.952 144.635 L 130.066 144.635 Z"
android:valueTo="M 104.456 145.955 L 78.518 155.218 L 96.063 155.218 L 90.433 180.335 C 90.417 180.405 90.501 180.463 90.622 180.463 L 118.69 180.463 C 118.81 180.463 118.894 180.405 118.877 180.335 L 112.952 155.218 L 130.066 155.218 Z"
android:valueType="pathType"
android:interpolator="@android:interpolator/fast_out_slow_in"/>
</set>
</aapt:attr>
</target>
</animated-vector>
271 changes: 271 additions & 0 deletions img/animations/kiosk_portrait_kt0345/print-frame00.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
216 changes: 216 additions & 0 deletions img/animations/kiosk_portrait_kt0345/print.shapeshifter

Large diffs are not rendered by default.

252 changes: 252 additions & 0 deletions img/animations/kiosk_portrait_kt0345/scan-frame00.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
193 changes: 193 additions & 0 deletions img/animations/kiosk_portrait_kt0345/scan.shapeshifter

Large diffs are not rendered by default.

218 changes: 218 additions & 0 deletions img/animations/kiosk_portrait_kt0345/turn-frame00.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 116 additions & 0 deletions img/animations/kiosk_portrait_kt0345/turn.shapeshifter
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"version": 1,
"layers": {
"vectorLayer": {
"id": "9838950",
"name": "vector",
"type": "vector",
"width": 158,
"height": 190,
"children": [
{
"id": "9838951",
"name": "path_3",
"type": "path",
"pathData": "M 58.464 50.437 L 148.444 50.437 L 148.444 55.429 L 59.75 55.429 Z",
"fillColor": "#c4c4c4",
"strokeColor": "#000000",
"strokeWidth": 2.74173
},
{
"id": "9838952",
"name": "path_4",
"type": "path",
"pathData": "M 55.629 61.223 L 65.903 125.546 L 60.309 126.562 L 49.351 60.456 Z",
"fillColor": "#c4c4c4",
"strokeColor": "#000000",
"strokeWidth": 2.74173,
"strokeLinecap": "round",
"strokeLinejoin": "round"
},
{
"id": "9838953",
"name": "path_5",
"type": "path",
"pathData": "M 104.456 145.955 L 78.518 155.218 L 96.063 155.218 L 90.433 180.335 C 90.417 180.405 90.501 180.463 90.622 180.463 L 118.69 180.463 C 118.81 180.463 118.894 180.405 118.877 180.335 L 112.952 155.218 L 130.066 155.218 Z",
"fillColor": "#50a167",
"strokeWidth": 1
},
{
"id": "9838954",
"name": "path_2",
"type": "path",
"pathData": "M 44.104 54.964 C 44.104 54.964 50.971 66.014 57.434 59.955 C 63.897 53.897 54.889 45.914 54.889 45.914 Z",
"fillColor": "#c4c4c4",
"strokeColor": "#000000",
"strokeWidth": 2.74173
},
{
"id": "9838955",
"name": "path_1",
"type": "path",
"pathData": "M 11.779 189.129 L 11.779 21.869 L 46.624 21.869 L 62.584 39.457 L 30.574 66.317 L 30.574 188.961 Z",
"fillColor": "#c4c4c4",
"strokeColor": "#000000",
"strokeWidth": 2.74173,
"strokeLinecap": "round",
"strokeLinejoin": "round"
}
]
},
"hiddenLayerIds": []
},
"timeline": {
"animation": {
"id": "9838956",
"name": "anim",
"duration": 3000,
"blocks": [
{
"id": "9838957",
"layerId": "9838951",
"propertyName": "pathData",
"startTime": 0,
"endTime": 1500,
"interpolator": "ACCELERATE_DECELERATE",
"type": "path",
"fromValue": "M 58.464 50.437 L 148.444 50.437 L 148.444 55.429 L 59.75 55.429 Z",
"toValue": "M 55.629 61.223 L 65.903 125.546 L 60.309 126.562 L 49.351 60.456 Z"
},
{
"id": "9838958",
"layerId": "9838952",
"propertyName": "pathData",
"startTime": 0,
"endTime": 1500,
"interpolator": "ACCELERATE_DECELERATE",
"type": "path",
"fromValue": "M 55.629 61.223 L 65.903 125.546 L 60.309 126.562 L 49.351 60.456 Z",
"toValue": "M 58.464 50.437 L 148.444 50.437 L 148.444 55.429 L 59.75 55.429 Z"
},
{
"id": "9898467",
"layerId": "9838953",
"propertyName": "pathData",
"startTime": 0,
"endTime": 1500,
"interpolator": "FAST_OUT_SLOW_IN",
"type": "path",
"fromValue": "M 104.456 145.955 L 78.518 155.218 L 96.063 155.218 L 90.433 180.335 C 90.417 180.405 90.501 180.463 90.622 180.463 L 118.69 180.463 C 118.81 180.463 118.894 180.405 118.877 180.335 L 112.952 155.218 L 130.066 155.218 Z",
"toValue": "M 104.456 135.372 L 78.518 144.635 L 96.063 144.635 L 90.433 169.752 C 90.417 169.822 90.501 169.879 90.622 169.879 L 118.69 169.879 C 118.81 169.879 118.894 169.822 118.877 169.752 L 112.952 144.635 L 130.066 144.635 Z"
},
{
"id": "9901503",
"layerId": "9838953",
"propertyName": "pathData",
"startTime": 1500,
"endTime": 3000,
"interpolator": "FAST_OUT_SLOW_IN",
"type": "path",
"fromValue": "M 104.456 135.372 L 78.518 144.635 L 96.063 144.635 L 90.433 169.752 C 90.417 169.822 90.501 169.879 90.622 169.879 L 118.69 169.879 C 118.81 169.879 118.894 169.822 118.877 169.752 L 112.952 144.635 L 130.066 144.635 Z",
"toValue": "M 104.456 145.955 L 78.518 155.218 L 96.063 155.218 L 90.433 180.335 C 90.417 180.405 90.501 180.463 90.622 180.463 L 118.69 180.463 C 118.81 180.463 118.894 180.405 118.877 180.335 L 112.952 155.218 L 130.066 155.218 Z"
}
]
}
}
}
8 changes: 8 additions & 0 deletions pretixscan/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<queries>
<package android:name="eu.pretix.pretixprint" />
<package android:name="eu.pretix.pretixprint.debug" />
<package android:name="eu.pretix.ktIOservice" />
<package android:name="de.silpion.bleuartcompanion" />
<package android:name="com.symbol.datawedge" />
</queries>
Expand Down Expand Up @@ -105,6 +106,13 @@
android:label="@string/headline_please_reinstall"
android:exported="false"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name=".ui.KioskActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.Fullscreen"
/>

<service android:name="eu.pretix.libpretixnfc.android.hardware.acs.AcsReaderService" android:foregroundServiceType="connectedDevice" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,14 @@ class AppConfig(ctx: Context) : ConfigStore {
get() = prefs.getBoolean(PREFS_KEY_MULTI_EVENT_MODE, false)
set(value) = prefs.edit().putBoolean(PREFS_KEY_MULTI_EVENT_MODE, value).apply()

var timeAfterGateOpen: Int
get() = try {
Integer.parseInt(default_prefs.getString(PREFS_KEY_KIOSK_GATE_B2S_TIMEOUT, "200")!!)
} catch (e: Exception) {
200
}
set(value) = default_prefs.edit().putString(PREFS_KEY_KIOSK_GATE_B2S_TIMEOUT, value.toString()).apply()

override fun getDeviceKnownName(): String {
return prefs.getString(PREFS_KEY_DEVICE_KNOWN_NAME, "")!!
}
Expand Down Expand Up @@ -403,6 +411,10 @@ class AppConfig(ctx: Context) : ConfigStore {
get() = default_prefs.getBoolean(PREFS_KEY_SYNC_ORDERS, true)
set(value) = default_prefs.edit().putBoolean(PREFS_KEY_SYNC_ORDERS, value).apply()

var kioskOutOfOrder: Boolean
get() = default_prefs.getBoolean(PREFS_KEY_KIOSK_OOO, false)
set(value) = default_prefs.edit().putBoolean(PREFS_KEY_KIOSK_OOO, value).apply()

override fun getKnownLiveEventSlugs(): Set<String> {
return default_prefs.getStringSet(PREFS_KEY_KNOWN_LIVE_EVENT_SLUGS, emptySet()) as Set<String>
}
Expand Down Expand Up @@ -465,6 +477,8 @@ class AppConfig(ctx: Context) : ConfigStore {
val PREFS_KEY_SEARCH_DISABLE = "pref_search_disable"
val PREFS_KEY_KIOSK_MODE = "pref_kiosk_mode"
val PREFS_KEY_MULTI_EVENT_MODE = "multi_event_mode"
val PREFS_KEY_KIOSK_OOO = "pref_kiosk_out_of_order"
val PREFS_KEY_KIOSK_GATE_B2S_TIMEOUT = "gate_back_to_start_timeout"
val PREFS_KEY_NFC_READER_TYPE = "pref_nfc_type"
private const val PREFS_KEY_KNOWN_LIVE_EVENT_SLUGS = "cache_known_live_event_slugs"
private const val PREFS_KEY_SCREEN_ALWAYS_ON = "pref_screen_always_on"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package eu.pretix.pretixscan.droid.hardware

import android.os.Build
import eu.pretix.pretixscan.droid.BuildConfig

object KioskHardware {
fun isTR51(): Boolean {
return Build.BRAND == "pretix" && Build.MODEL == "TR51"
}

fun isZebra(): Boolean {
return Build.BRAND == "Zebra" && Build.MODEL.startsWith("CC6")
}

fun isNewland(): Boolean {
return Build.BRAND in listOf(
"NewLand",
"Newland"
) && Build.MODEL.startsWith("CC6") || Build.MODEL.startsWith("NQ")
}

fun isSeuic(): Boolean {
return Build.BRAND == "SEUIC" && Build.MODEL.startsWith("AUTOID Pad Air")
}

fun isM3(): Boolean {
return Build.BRAND == "M3" && Build.MODEL.startsWith("M3PC")
}

fun isWA1053T(): Boolean {
return BuildConfig.DEBUG && Build.MODEL == "rk3399-Android10"
}
}
Loading
Loading