├── app ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values-de │ │ │ └── array.xml │ │ ├── drawable │ │ │ ├── state_open.png │ │ │ ├── state_closed.png │ │ │ ├── state_unknown.png │ │ │ ├── state_disabled.png │ │ │ ├── rounded_corners.xml │ │ │ ├── ic_ring.xml │ │ │ ├── ic_action_show_qr.xml │ │ │ ├── ic_action_scan_qr.xml │ │ │ ├── trigger_logo.xml │ │ │ ├── ic_unlock.xml │ │ │ ├── ic_lock.xml │ │ │ └── ic_launcher_foreground.xml │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── drawable-hdpi │ │ │ ├── ic_action_new.png │ │ │ ├── ic_action_about.png │ │ │ └── ic_action_edit.png │ │ ├── drawable-mdpi │ │ │ ├── ic_action_new.png │ │ │ ├── ic_action_about.png │ │ │ └── ic_action_edit.png │ │ ├── drawable-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_action_edit.png │ │ │ ├── ic_action_new.png │ │ │ ├── ic_action_about.png │ │ │ └── ic_action_refresh.png │ │ ├── drawable-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_action_new.png │ │ │ ├── ic_action_about.png │ │ │ ├── ic_action_edit.png │ │ │ └── ic_action_refresh.png │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── ic_launcher_round.png │ │ ├── values │ │ │ ├── ic_launcher_background.xml │ │ │ ├── dimens.xml │ │ │ ├── styles.xml │ │ │ └── array.xml │ │ ├── layout │ │ │ ├── main_spinner.xml │ │ │ ├── spinner_item_settings.xml │ │ │ ├── spinner_dropdown_item_settings.xml │ │ │ ├── activity_qrshow.xml │ │ │ ├── activity_qrscan.xml │ │ │ ├── dialog_delete_door.xml │ │ │ ├── activity_backup.xml │ │ │ ├── dialog_ssh_passphrase.xml │ │ │ ├── dialog_change_string.xml │ │ │ ├── activity_license.xml │ │ │ ├── activity_image.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_about.xml │ │ │ ├── activity_abstract_certificate.xml │ │ │ └── activity_abstract_client_keypair.xml │ │ ├── mipmap-anydpi-v26 │ │ │ ├── ic_launcher.xml │ │ │ └── ic_launcher_round.xml │ │ ├── anim │ │ │ └── pressed.xml │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ ├── menu │ │ │ └── main.xml │ │ └── values-in │ │ │ └── strings.xml │ │ ├── kotlin │ │ └── app │ │ │ └── trigger │ │ │ ├── DoorStatus.kt │ │ │ ├── OnTaskCompleted.kt │ │ │ ├── DoorReply.kt │ │ │ ├── mqtt │ │ │ ├── MqttClientKeyPairActivity.kt │ │ │ ├── MqttClientCertificateActivity.kt │ │ │ └── MqttServerCertificateActivity.kt │ │ │ ├── https │ │ │ ├── HttpsClientKeyPairActivity.kt │ │ │ ├── HttpsClientCertificateActivity.kt │ │ │ ├── HttpsServerCertificateActivity.kt │ │ │ ├── CertificateFetchTask.kt │ │ │ ├── HttpsTools.kt │ │ │ └── IgnoreExpirationTrustManager.kt │ │ │ ├── AboutActivity.kt │ │ │ ├── Log.kt │ │ │ ├── BluetoothTools.kt │ │ │ ├── ssh │ │ │ ├── RegisterIdentityTask.kt │ │ │ ├── GenerateIdentityTask.kt │ │ │ ├── KeyPairBean.kt │ │ │ └── SshTools.kt │ │ │ ├── LicenseActivity.kt │ │ │ ├── Door.kt │ │ │ ├── nuki │ │ │ ├── NukiReadLockStateCallback.kt │ │ │ ├── NukiLockActionCallback.kt │ │ │ ├── NukiCommand.kt │ │ │ └── NukiCallback.kt │ │ │ ├── BluetoothDoor.kt │ │ │ ├── QRShowActivity.kt │ │ │ ├── NukiDoor.kt │ │ │ ├── bluetooth │ │ │ └── BluetoothRequestHandler.kt │ │ │ ├── BackupActivity.kt │ │ │ ├── SshDoor.kt │ │ │ ├── WifiTools.kt │ │ │ ├── MqttDoor.kt │ │ │ ├── HttpsDoor.kt │ │ │ └── QRScanActivity.kt │ │ └── AndroidManifest.xml ├── proguard-rules.pro └── build.gradle ├── metadata ├── en-US │ ├── changelogs │ │ ├── 312.txt │ │ ├── 211.txt │ │ ├── 342.txt │ │ ├── 336.txt │ │ ├── 333.txt │ │ ├── 344.txt │ │ ├── 407.txt │ │ ├── 204.txt │ │ ├── 191.txt │ │ ├── 205.txt │ │ ├── 301.txt │ │ ├── 322.txt │ │ ├── 220.txt │ │ ├── 222.txt │ │ ├── 225.txt │ │ ├── 190.txt │ │ ├── 210.txt │ │ ├── 313.txt │ │ ├── 320.txt │ │ ├── 334.txt │ │ ├── 224.txt │ │ ├── 310.txt │ │ ├── 404.txt │ │ ├── 202.txt │ │ ├── 221.txt │ │ ├── 403.txt │ │ ├── 171.txt │ │ ├── 200.txt │ │ ├── 300.txt │ │ ├── 321.txt │ │ ├── 335.txt │ │ ├── 180.txt │ │ ├── 203.txt │ │ ├── 331.txt │ │ ├── 402.txt │ │ ├── 340.txt │ │ ├── 206.txt │ │ ├── 311.txt │ │ ├── 401.txt │ │ ├── 406.txt │ │ ├── 170.txt │ │ ├── 192.txt │ │ ├── 201.txt │ │ ├── 332.txt │ │ ├── 400.txt │ │ ├── 343.txt │ │ ├── 341.txt │ │ ├── 223.txt │ │ ├── 330.txt │ │ └── 405.txt │ ├── short_description.txt │ ├── images │ │ ├── icon.png │ │ └── phoneScreenshots │ │ │ ├── 01_setup.png │ │ │ ├── 02_settings_https_part1.png │ │ │ └── 03_settings_https_part2.png │ └── full_description.txt └── ru-RU │ ├── short_description.txt │ └── full_description.txt ├── docs ├── apk.png ├── fdroid.png ├── gplay.png ├── obtainium.png ├── screenshot_states.png ├── screenshot_door_types.png ├── screenshot_main_menu.png ├── screenshot_ssh_key_pair.png ├── screenshot_ssh_settings_part1.png ├── screenshot_ssh_settings_part2.png ├── screenshot_https_settings_part1.png ├── screenshot_https_settings_part2.png ├── screenshot_mqtt_settings_part1.png ├── screenshot_nuki_settings_part1.png ├── screenshot_bluetooth_settings_part1.png ├── screenshot_https_manage_tls_certificate.png ├── screenshots.md └── documentation.md ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle ├── gradle.properties ├── gradlew.bat ├── README.md └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /metadata/en-US/changelogs/312.txt: -------------------------------------------------------------------------------- 1 | * add build flavors -------------------------------------------------------------------------------- /metadata/en-US/changelogs/211.txt: -------------------------------------------------------------------------------- 1 | * fix update of buttons -------------------------------------------------------------------------------- /metadata/en-US/changelogs/342.txt: -------------------------------------------------------------------------------- 1 | * fix broken WiFi SSID match -------------------------------------------------------------------------------- /metadata/en-US/changelogs/336.txt: -------------------------------------------------------------------------------- 1 | * fix HTTP Basic Authentication -------------------------------------------------------------------------------- /metadata/en-US/changelogs/333.txt: -------------------------------------------------------------------------------- 1 | * support old style SSH keypair value -------------------------------------------------------------------------------- /metadata/en-US/changelogs/344.txt: -------------------------------------------------------------------------------- 1 | * fix crash when there are two SSH doors -------------------------------------------------------------------------------- /metadata/en-US/changelogs/407.txt: -------------------------------------------------------------------------------- 1 | * really minor cleanup and fixes 2 | -------------------------------------------------------------------------------- /docs/apk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/apk.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/204.txt: -------------------------------------------------------------------------------- 1 | * fix crash when sharing the screen space -------------------------------------------------------------------------------- /metadata/en-US/short_description.txt: -------------------------------------------------------------------------------- 1 | Open doors via HTTPS/SSH/Bluetooth/MQTT. -------------------------------------------------------------------------------- /docs/fdroid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/fdroid.png -------------------------------------------------------------------------------- /docs/gplay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/gplay.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/191.txt: -------------------------------------------------------------------------------- 1 | * add camera permission 2 | * add package metadata -------------------------------------------------------------------------------- /metadata/en-US/changelogs/205.txt: -------------------------------------------------------------------------------- 1 | * fix "entry exists" error when saving setting -------------------------------------------------------------------------------- /metadata/en-US/changelogs/301.txt: -------------------------------------------------------------------------------- 1 | * update ssh library (jcraft.com/jsch - 0.1.54) -------------------------------------------------------------------------------- /metadata/en-US/changelogs/322.txt: -------------------------------------------------------------------------------- 1 | * fix crash on message display (Android 11 only) -------------------------------------------------------------------------------- /docs/obtainium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/obtainium.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/220.txt: -------------------------------------------------------------------------------- 1 | * Add HTTP GET/PUT support 2 | * Improve Bluetooth support -------------------------------------------------------------------------------- /metadata/en-US/changelogs/222.txt: -------------------------------------------------------------------------------- 1 | * add support for Nuki SmartLock (pairing, lock, unlock) -------------------------------------------------------------------------------- /metadata/en-US/changelogs/225.txt: -------------------------------------------------------------------------------- 1 | * add option to allow https/ssh/mqtt to be used over the Internet -------------------------------------------------------------------------------- /app/src/main/res/values-de/array.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/screenshot_states.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_states.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/190.txt: -------------------------------------------------------------------------------- 1 | * custom status images 2 | * backup data 3 | * QR codes are smaller now -------------------------------------------------------------------------------- /metadata/en-US/changelogs/210.txt: -------------------------------------------------------------------------------- 1 | * add ring button for door bells 2 | * hide unused open/close/ring buttons -------------------------------------------------------------------------------- /metadata/en-US/changelogs/313.txt: -------------------------------------------------------------------------------- 1 | * add connected ssid to error message 2 | * make Android 10 read the SSID -------------------------------------------------------------------------------- /metadata/ru-RU/short_description.txt: -------------------------------------------------------------------------------- 1 | Открывайте двери через Wi-Fi, используя HTTPS/SSH/Bluetooth/MQTT. 2 | -------------------------------------------------------------------------------- /docs/screenshot_door_types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_door_types.png -------------------------------------------------------------------------------- /docs/screenshot_main_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_main_menu.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/320.txt: -------------------------------------------------------------------------------- 1 | * use new Android SDK version 30 and AndroidX 2 | * change file picker library -------------------------------------------------------------------------------- /metadata/en-US/changelogs/334.txt: -------------------------------------------------------------------------------- 1 | * fix some HTTPS hostname verification issues 2 | * make HTTP method explicit -------------------------------------------------------------------------------- /metadata/en-US/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/metadata/en-US/images/icon.png -------------------------------------------------------------------------------- /docs/screenshot_ssh_key_pair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_ssh_key_pair.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /metadata/en-US/changelogs/224.txt: -------------------------------------------------------------------------------- 1 | * drop permission access fine location 2 | * do not overwrite existing file on backup -------------------------------------------------------------------------------- /metadata/en-US/changelogs/310.txt: -------------------------------------------------------------------------------- 1 | * allow regex to match locked/unlocked message status of https, ssh, mqtt and bluetooth -------------------------------------------------------------------------------- /metadata/en-US/changelogs/404.txt: -------------------------------------------------------------------------------- 1 | * support separate HTTP method per query 2 | * replace some deprecated permission code -------------------------------------------------------------------------------- /docs/screenshot_ssh_settings_part1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_ssh_settings_part1.png -------------------------------------------------------------------------------- /docs/screenshot_ssh_settings_part2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_ssh_settings_part2.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/202.txt: -------------------------------------------------------------------------------- 1 | * allow to scan qr code with http/https/tcp/ssl/ssh link. Makes a "guess" about parameters. -------------------------------------------------------------------------------- /metadata/en-US/changelogs/221.txt: -------------------------------------------------------------------------------- 1 | * use username/password for MQTT 2 | * do not default to GET if http request method is invalid -------------------------------------------------------------------------------- /metadata/en-US/changelogs/403.txt: -------------------------------------------------------------------------------- 1 | * fix toobar and system status bar overlap (Android 15) 2 | * fix crash in the Nuki settings -------------------------------------------------------------------------------- /app/src/main/res/drawable/state_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable/state_open.png -------------------------------------------------------------------------------- /docs/screenshot_https_settings_part1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_https_settings_part1.png -------------------------------------------------------------------------------- /docs/screenshot_https_settings_part2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_https_settings_part2.png -------------------------------------------------------------------------------- /docs/screenshot_mqtt_settings_part1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_mqtt_settings_part1.png -------------------------------------------------------------------------------- /docs/screenshot_nuki_settings_part1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_nuki_settings_part1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/state_closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable/state_closed.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/state_unknown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable/state_unknown.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/171.txt: -------------------------------------------------------------------------------- 1 | * register ssh public key (send to some address) 2 | * remove button for ssh key pair / https certificate -------------------------------------------------------------------------------- /metadata/en-US/changelogs/200.txt: -------------------------------------------------------------------------------- 1 | * add MQTT support 2 | * parse response the same way for every door type 3 | * remove refresh menu item -------------------------------------------------------------------------------- /app/src/main/res/drawable/state_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable/state_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /docs/screenshot_bluetooth_settings_part1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_bluetooth_settings_part1.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/300.txt: -------------------------------------------------------------------------------- 1 | * add option to disable https certificate expiration 2 | * change app id to please the google play app store -------------------------------------------------------------------------------- /metadata/en-US/changelogs/321.txt: -------------------------------------------------------------------------------- 1 | * fix crash when selecting a background picture 2 | * fix crash when using the file selector on Android 11 -------------------------------------------------------------------------------- /metadata/en-US/changelogs/335.txt: -------------------------------------------------------------------------------- 1 | * add support for HTTP Basic Authentication 2 | * e.g. https://user:password@example.com/open_door 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-hdpi/ic_action_new.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-mdpi/ic_action_new.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /docs/screenshot_https_manage_tls_certificate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/docs/screenshot_https_manage_tls_certificate.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-hdpi/ic_action_about.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-hdpi/ic_action_edit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-mdpi/ic_action_about.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-mdpi/ic_action_edit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-xhdpi/ic_action_edit.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-xhdpi/ic_action_new.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_new.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/180.txt: -------------------------------------------------------------------------------- 1 | * QR-code import/export 2 | * clone setups 3 | * fix update from previous versions 4 | * bluetooth support (untested!) -------------------------------------------------------------------------------- /metadata/en-US/changelogs/203.txt: -------------------------------------------------------------------------------- 1 | * fix missing german translation 2 | * fix error when setup name is already taken 3 | * fix upgrade error (not critical) -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-xhdpi/ic_action_about.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-xhdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_about.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_edit.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/331.txt: -------------------------------------------------------------------------------- 1 | * fix SSH_ORIGINAL_COMMAND for command in .ssh/authorized_keys 2 | * prevent quick sequential calls of the status command -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/01_setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/metadata/en-US/images/phoneScreenshots/01_setup.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/app/src/main/res/drawable-xxhdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/402.txt: -------------------------------------------------------------------------------- 1 | * make icon rounded 2 | * fix crash in for client-pair activity for HTTPS and MQTT 3 | * lots of small layout improvements 4 | -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /metadata/en-US/changelogs/340.txt: -------------------------------------------------------------------------------- 1 | * add MQTT support for TLS client/server certificates 2 | * "Wifi needed" now ignores Internet availability 3 | * fix deletion of key and certificates -------------------------------------------------------------------------------- /metadata/en-US/changelogs/206.txt: -------------------------------------------------------------------------------- 1 | * register ssh public key address does not need start with tcp:// 2 | * allow ssh register endpoint to send back a response 3 | * disable text suggestions -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/02_settings_https_part1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/metadata/en-US/images/phoneScreenshots/02_settings_https_part1.png -------------------------------------------------------------------------------- /metadata/en-US/images/phoneScreenshots/03_settings_https_part2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwarning/trigger/HEAD/metadata/en-US/images/phoneScreenshots/03_settings_https_part2.png -------------------------------------------------------------------------------- /metadata/en-US/changelogs/311.txt: -------------------------------------------------------------------------------- 1 | * fix some SSH key crashes and import issues 2 | * force SSID match setting if used 3 | * fix SSID matching on Android 10 4 | * use Android target SDK version 29 -------------------------------------------------------------------------------- /metadata/en-US/changelogs/401.txt: -------------------------------------------------------------------------------- 1 | * update to SDK version 35 (Android 15) 2 | * remove support for deprecated SharedPreferences 3 | * caused major rewrite 4 | * fix UTF-8 character support for QR code export 5 | -------------------------------------------------------------------------------- /metadata/en-US/changelogs/406.txt: -------------------------------------------------------------------------------- 1 | * set door state to open/closed in case 2 | the open/close command is successful 3 | * this applies only if the reply patterns are set empty 4 | * translation improvements 5 | -------------------------------------------------------------------------------- /metadata/en-US/changelogs/170.txt: -------------------------------------------------------------------------------- 1 | * button press animation 2 | * fix item selection in drop-down list 3 | * fetch/import/export https certificate 4 | * ignore certificate host name mismatch (replaces "ignore errors") -------------------------------------------------------------------------------- /metadata/en-US/changelogs/192.txt: -------------------------------------------------------------------------------- 1 | * allow different ssh key sizes 2 | * store ssh keys in a more efficient format 3 | * always remove html tags from returned text 4 | * allow imported images to use entire screen width -------------------------------------------------------------------------------- /metadata/en-US/changelogs/201.txt: -------------------------------------------------------------------------------- 1 | * only auto select by ssid on app start or wifi reconnect 2 | * more translatable strings 3 | * prevent image from touching the buttons 4 | * change some button labels and positions -------------------------------------------------------------------------------- /metadata/en-US/changelogs/332.txt: -------------------------------------------------------------------------------- 1 | * add status patterns for MQTT 2 | * allow key and password authentication for SSH 3 | * call status call only once on connection change 4 | * make SSH execution timeout configurable 5 | * defaults to 5 seconds -------------------------------------------------------------------------------- /metadata/en-US/changelogs/400.txt: -------------------------------------------------------------------------------- 1 | * convert codebase to Kotlin 2 | * request bluetooth scan permissions for Android 12 3 | * support adaptive and monochrome launcher icon 4 | * fix require WiFi for SSH door setup 5 | * change license to GPL-3.0-or-later 6 | -------------------------------------------------------------------------------- /metadata/en-US/changelogs/343.txt: -------------------------------------------------------------------------------- 1 | * show dialog to temporarly disable wifi checks 2 | * add support for passphrase protected SSH keys 3 | * fix potential crash on Android 5 when scanning a QR code 4 | * make sure new setups (e.g. via QR code) have unique names -------------------------------------------------------------------------------- /metadata/en-US/changelogs/341.txt: -------------------------------------------------------------------------------- 1 | * HTTPS with server certificate and client certificate + key 2 | * fix TLS certificate activity titles (client vs. server certificate) 3 | * MQTT now uses mqtt:// and mqtts:// as link schemes 4 | * fix update to Trigger >=3.4.0 for TLS certificates -------------------------------------------------------------------------------- /metadata/en-US/changelogs/223.txt: -------------------------------------------------------------------------------- 1 | * SSH: fix hang in key register process 2 | * SSH: key register url defaults to host address 3 | * Nuki: show (read only) settings 4 | * Nuki: more error messages 5 | * HTTPS: show messages also in case of http error 6 | * show settings in summary field -------------------------------------------------------------------------------- /metadata/en-US/changelogs/330.txt: -------------------------------------------------------------------------------- 1 | * use Android storage framework 2 | * switch to SSH code from ConnectBot 3 | * adds support for ED25519 an others 4 | * allow SSH key import via QR-code 5 | * add option to ignore HTTPS certificte validity 6 | * allow export/import SSH keys via clipboard -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 12 08:38:00 CEST 2023 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/rounded_corners.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /app/src/main/res/layout/main_spinner.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/DoorStatus.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger 7 | 8 | // parsed door reply 9 | class DoorStatus(val code: StateCode, val message: String) { 10 | enum class StateCode { 11 | OPEN, CLOSED, UNKNOWN, DISABLED 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/spinner_item_settings.xml: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/OnTaskCompleted.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger 7 | 8 | import app.trigger.DoorReply.ReplyCode 9 | 10 | interface OnTaskCompleted { 11 | fun onTaskResult(setupId: Int, action: MainActivity.Action, code: ReplyCode, message: String) 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/anim/pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | } 7 | } 8 | dependencyResolutionManagement { 9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | } 15 | rootProject.name = "Trigger" 16 | include ':app' 17 | -------------------------------------------------------------------------------- /metadata/en-US/changelogs/405.txt: -------------------------------------------------------------------------------- 1 | * fix storage of certificates 2 | * show default images in image selection 3 | * fix MQTT door certificate settings storage 4 | * add Russian translation, thanks tokito@gmail.com 5 | * add Indonesian translation, thanks yurtpage+translate@gmail.com 6 | * improve German translation, thanks moritzwarning@web.de 7 | * replace remaining deprecated permission code 8 | * make more strings translatable 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/spinner_dropdown_item_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | 10dp 7 | 20dp 8 | 50dp 9 | 10 | 16sp 11 | 18sp 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_ring.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /metadata/en-US/full_description.txt: -------------------------------------------------------------------------------- 1 | Open and close doors, ring door bells and see the door state. 2 | Supported HTTPS/SSH/MQTT/Bluetooth and the Nuki SmartLock. 3 | 4 | Features: 5 | 6 | * Support of HTTPS, SSH, Bluetooth and MQTT. 7 | * Support for Nuki SmartLock. 8 | * Multiple door profiles. 9 | * Auto select profiles by a SSID of connected WiFi. 10 | * HTTPS server/client certificate support. 11 | * SSH key generation (ED25519, RSA) with a passphrase. 12 | * Custom status images. 13 | * QR code support. 14 | * Support of backup. 15 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_show_qr.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/DoorReply.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger 7 | 8 | // reply from door 9 | class DoorReply(val action: MainActivity.Action, val code: ReplyCode, val message: String) { 10 | enum class ReplyCode { 11 | LOCAL_ERROR, // could establish a connection for some reason 12 | REMOTE_ERROR, // the door send some error 13 | SUCCESS, // the door send some message that has yet to be parsed 14 | DISABLED // Internet, WiFi or Bluetooth disabled or not supported 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /metadata/ru-RU/full_description.txt: -------------------------------------------------------------------------------- 1 | Открыть или закрыть двери, звонить и посмотреть состояние двери. 2 | Поддерживаются общие HTTPS/SSH/MQTT/Bluetooth и Nuki SmartLock. 3 | 4 | Возможности: 5 |
    6 |
  • Поддержка HTTPS, SSH, Bluetooth и MQTT.
  • 7 |
  • Поддержка Nuki SmartLock.
  • 8 |
  • Многодверные профили.
  • 9 |
  • Автоматически выбирать профили по имени подсоединёной сети WiFi.
  • 10 |
  • Поддержка HTTPS серверного или клиентского сертификата.
  • 11 |
  • Генерация SSH ключей (ED25519, RSA) с парольными фразами.
  • 12 |
  • Пользовательские изображения состояния двери.
  • 13 |
  • Поддержка QR кодов.
  • 14 |
  • Резервная копия.
  • 15 |
16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_action_scan_qr.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/main/res/drawable/trigger_logo.xml: -------------------------------------------------------------------------------- 1 | 6 | 11 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_unlock.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_lock.xml: -------------------------------------------------------------------------------- 1 | 7 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /docs/screenshots.md: -------------------------------------------------------------------------------- 1 | # Screenshots 2 | 3 | A collection of screenshots of Trigger. 4 | 5 | ## General 6 | 7 | 8 | 9 | ## HTTPS Door 10 | 11 | 12 | 13 | ## SSH Door 14 | 15 | 16 | 17 | ## MQTT Door 18 | 19 | 20 | 21 | ## Bluetooth/BLE Door 22 | 23 | 24 | 25 | ## Nuki Door 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 15 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/mqtt/MqttClientKeyPairActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger.mqtt 7 | 8 | import android.os.Bundle 9 | import app.trigger.ssh.KeyPairBean 10 | import app.trigger.AbstractClientKeyPairActivity 11 | import app.trigger.MqttDoor 12 | import app.trigger.SetupActivity 13 | 14 | 15 | class MqttClientKeyPairActivity : AbstractClientKeyPairActivity() { 16 | private lateinit var mqttDoor: MqttDoor 17 | 18 | override fun getKeyPair(): KeyPairBean? { 19 | return mqttDoor.client_keypair 20 | } 21 | 22 | override fun setKeyPair(keyPair: KeyPairBean?) { 23 | mqttDoor.client_keypair = keyPair 24 | } 25 | 26 | override fun onCreate(savedInstanceState: Bundle?) { 27 | if (SetupActivity.currentDoor is MqttDoor) { 28 | mqttDoor = SetupActivity.currentDoor as MqttDoor 29 | } else { 30 | // not expected to happen 31 | finish() 32 | return 33 | } 34 | super.onCreate(savedInstanceState) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/https/HttpsClientKeyPairActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger.https 7 | 8 | import android.os.Bundle 9 | import app.trigger.ssh.KeyPairBean 10 | import app.trigger.AbstractClientKeyPairActivity 11 | import app.trigger.HttpsDoor 12 | import app.trigger.SetupActivity 13 | 14 | 15 | class HttpsClientKeyPairActivity : AbstractClientKeyPairActivity() { 16 | private lateinit var httpsDoor: HttpsDoor 17 | 18 | override fun getKeyPair(): KeyPairBean? { 19 | return httpsDoor.client_keypair 20 | } 21 | 22 | override fun setKeyPair(keyPair: KeyPairBean?) { 23 | httpsDoor.client_keypair = keyPair 24 | } 25 | 26 | override fun onCreate(savedInstanceState: Bundle?) { 27 | if (SetupActivity.currentDoor is HttpsDoor) { 28 | httpsDoor = SetupActivity.currentDoor as HttpsDoor 29 | } else { 30 | // not expected to happen 31 | finish() 32 | return 33 | } 34 | super.onCreate(savedInstanceState) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_qrshow.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 20 | 21 | 22 | 23 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/AboutActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger 7 | 8 | import android.content.Intent 9 | import android.os.Bundle 10 | import android.widget.TextView 11 | import androidx.appcompat.app.AppCompatActivity 12 | import androidx.appcompat.widget.Toolbar 13 | 14 | class AboutActivity : AppCompatActivity() { 15 | override fun onCreate(savedInstanceState: Bundle?) { 16 | super.onCreate(savedInstanceState) 17 | setContentView(R.layout.activity_about) 18 | title = getString(R.string.menu_about) 19 | 20 | val toolbar = findViewById(R.id.toolbar) 21 | setSupportActionBar(toolbar) 22 | 23 | findViewById(R.id.versionTv).text = if (BuildConfig.DEBUG) { 24 | BuildConfig.VERSION_NAME + " (debug)" 25 | } else { 26 | BuildConfig.VERSION_NAME 27 | } 28 | 29 | findViewById(R.id.licenseTV).setOnClickListener { 30 | val intent = Intent(this, LicenseActivity::class.java) 31 | startActivity(intent) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_qrscan.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 15 | 16 | 20 | 21 | 22 | 23 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/Log.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger 7 | 8 | import android.util.Log 9 | 10 | /* 11 | * Wrapper for android.util.Log to disable logging 12 | */ 13 | object Log { 14 | private fun contextString(context: Any): String { 15 | return if (context is String) { 16 | context 17 | } else { 18 | context.javaClass.simpleName 19 | } 20 | } 21 | 22 | fun d(context: Any, message: String) { 23 | if (BuildConfig.DEBUG) { 24 | val tag = contextString(context) 25 | Log.d(tag, message) 26 | } 27 | } 28 | 29 | fun w(context: Any, message: String) { 30 | if (BuildConfig.DEBUG) { 31 | val tag = contextString(context) 32 | Log.w(tag, message) 33 | } 34 | } 35 | 36 | fun i(context: Any, message: String) { 37 | if (BuildConfig.DEBUG) { 38 | val tag = contextString(context) 39 | Log.i(tag, message) 40 | } 41 | } 42 | 43 | fun e(context: Any, message: String) { 44 | if (BuildConfig.DEBUG) { 45 | val tag = contextString(context) 46 | Log.e(tag, message) 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/mqtt/MqttClientCertificateActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger.mqtt 7 | 8 | import android.os.Bundle 9 | import app.trigger.AbstractCertificateActivity 10 | import app.trigger.Door 11 | import app.trigger.MqttDoor 12 | import app.trigger.SetupActivity 13 | import java.security.cert.Certificate 14 | 15 | class MqttClientCertificateActivity : AbstractCertificateActivity() { 16 | private lateinit var mqttDoor: MqttDoor 17 | 18 | override fun getDoor(): Door { 19 | return mqttDoor 20 | } 21 | 22 | override fun getCertificate(): Certificate? { 23 | return mqttDoor.client_certificate 24 | } 25 | 26 | override fun setCertificate(certificate: Certificate?) { 27 | mqttDoor.client_certificate = certificate 28 | } 29 | 30 | override fun onCreate(savedInstanceState: Bundle?) { 31 | if (SetupActivity.currentDoor is MqttDoor) { 32 | mqttDoor = SetupActivity.currentDoor as MqttDoor 33 | } else { 34 | // not expected to happen 35 | finish() 36 | return 37 | } 38 | super.onCreate(savedInstanceState) 39 | } 40 | 41 | companion object { 42 | private const val TAG = "MqttClientCertificateActivity" 43 | } 44 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/mqtt/MqttServerCertificateActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger.mqtt 7 | 8 | import android.os.Bundle 9 | import app.trigger.AbstractCertificateActivity 10 | import app.trigger.Door 11 | import app.trigger.MqttDoor 12 | import app.trigger.SetupActivity 13 | import java.security.cert.Certificate 14 | 15 | class MqttServerCertificateActivity : AbstractCertificateActivity() { 16 | private lateinit var mqttDoor: MqttDoor 17 | 18 | override fun getDoor(): Door { 19 | return mqttDoor 20 | } 21 | 22 | override fun getCertificate(): Certificate? { 23 | return mqttDoor.server_certificate 24 | } 25 | 26 | override fun setCertificate(certificate: Certificate?) { 27 | mqttDoor.server_certificate = certificate 28 | } 29 | 30 | override fun onCreate(savedInstanceState: Bundle?) { 31 | if (SetupActivity.currentDoor is MqttDoor) { 32 | mqttDoor = SetupActivity.currentDoor as MqttDoor 33 | } else { 34 | // not expected to happen 35 | finish() 36 | return 37 | } 38 | super.onCreate(savedInstanceState) 39 | } 40 | 41 | companion object { 42 | private const val TAG = "MqttServerCertificateActivity" 43 | } 44 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/https/HttpsClientCertificateActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger.https 7 | 8 | import android.os.Bundle 9 | import app.trigger.AbstractCertificateActivity 10 | import app.trigger.Door 11 | import app.trigger.HttpsDoor 12 | import app.trigger.SetupActivity 13 | import java.security.cert.Certificate 14 | 15 | class HttpsClientCertificateActivity : AbstractCertificateActivity() { 16 | private lateinit var httpsDoor: HttpsDoor 17 | 18 | override fun getDoor(): Door { 19 | return httpsDoor 20 | } 21 | 22 | override fun getCertificate(): Certificate? { 23 | return httpsDoor.client_certificate 24 | } 25 | 26 | override fun setCertificate(certificate: Certificate?) { 27 | httpsDoor.client_certificate = certificate 28 | } 29 | 30 | override fun onCreate(savedInstanceState: Bundle?) { 31 | if (SetupActivity.currentDoor is HttpsDoor) { 32 | httpsDoor = SetupActivity.currentDoor as HttpsDoor 33 | } else { 34 | // not expected to happen 35 | finish() 36 | return 37 | } 38 | super.onCreate(savedInstanceState) 39 | } 40 | 41 | companion object { 42 | private const val TAG = "HttpsClientCertificateActivity" 43 | } 44 | } -------------------------------------------------------------------------------- /app/src/main/kotlin/app/trigger/https/HttpsServerCertificateActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2025 The Trigger Contributors 3 | * SPDX-License-Identifier: GPL-3.0-or-later 4 | */ 5 | 6 | package app.trigger.https 7 | 8 | import android.os.Bundle 9 | import app.trigger.AbstractCertificateActivity 10 | import app.trigger.Door 11 | import app.trigger.HttpsDoor 12 | import app.trigger.SetupActivity 13 | import java.security.cert.Certificate 14 | 15 | class HttpsServerCertificateActivity : AbstractCertificateActivity() { 16 | private lateinit var httpsDoor: HttpsDoor 17 | 18 | override fun getDoor(): Door { 19 | return httpsDoor 20 | } 21 | 22 | override fun getCertificate(): Certificate? { 23 | return httpsDoor.server_certificate 24 | } 25 | 26 | override fun setCertificate(certificate: Certificate?) { 27 | httpsDoor.server_certificate = certificate 28 | } 29 | 30 | override fun onCreate(savedInstanceState: Bundle?) { 31 | if (SetupActivity.currentDoor is HttpsDoor) { 32 | httpsDoor = SetupActivity.currentDoor as HttpsDoor 33 | } else { 34 | // not expected to happen 35 | finish() 36 | return 37 | } 38 | super.onCreate(savedInstanceState) 39 | } 40 | 41 | companion object { 42 | private const val TAG = "HttpsServerCertificateActivity" 43 | } 44 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Kotlin code style for this project: "official" or "obsolete": 19 | kotlin.code.style=official 20 | # Enables namespacing of each library's R class so that its R class includes only the 21 | # resources declared in the library itself and none from the library's dependencies, 22 | # thereby reducing the size of the R class for that library 23 | android.nonTransitiveRClass=true 24 | android.nonFinalResIds=false -------------------------------------------------------------------------------- /app/src/main/res/menu/main.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 13 | 14 | 18 | 19 | 23 | 24 | 28 | 29 | 33 | 34 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/res/values-in/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Tentang aplikasi 4 | Cadangan 5 | Duplikasi 6 | Sunting 7 | Ekspor 8 | Impor 9 | Baru 10 | Pindai code QR 11 | Tampilkan Kode QR 12 | Keterangan: 13 | Lisensi: 14 | Versi: 15 | Membatalkan 16 | Hapus 17 | Dari papan klip 18 | OK 19 | Simpan 20 | Membatalkan 21 | Sertifikat 22 | URL sertifikat 23 | Papan klip kosong 24 | Mengonfirmasi 25 | Selesai 26 | Kesalahan 27 | Ekspor 28 | Impor 29 | -------------------------------------------------------------------------------- /app/src/main/res/layout/dialog_delete_door.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | 16 | 22 | 23 |