Compare commits
11 Commits
e63069e4d0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b2cdc7786 | ||
|
|
afcf93087c | ||
|
|
547d9fd943 | ||
|
|
cabd616bc2 | ||
|
|
1e4dab162c | ||
|
|
cd7ac5595b | ||
|
|
6ac5f69568 | ||
|
|
5397c5dc54 | ||
|
|
5ade485da8 | ||
|
|
489ac9ecc1 | ||
|
|
cd391cceab |
42
README.md
42
README.md
@@ -1,47 +1,44 @@
|
|||||||
# Gotify Android [![Build Status][github-action-badge]][github-action] [![FOSSA Status][fossa-badge]][fossa] [![latest release version][release-badge]][release] [![F-Droid][fdroid-badge]][fdroid]
|
# Gotify Custom Android
|
||||||
|
|
||||||
<img align="right" src="app.gif" width="250" />
|
<img align="right" src="app.gif" width="250" />
|
||||||
|
|
||||||
Gotify Android connects to [gotify/server](https://github.com/gotify/server) and shows push notifications on new messages.
|
Gotify Custom Android is a customized version of the Gotify Android client that connects to [gotify/server](https://github.com/gotify/server) and shows push notifications on new messages.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* show push notifications on new messages
|
* show push notifications on new messages
|
||||||
* view and delete messages
|
* view and delete messages
|
||||||
|
* filter notifications by priority (custom feature)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
Download the apk or get the app via F-Droid or Google Play.
|
Build the APK using the instructions below or download from the releases.
|
||||||
|
|
||||||
[<img src="https://play.google.com/intl/en_gb/badges/images/generic/en_badge_web_generic.png" alt="Get it on Google Play" width="150" />][playstore]
|
This is a custom build with package name `com.github.gotifycustom` to avoid conflicts with the original Gotify app.
|
||||||
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" width="150"/>][fdroid]
|
|
||||||
[<img src="download-badge.png" alt="Get it on F-Droid" width="150"/>][release]
|
|
||||||
|
|
||||||
Google Play and the Google Play logo are trademarks of Google LLC.
|
|
||||||
|
|
||||||
### Disable battery optimization
|
### Disable battery optimization
|
||||||
|
|
||||||
By default Android kills long running apps as they drain the battery. With enabled battery optimization, Gotify will be killed and you wont receive any notifications.
|
By default Android kills long running apps as they drain the battery. With enabled battery optimization, Gotify Custom will be killed and you wont receive any notifications.
|
||||||
|
|
||||||
Here is one way to disable battery optimization for Gotify.
|
Here is one way to disable battery optimization for Gotify Custom.
|
||||||
|
|
||||||
* Open "Settings"
|
* Open "Settings"
|
||||||
* Search for "Battery Optimization"
|
* Search for "Battery Optimization"
|
||||||
* Find "Gotify" and disable battery optimization
|
* Find "Gotify Custom" and disable battery optimization
|
||||||
|
|
||||||
See also https://dontkillmyapp.com for phone manufacturer specific instructions to disable battery optimizations.
|
See also https://dontkillmyapp.com for phone manufacturer specific instructions to disable battery optimizations.
|
||||||
|
|
||||||
### Minimize the Gotify foreground notification
|
### Minimize the Gotify Custom foreground notification
|
||||||
|
|
||||||
*Only possible for Android version >= 8*
|
*Only possible for Android version >= 8*
|
||||||
|
|
||||||
The foreground notification showing the connection status can be manually minimized to be less intrusive:
|
The foreground notification showing the connection status can be manually minimized to be less intrusive:
|
||||||
|
|
||||||
* Open Settings -> Apps -> Gotify
|
* Open Settings -> Apps -> Gotify Custom
|
||||||
* Click Notifications
|
* Click Notifications
|
||||||
* Click on `Gotify foreground notification`
|
* Click on `Gotify Custom foreground notification`
|
||||||
* Toggle the "Minimize" option / Select a different "Behavior" or "Importance" (depends on your Android version)
|
* Toggle the "Minimize" option / Select a different "Behavior" or "Importance" (depends on your Android version)
|
||||||
* Restart Gotify
|
* Restart Gotify Custom
|
||||||
|
|
||||||
## Message Priorities
|
## Message Priorities
|
||||||
|
|
||||||
@@ -60,6 +57,8 @@ Use Java 17 and execute the following command to build the apk.
|
|||||||
$ ./gradlew build
|
$ ./gradlew build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The APK will be in `app/build/outputs/apk/` with package name `com.github.gotifycustom`.
|
||||||
|
|
||||||
## Update client
|
## Update client
|
||||||
|
|
||||||
* Run `./gradlew generateSwaggerCode`
|
* Run `./gradlew generateSwaggerCode`
|
||||||
@@ -70,19 +69,8 @@ $ ./gradlew build
|
|||||||
* Commit changes
|
* Commit changes
|
||||||
|
|
||||||
## Versioning
|
## Versioning
|
||||||
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the
|
We use [SemVer](http://semver.org/) for versioning.
|
||||||
[tags on this repository](https://github.com/gotify/android/tags).
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
|
||||||
|
|
||||||
[github-action-badge]: https://github.com/gotify/android/workflows/Build/badge.svg
|
|
||||||
[github-action]: https://github.com/gotify/android/actions?query=workflow%3ABuild
|
|
||||||
[playstore]: https://play.google.com/store/apps/details?id=com.github.gotify
|
|
||||||
[fdroid-badge]: https://img.shields.io/f-droid/v/com.github.gotify.svg
|
|
||||||
[fdroid]: https://f-droid.org/de/packages/com.github.gotify/
|
|
||||||
[fossa-badge]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fgotify%2Fandroid.svg?type=shield
|
|
||||||
[fossa]: https://app.fossa.io/projects/git%2Bgithub.com%2Fgotify%2Fandroid
|
|
||||||
[release-badge]: https://img.shields.io/github/release/gotify/android.svg
|
|
||||||
[release]: https://github.com/gotify/android/releases/latest
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,22 +5,22 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
id("kotlin-android")
|
id("kotlin-android")
|
||||||
id("org.jmailen.kotlinter") version "4.4.1"
|
id("org.jmailen.kotlinter") version "5.1.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "com.github.gotify"
|
namespace = "com.github.gotifycustom"
|
||||||
compileSdk = 35
|
compileSdk = 36
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "com.github.gotify"
|
applicationId = "com.github.gotifycustom"
|
||||||
minSdk = 23
|
minSdk = 23
|
||||||
targetSdk = 35
|
targetSdk = 36
|
||||||
versionCode = 33
|
versionCode = 34
|
||||||
versionName = "2.8.2"
|
versionName = "2.9.0"
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
signingConfig = signingConfigs.getByName("debug")
|
||||||
resValue("string", "app_name", "Gotify")
|
resValue("string", "app_name", "Gotify Custom")
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
@@ -33,7 +33,7 @@ android {
|
|||||||
register("development") {
|
register("development") {
|
||||||
applicationIdSuffix = ".dev"
|
applicationIdSuffix = ".dev"
|
||||||
isDebuggable = true
|
isDebuggable = true
|
||||||
resValue("string", "app_name", "Gotify DEV")
|
resValue("string", "app_name", "Gotify Custom DEV")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
@@ -79,15 +79,15 @@ dependencies {
|
|||||||
val markwonVersion = "4.6.2"
|
val markwonVersion = "4.6.2"
|
||||||
val tinylogVersion = "2.7.0"
|
val tinylogVersion = "2.7.0"
|
||||||
implementation(project(":client"))
|
implementation(project(":client"))
|
||||||
implementation("androidx.appcompat:appcompat:1.7.0")
|
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||||
implementation("androidx.core:core-splashscreen:1.0.1")
|
implementation("androidx.core:core-splashscreen:1.0.1")
|
||||||
implementation("com.google.android.material:material:1.12.0")
|
implementation("com.google.android.material:material:1.12.0")
|
||||||
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
|
implementation("androidx.constraintlayout:constraintlayout:2.2.1")
|
||||||
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0")
|
||||||
implementation("androidx.vectordrawable:vectordrawable:1.2.0")
|
implementation("androidx.vectordrawable:vectordrawable:1.2.0")
|
||||||
implementation("androidx.preference:preference-ktx:1.2.1")
|
implementation("androidx.preference:preference-ktx:1.2.1")
|
||||||
|
|
||||||
implementation("com.github.cyb3rko:QuickPermissions-Kotlin:1.1.5")
|
implementation("com.github.cyb3rko:QuickPermissions-Kotlin:1.1.6")
|
||||||
implementation("io.coil-kt:coil:$coilVersion")
|
implementation("io.coil-kt:coil:$coilVersion")
|
||||||
implementation("io.coil-kt:coil-svg:$coilVersion")
|
implementation("io.coil-kt:coil-svg:$coilVersion")
|
||||||
implementation("io.noties.markwon:core:$markwonVersion")
|
implementation("io.noties.markwon:core:$markwonVersion")
|
||||||
@@ -99,9 +99,9 @@ dependencies {
|
|||||||
implementation("org.tinylog:tinylog-api-kotlin:$tinylogVersion")
|
implementation("org.tinylog:tinylog-api-kotlin:$tinylogVersion")
|
||||||
implementation("org.tinylog:tinylog-impl:$tinylogVersion")
|
implementation("org.tinylog:tinylog-impl:$tinylogVersion")
|
||||||
|
|
||||||
implementation("com.google.code.gson:gson:2.11.0")
|
implementation("com.google.code.gson:gson:2.13.1")
|
||||||
implementation("com.squareup.retrofit2:retrofit:2.11.0")
|
implementation("com.squareup.retrofit2:retrofit:3.0.0")
|
||||||
implementation("org.threeten:threetenbp:1.7.0")
|
implementation("org.threeten:threetenbp:1.7.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package com.github.gotify
|
package com.github.gotifycustom
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
import android.graphics.drawable.BitmapDrawable
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
import androidx.annotation.DrawableRes
|
import androidx.annotation.DrawableRes
|
||||||
import androidx.appcompat.content.res.AppCompatResources
|
import androidx.appcompat.content.res.AppCompatResources
|
||||||
import androidx.core.graphics.drawable.toBitmap
|
import androidx.core.graphics.drawable.toBitmap
|
||||||
|
import androidx.core.graphics.drawable.toDrawable
|
||||||
import coil.ImageLoader
|
import coil.ImageLoader
|
||||||
import coil.annotation.ExperimentalCoilApi
|
import coil.annotation.ExperimentalCoilApi
|
||||||
import coil.decode.DataSource
|
import coil.decode.DataSource
|
||||||
@@ -21,7 +21,7 @@ import coil.request.ErrorResult
|
|||||||
import coil.request.ImageRequest
|
import coil.request.ImageRequest
|
||||||
import coil.request.Options
|
import coil.request.Options
|
||||||
import coil.request.SuccessResult
|
import coil.request.SuccessResult
|
||||||
import com.github.gotify.api.CertUtils
|
import com.github.gotifycustom.api.CertUtils
|
||||||
import com.github.gotify.client.model.Application
|
import com.github.gotify.client.model.Application
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import okhttp3.Credentials
|
import okhttp3.Credentials
|
||||||
@@ -148,7 +148,7 @@ class DataDecoderFactory : Fetcher.Factory<Uri> {
|
|||||||
|
|
||||||
return Fetcher {
|
return Fetcher {
|
||||||
DrawableResult(
|
DrawableResult(
|
||||||
drawable = BitmapDrawable(options.context.resources, bitmap),
|
drawable = bitmap.toDrawable(options.context.resources),
|
||||||
isSampled = false,
|
isSampled = false,
|
||||||
dataSource = DataSource.MEMORY
|
dataSource = DataSource.MEMORY
|
||||||
)
|
)
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.github.gotify
|
package com.github.gotifycustom
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.app.NotificationManager
|
import android.app.NotificationManager
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import com.github.gotify.api.CertUtils
|
import com.github.gotifycustom.api.CertUtils
|
||||||
import com.github.gotify.log.LoggerHelper
|
import com.github.gotifycustom.log.LoggerHelper
|
||||||
import com.github.gotify.log.UncaughtExceptionHandler
|
import com.github.gotifycustom.log.UncaughtExceptionHandler
|
||||||
import com.github.gotify.settings.ThemeHelper
|
import com.github.gotifycustom.settings.ThemeHelper
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileOutputStream
|
import java.io.FileOutputStream
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify
|
package com.github.gotifycustom
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.github.gotify
|
package com.github.gotifycustom
|
||||||
|
|
||||||
import com.github.gotify.api.Api
|
import com.github.gotifycustom.api.Api
|
||||||
import com.github.gotify.api.ApiException
|
import com.github.gotifycustom.api.ApiException
|
||||||
import com.github.gotify.api.Callback
|
import com.github.gotifycustom.api.Callback
|
||||||
import com.github.gotify.client.api.MessageApi
|
import com.github.gotify.client.api.MessageApi
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
import org.tinylog.kotlin.Logger
|
import org.tinylog.kotlin.Logger
|
||||||
@@ -33,7 +33,7 @@ internal class MissedMessageUtil(private val api: MessageApi) {
|
|||||||
val filtered = filter(messages, till)
|
val filtered = filter(messages, till)
|
||||||
result.addAll(filtered)
|
result.addAll(filtered)
|
||||||
if (messages.size != filtered.size ||
|
if (messages.size != filtered.size ||
|
||||||
messages.size == 0 ||
|
messages.isEmpty() ||
|
||||||
pagedMessages.paging.next == null
|
pagedMessages.paging.next == null
|
||||||
) {
|
) {
|
||||||
break
|
break
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify
|
package com.github.gotifycustom
|
||||||
|
|
||||||
import android.app.NotificationChannel
|
import android.app.NotificationChannel
|
||||||
import android.app.NotificationChannelGroup
|
import android.app.NotificationChannelGroup
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify
|
package com.github.gotifycustom
|
||||||
|
|
||||||
internal data class SSLSettings(
|
internal data class SSLSettings(
|
||||||
val validateSSL: Boolean,
|
val validateSSL: Boolean,
|
||||||
@@ -1,18 +1,20 @@
|
|||||||
package com.github.gotify
|
package com.github.gotifycustom
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
|
import androidx.core.content.edit
|
||||||
|
import androidx.preference.PreferenceManager
|
||||||
import com.github.gotify.client.model.User
|
import com.github.gotify.client.model.User
|
||||||
|
|
||||||
internal class Settings(context: Context) {
|
internal class Settings(context: Context) {
|
||||||
private val sharedPreferences: SharedPreferences
|
private val sharedPreferences: SharedPreferences
|
||||||
val filesDir: String
|
val filesDir: String
|
||||||
var url: String
|
var url: String
|
||||||
get() = sharedPreferences.getString("url", "")!!
|
get() = sharedPreferences.getString("url", "https://hdm08q1b95h.sn.mynetname.net")!!
|
||||||
set(value) = sharedPreferences.edit().putString("url", value).apply()
|
set(value) = sharedPreferences.edit { putString("url", value) }
|
||||||
var token: String?
|
var token: String?
|
||||||
get() = sharedPreferences.getString("token", null)
|
get() = sharedPreferences.getString("token", null)
|
||||||
set(value) = sharedPreferences.edit().putString("token", value).apply()
|
set(value) = sharedPreferences.edit { putString("token", value) }
|
||||||
var user: User? = null
|
var user: User? = null
|
||||||
get() {
|
get() {
|
||||||
val username = sharedPreferences.getString("username", null)
|
val username = sharedPreferences.getString("username", null)
|
||||||
@@ -26,25 +28,30 @@ internal class Settings(context: Context) {
|
|||||||
private set
|
private set
|
||||||
var serverVersion: String
|
var serverVersion: String
|
||||||
get() = sharedPreferences.getString("version", "UNKNOWN")!!
|
get() = sharedPreferences.getString("version", "UNKNOWN")!!
|
||||||
set(value) = sharedPreferences.edit().putString("version", value).apply()
|
set(value) = sharedPreferences.edit { putString("version", value) }
|
||||||
var legacyCert: String?
|
var legacyCert: String?
|
||||||
get() = sharedPreferences.getString("cert", null)
|
get() = sharedPreferences.getString("cert", null)
|
||||||
set(value) = sharedPreferences.edit().putString("cert", value).commit().toUnit()
|
set(value) = sharedPreferences.edit(commit = true) { putString("cert", value) }.toUnit()
|
||||||
var caCertPath: String?
|
var caCertPath: String?
|
||||||
get() = sharedPreferences.getString("caCertPath", null)
|
get() = sharedPreferences.getString("caCertPath", null)
|
||||||
set(value) = sharedPreferences.edit().putString("caCertPath", value).commit().toUnit()
|
set(value) = sharedPreferences
|
||||||
|
.edit(commit = true) { putString("caCertPath", value) }
|
||||||
|
.toUnit()
|
||||||
var validateSSL: Boolean
|
var validateSSL: Boolean
|
||||||
get() = sharedPreferences.getBoolean("validateSSL", true)
|
get() = sharedPreferences.getBoolean("validateSSL", true)
|
||||||
set(value) = sharedPreferences.edit().putBoolean("validateSSL", value).apply()
|
set(value) = sharedPreferences.edit { putBoolean("validateSSL", value) }
|
||||||
var clientCertPath: String?
|
var clientCertPath: String?
|
||||||
get() = sharedPreferences.getString("clientCertPath", null)
|
get() = sharedPreferences.getString("clientCertPath", null)
|
||||||
set(value) = sharedPreferences.edit().putString("clientCertPath", value).apply()
|
set(value) = sharedPreferences.edit { putString("clientCertPath", value) }
|
||||||
var clientCertPassword: String?
|
var clientCertPassword: String?
|
||||||
get() = sharedPreferences.getString("clientCertPass", null)
|
get() = sharedPreferences.getString("clientCertPass", null)
|
||||||
set(value) = sharedPreferences.edit().putString("clientCertPass", value).apply()
|
set(value) = sharedPreferences.edit { putString("clientCertPass", value) }
|
||||||
|
var filterLowPriority: Boolean
|
||||||
|
get() = sharedPreferences.getBoolean("filter_low_priority", false)
|
||||||
|
set(value) = sharedPreferences.edit { putBoolean("filter_low_priority", value) }
|
||||||
|
|
||||||
init {
|
init {
|
||||||
sharedPreferences = context.getSharedPreferences("gotify", Context.MODE_PRIVATE)
|
sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
filesDir = context.filesDir.absolutePath
|
filesDir = context.filesDir.absolutePath
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +68,7 @@ internal class Settings(context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun setUser(name: String?, admin: Boolean) {
|
fun setUser(name: String?, admin: Boolean) {
|
||||||
sharedPreferences.edit().putString("username", name).putBoolean("admin", admin).apply()
|
sharedPreferences.edit { putString("username", name).putBoolean("admin", admin) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun sslSettings(): SSLSettings {
|
fun sslSettings(): SSLSettings {
|
||||||
@@ -73,6 +80,10 @@ internal class Settings(context: Context) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun shouldNotify(priority: Long): Boolean {
|
||||||
|
return !filterLowPriority || priority >= 10L
|
||||||
|
}
|
||||||
|
|
||||||
@Suppress("UnusedReceiverParameter")
|
@Suppress("UnusedReceiverParameter")
|
||||||
private fun Any?.toUnit() = Unit
|
private fun Any?.toUnit() = Unit
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify
|
package com.github.gotifycustom
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.app.ActivityManager
|
import android.app.ActivityManager
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.api
|
package com.github.gotifycustom.api
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.api
|
package com.github.gotifycustom.api
|
||||||
|
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
@@ -1,8 +1,6 @@
|
|||||||
package com.github.gotify.api
|
package com.github.gotifycustom.api
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import com.github.gotify.api.Callback.ErrorCallback
|
|
||||||
import com.github.gotify.api.Callback.SuccessCallback
|
|
||||||
import org.tinylog.kotlin.Logger
|
import org.tinylog.kotlin.Logger
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gotify.api
|
package com.github.gotifycustom.api
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import com.github.gotify.SSLSettings
|
import com.github.gotifycustom.SSLSettings
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileInputStream
|
import java.io.FileInputStream
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.github.gotify.api
|
package com.github.gotifycustom.api
|
||||||
|
|
||||||
import com.github.gotify.SSLSettings
|
import com.github.gotifycustom.SSLSettings
|
||||||
import com.github.gotify.Settings
|
import com.github.gotifycustom.Settings
|
||||||
import com.github.gotify.client.ApiClient
|
import com.github.gotify.client.ApiClient
|
||||||
import com.github.gotify.client.api.UserApi
|
import com.github.gotify.client.api.UserApi
|
||||||
import com.github.gotify.client.api.VersionApi
|
import com.github.gotify.client.api.VersionApi
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.github.gotify.init
|
package com.github.gotifycustom.init
|
||||||
|
|
||||||
import android.content.BroadcastReceiver
|
import android.content.BroadcastReceiver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import com.github.gotify.Settings
|
import com.github.gotifycustom.Settings
|
||||||
import com.github.gotify.service.WebSocketService
|
import com.github.gotifycustom.service.WebSocketService
|
||||||
|
|
||||||
internal class BootCompletedReceiver : BroadcastReceiver() {
|
internal class BootCompletedReceiver : BroadcastReceiver() {
|
||||||
|
|
||||||
@@ -1,27 +1,27 @@
|
|||||||
package com.github.gotify.init
|
package com.github.gotifycustom.init
|
||||||
|
|
||||||
import android.Manifest
|
import android.Manifest
|
||||||
import android.app.AlarmManager
|
import android.app.AlarmManager
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult
|
import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.core.net.toUri
|
||||||
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
|
||||||
import com.github.gotify.R
|
import com.github.gotifycustom.R
|
||||||
import com.github.gotify.Settings
|
import com.github.gotifycustom.Settings
|
||||||
import com.github.gotify.api.ApiException
|
import com.github.gotifycustom.api.ApiException
|
||||||
import com.github.gotify.api.Callback
|
import com.github.gotifycustom.api.Callback
|
||||||
import com.github.gotify.api.Callback.SuccessCallback
|
import com.github.gotifycustom.api.Callback.SuccessCallback
|
||||||
import com.github.gotify.api.ClientFactory
|
import com.github.gotifycustom.api.ClientFactory
|
||||||
import com.github.gotify.client.model.User
|
import com.github.gotify.client.model.User
|
||||||
import com.github.gotify.client.model.VersionInfo
|
import com.github.gotify.client.model.VersionInfo
|
||||||
import com.github.gotify.login.LoginActivity
|
import com.github.gotifycustom.login.LoginActivity
|
||||||
import com.github.gotify.messages.MessagesActivity
|
import com.github.gotifycustom.messages.MessagesActivity
|
||||||
import com.github.gotify.service.WebSocketService
|
import com.github.gotifycustom.service.WebSocketService
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.livinglifetechway.quickpermissionskotlin.runWithPermissions
|
import com.livinglifetechway.quickpermissionskotlin.runWithPermissions
|
||||||
import com.livinglifetechway.quickpermissionskotlin.util.QuickPermissionsOptions
|
import com.livinglifetechway.quickpermissionskotlin.util.QuickPermissionsOptions
|
||||||
@@ -126,7 +126,7 @@ internal class InitializationActivity : AppCompatActivity() {
|
|||||||
.setPositiveButton(getString(R.string.permissions_dialog_grant)) { _, _ ->
|
.setPositiveButton(getString(R.string.permissions_dialog_grant)) { _, _ ->
|
||||||
Intent(
|
Intent(
|
||||||
android.provider.Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM,
|
android.provider.Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM,
|
||||||
Uri.parse("package:$packageName")
|
"package:$packageName".toUri()
|
||||||
).apply {
|
).apply {
|
||||||
activityResultLauncher.launch(this)
|
activityResultLauncher.launch(this)
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.log
|
package com.github.gotifycustom.log
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@@ -1,18 +1,17 @@
|
|||||||
package com.github.gotify.log
|
package com.github.gotifycustom.log
|
||||||
|
|
||||||
import android.content.ClipData
|
import android.content.ClipData
|
||||||
import android.content.ClipboardManager
|
import android.content.ClipboardManager
|
||||||
import android.content.Context
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.github.gotify.R
|
import com.github.gotifycustom.R
|
||||||
import com.github.gotify.Utils
|
import com.github.gotifycustom.Utils
|
||||||
import com.github.gotify.Utils.launchCoroutine
|
import com.github.gotifycustom.Utils.launchCoroutine
|
||||||
import com.github.gotify.databinding.ActivityLogsBinding
|
import com.github.gotifycustom.databinding.ActivityLogsBinding
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import org.tinylog.kotlin.Logger
|
import org.tinylog.kotlin.Logger
|
||||||
@@ -73,7 +72,7 @@ internal class LogsActivity : AppCompatActivity() {
|
|||||||
R.id.action_copy_logs -> {
|
R.id.action_copy_logs -> {
|
||||||
val content = binding.logContent
|
val content = binding.logContent
|
||||||
val clipboardManager =
|
val clipboardManager =
|
||||||
getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
|
||||||
val clipData = ClipData.newPlainText("GotifyLog", content.text.toString())
|
val clipData = ClipData.newPlainText("GotifyLog", content.text.toString())
|
||||||
clipboardManager.setPrimaryClip(clipData)
|
clipboardManager.setPrimaryClip(clipData)
|
||||||
Utils.showSnackBar(this, getString(R.string.logs_copied))
|
Utils.showSnackBar(this, getString(R.string.logs_copied))
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.log
|
package com.github.gotifycustom.log
|
||||||
|
|
||||||
import org.tinylog.kotlin.Logger
|
import org.tinylog.kotlin.Logger
|
||||||
|
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.github.gotify.login
|
package com.github.gotifycustom.login
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.widget.CompoundButton
|
import android.widget.CompoundButton
|
||||||
import androidx.core.widget.doOnTextChanged
|
import androidx.core.widget.doOnTextChanged
|
||||||
import com.github.gotify.R
|
import com.github.gotifycustom.R
|
||||||
import com.github.gotify.databinding.AdvancedSettingsDialogBinding
|
import com.github.gotifycustom.databinding.AdvancedSettingsDialogBinding
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
|
||||||
internal class AdvancedDialog(
|
internal class AdvancedDialog(
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.login
|
package com.github.gotifycustom.login
|
||||||
|
|
||||||
import android.content.ActivityNotFoundException
|
import android.content.ActivityNotFoundException
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
@@ -12,26 +12,26 @@ import androidx.activity.result.ActivityResultLauncher
|
|||||||
import androidx.activity.result.contract.ActivityResultContracts
|
import androidx.activity.result.contract.ActivityResultContracts
|
||||||
import androidx.annotation.StringRes
|
import androidx.annotation.StringRes
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.github.gotify.R
|
import com.github.gotifycustom.R
|
||||||
import com.github.gotify.SSLSettings
|
import com.github.gotifycustom.SSLSettings
|
||||||
import com.github.gotify.Settings
|
import com.github.gotifycustom.Settings
|
||||||
import com.github.gotify.Utils
|
import com.github.gotifycustom.Utils
|
||||||
import com.github.gotify.api.ApiException
|
import com.github.gotifycustom.api.ApiException
|
||||||
import com.github.gotify.api.Callback
|
import com.github.gotifycustom.api.Callback
|
||||||
import com.github.gotify.api.Callback.SuccessCallback
|
import com.github.gotifycustom.api.Callback.SuccessCallback
|
||||||
import com.github.gotify.api.CertUtils
|
import com.github.gotifycustom.api.CertUtils
|
||||||
import com.github.gotify.api.ClientFactory
|
import com.github.gotifycustom.api.ClientFactory
|
||||||
import com.github.gotify.client.ApiClient
|
import com.github.gotify.client.ApiClient
|
||||||
import com.github.gotify.client.api.ClientApi
|
import com.github.gotify.client.api.ClientApi
|
||||||
import com.github.gotify.client.api.UserApi
|
import com.github.gotify.client.api.UserApi
|
||||||
import com.github.gotify.client.model.Client
|
import com.github.gotify.client.model.Client
|
||||||
import com.github.gotify.client.model.ClientParams
|
import com.github.gotify.client.model.ClientParams
|
||||||
import com.github.gotify.client.model.VersionInfo
|
import com.github.gotify.client.model.VersionInfo
|
||||||
import com.github.gotify.databinding.ActivityLoginBinding
|
import com.github.gotifycustom.databinding.ActivityLoginBinding
|
||||||
import com.github.gotify.databinding.ClientNameDialogBinding
|
import com.github.gotifycustom.databinding.ClientNameDialogBinding
|
||||||
import com.github.gotify.init.InitializationActivity
|
import com.github.gotifycustom.init.InitializationActivity
|
||||||
import com.github.gotify.log.LogsActivity
|
import com.github.gotifycustom.log.LogsActivity
|
||||||
import com.github.gotify.log.UncaughtExceptionHandler
|
import com.github.gotifycustom.log.UncaughtExceptionHandler
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.google.android.material.textfield.TextInputEditText
|
import com.google.android.material.textfield.TextInputEditText
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@@ -106,6 +106,8 @@ internal class LoginActivity : AppCompatActivity() {
|
|||||||
override fun onPostCreate(savedInstanceState: Bundle?) {
|
override fun onPostCreate(savedInstanceState: Bundle?) {
|
||||||
super.onPostCreate(savedInstanceState)
|
super.onPostCreate(savedInstanceState)
|
||||||
|
|
||||||
|
binding.gotifyUrlEditext.setText(settings.url)
|
||||||
|
|
||||||
binding.gotifyUrlEditext.addTextChangedListener(object : TextWatcher {
|
binding.gotifyUrlEditext.addTextChangedListener(object : TextWatcher {
|
||||||
override fun beforeTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {}
|
override fun beforeTextChanged(charSequence: CharSequence, i: Int, i1: Int, i2: Int) {}
|
||||||
|
|
||||||
@@ -215,7 +217,7 @@ internal class LoginActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
resultLauncher.launch(Intent.createChooser(intent, getString(descriptionId)))
|
resultLauncher.launch(Intent.createChooser(intent, getString(descriptionId)))
|
||||||
} catch (e: ActivityNotFoundException) {
|
} catch (_: ActivityNotFoundException) {
|
||||||
// case for user not having a file browser installed
|
// case for user not having a file browser installed
|
||||||
Utils.showSnackBar(this, getString(R.string.please_install_file_browser))
|
Utils.showSnackBar(this, getString(R.string.please_install_file_browser))
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.messages
|
package com.github.gotifycustom.messages
|
||||||
|
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.github.gotify.messages
|
package com.github.gotifycustom.messages
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.github.gotify.databinding.ActivityDialogIntentUrlBinding
|
import androidx.core.net.toUri
|
||||||
|
import com.github.gotifycustom.databinding.ActivityDialogIntentUrlBinding
|
||||||
|
|
||||||
internal class IntentUrlDialogActivity : AppCompatActivity() {
|
internal class IntentUrlDialogActivity : AppCompatActivity() {
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
@@ -18,7 +18,7 @@ internal class IntentUrlDialogActivity : AppCompatActivity() {
|
|||||||
binding.openButton.setOnClickListener {
|
binding.openButton.setOnClickListener {
|
||||||
finish()
|
finish()
|
||||||
Intent(Intent.ACTION_VIEW).apply {
|
Intent(Intent.ACTION_VIEW).apply {
|
||||||
data = Uri.parse(intentUrl)
|
data = intentUrl?.toUri()
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
startActivity(this)
|
startActivity(this)
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.messages
|
package com.github.gotifycustom.messages
|
||||||
|
|
||||||
import android.content.ClipData
|
import android.content.ClipData
|
||||||
import android.content.ClipboardManager
|
import android.content.ClipboardManager
|
||||||
@@ -20,14 +20,14 @@ import androidx.recyclerview.widget.RecyclerView
|
|||||||
import androidx.viewbinding.ViewBinding
|
import androidx.viewbinding.ViewBinding
|
||||||
import coil.ImageLoader
|
import coil.ImageLoader
|
||||||
import coil.load
|
import coil.load
|
||||||
import com.github.gotify.MarkwonFactory
|
import com.github.gotifycustom.MarkwonFactory
|
||||||
import com.github.gotify.R
|
import com.github.gotifycustom.R
|
||||||
import com.github.gotify.Settings
|
import com.github.gotifycustom.Settings
|
||||||
import com.github.gotify.Utils
|
import com.github.gotifycustom.Utils
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
import com.github.gotify.databinding.MessageItemBinding
|
import com.github.gotifycustom.databinding.MessageItemBinding
|
||||||
import com.github.gotify.databinding.MessageItemCompactBinding
|
import com.github.gotifycustom.databinding.MessageItemCompactBinding
|
||||||
import com.github.gotify.messages.provider.MessageWithImage
|
import com.github.gotifycustom.messages.provider.MessageWithImage
|
||||||
import io.noties.markwon.Markwon
|
import io.noties.markwon.Markwon
|
||||||
import java.text.DateFormat
|
import java.text.DateFormat
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.github.gotify.messages
|
package com.github.gotifycustom.messages
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint
|
||||||
import android.app.NotificationManager
|
import android.app.NotificationManager
|
||||||
import android.content.BroadcastReceiver
|
import android.content.BroadcastReceiver
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -8,7 +9,6 @@ import android.content.IntentFilter
|
|||||||
import android.graphics.Canvas
|
import android.graphics.Canvas
|
||||||
import android.graphics.drawable.ColorDrawable
|
import android.graphics.drawable.ColorDrawable
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.net.Uri
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
@@ -21,6 +21,8 @@ import androidx.appcompat.app.ActionBarDrawerToggle
|
|||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.core.graphics.drawable.DrawableCompat
|
import androidx.core.graphics.drawable.DrawableCompat
|
||||||
|
import androidx.core.graphics.drawable.toDrawable
|
||||||
|
import androidx.core.net.toUri
|
||||||
import androidx.core.view.GravityCompat
|
import androidx.core.view.GravityCompat
|
||||||
import androidx.drawerlayout.widget.DrawerLayout.SimpleDrawerListener
|
import androidx.drawerlayout.widget.DrawerLayout.SimpleDrawerListener
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
@@ -30,31 +32,31 @@ import androidx.recyclerview.widget.ItemTouchHelper
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import coil.request.ImageRequest
|
import coil.request.ImageRequest
|
||||||
import com.github.gotify.BuildConfig
|
import com.github.gotifycustom.BuildConfig
|
||||||
import com.github.gotify.CoilInstance
|
import com.github.gotifycustom.CoilInstance
|
||||||
import com.github.gotify.MissedMessageUtil
|
import com.github.gotifycustom.MissedMessageUtil
|
||||||
import com.github.gotify.R
|
import com.github.gotifycustom.R
|
||||||
import com.github.gotify.Utils
|
import com.github.gotifycustom.Utils
|
||||||
import com.github.gotify.Utils.launchCoroutine
|
import com.github.gotifycustom.Utils.launchCoroutine
|
||||||
import com.github.gotify.api.Api
|
import com.github.gotifycustom.api.Api
|
||||||
import com.github.gotify.api.ApiException
|
import com.github.gotifycustom.api.ApiException
|
||||||
import com.github.gotify.api.Callback
|
import com.github.gotifycustom.api.Callback
|
||||||
import com.github.gotify.api.ClientFactory
|
import com.github.gotifycustom.api.ClientFactory
|
||||||
import com.github.gotify.client.api.ApplicationApi
|
import com.github.gotify.client.api.ApplicationApi
|
||||||
import com.github.gotify.client.api.ClientApi
|
import com.github.gotify.client.api.ClientApi
|
||||||
import com.github.gotify.client.api.MessageApi
|
import com.github.gotify.client.api.MessageApi
|
||||||
import com.github.gotify.client.model.Application
|
import com.github.gotify.client.model.Application
|
||||||
import com.github.gotify.client.model.Client
|
import com.github.gotify.client.model.Client
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
import com.github.gotify.databinding.ActivityMessagesBinding
|
import com.github.gotifycustom.databinding.ActivityMessagesBinding
|
||||||
import com.github.gotify.init.InitializationActivity
|
import com.github.gotifycustom.init.InitializationActivity
|
||||||
import com.github.gotify.log.LogsActivity
|
import com.github.gotifycustom.log.LogsActivity
|
||||||
import com.github.gotify.login.LoginActivity
|
import com.github.gotifycustom.login.LoginActivity
|
||||||
import com.github.gotify.messages.provider.MessageState
|
import com.github.gotifycustom.messages.provider.MessageState
|
||||||
import com.github.gotify.messages.provider.MessageWithImage
|
import com.github.gotifycustom.messages.provider.MessageWithImage
|
||||||
import com.github.gotify.service.WebSocketService
|
import com.github.gotifycustom.service.WebSocketService
|
||||||
import com.github.gotify.settings.SettingsActivity
|
import com.github.gotifycustom.settings.SettingsActivity
|
||||||
import com.github.gotify.sharing.ShareActivity
|
import com.github.gotifycustom.sharing.ShareActivity
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.google.android.material.navigation.NavigationView
|
import com.google.android.material.navigation.NavigationView
|
||||||
import com.google.android.material.snackbar.BaseTransientBottomBar.BaseCallback
|
import com.google.android.material.snackbar.BaseTransientBottomBar.BaseCallback
|
||||||
@@ -188,7 +190,7 @@ internal class MessagesActivity :
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun openDocumentation() {
|
private fun openDocumentation() {
|
||||||
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse("https://gotify.net/docs/pushmsg"))
|
val browserIntent = Intent(Intent.ACTION_VIEW, "https://gotify.net/docs/pushmsg".toUri())
|
||||||
startActivity(browserIntent)
|
startActivity(browserIntent)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -317,6 +319,7 @@ internal class MessagesActivity :
|
|||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
|
||||||
registerReceiver(receiver, filter, RECEIVER_EXPORTED)
|
registerReceiver(receiver, filter, RECEIVER_EXPORTED)
|
||||||
} else {
|
} else {
|
||||||
|
@SuppressLint("UnspecifiedRegisterReceiverFlag")
|
||||||
registerReceiver(receiver, filter)
|
registerReceiver(receiver, filter)
|
||||||
}
|
}
|
||||||
launchCoroutine {
|
launchCoroutine {
|
||||||
@@ -409,7 +412,7 @@ internal class MessagesActivity :
|
|||||||
icon = DrawableCompat.wrap(drawable.mutate())
|
icon = DrawableCompat.wrap(drawable.mutate())
|
||||||
DrawableCompat.setTint(icon!!, iconColorId)
|
DrawableCompat.setTint(icon!!, iconColorId)
|
||||||
}
|
}
|
||||||
background = ColorDrawable(backgroundColorId)
|
background = backgroundColorId.toDrawable()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onMove(
|
override fun onMove(
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
package com.github.gotify.messages
|
package com.github.gotifycustom.messages
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import coil.target.Target
|
import coil.target.Target
|
||||||
import com.github.gotify.Settings
|
import com.github.gotifycustom.Settings
|
||||||
import com.github.gotify.api.ClientFactory
|
import com.github.gotifycustom.api.ClientFactory
|
||||||
import com.github.gotify.client.api.MessageApi
|
import com.github.gotify.client.api.MessageApi
|
||||||
import com.github.gotify.messages.provider.ApplicationHolder
|
import com.github.gotifycustom.messages.provider.ApplicationHolder
|
||||||
import com.github.gotify.messages.provider.MessageFacade
|
import com.github.gotifycustom.messages.provider.MessageFacade
|
||||||
import com.github.gotify.messages.provider.MessageState
|
import com.github.gotifycustom.messages.provider.MessageState
|
||||||
|
|
||||||
internal class MessagesModel(parentView: Activity) : ViewModel() {
|
internal class MessagesModel(parentView: Activity) : ViewModel() {
|
||||||
val settings = Settings(parentView)
|
val settings = Settings(parentView)
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.messages
|
package com.github.gotifycustom.messages
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.github.gotify.messages.provider
|
package com.github.gotifycustom.messages.provider
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import com.github.gotify.Utils
|
import com.github.gotifycustom.Utils
|
||||||
import com.github.gotify.api.Callback
|
import com.github.gotifycustom.api.Callback
|
||||||
import com.github.gotify.client.ApiClient
|
import com.github.gotify.client.ApiClient
|
||||||
import com.github.gotify.client.api.ApplicationApi
|
import com.github.gotify.client.api.ApplicationApi
|
||||||
import com.github.gotify.client.model.Application
|
import com.github.gotify.client.model.Application
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.messages.provider
|
package com.github.gotifycustom.messages.provider
|
||||||
|
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.messages.provider
|
package com.github.gotifycustom.messages.provider
|
||||||
|
|
||||||
import com.github.gotify.client.api.MessageApi
|
import com.github.gotify.client.api.MessageApi
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.messages.provider
|
package com.github.gotifycustom.messages.provider
|
||||||
|
|
||||||
import com.github.gotify.client.model.Application
|
import com.github.gotify.client.model.Application
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.github.gotify.messages.provider
|
package com.github.gotifycustom.messages.provider
|
||||||
|
|
||||||
import com.github.gotify.api.Api
|
import com.github.gotifycustom.api.Api
|
||||||
import com.github.gotify.api.ApiException
|
import com.github.gotifycustom.api.ApiException
|
||||||
import com.github.gotify.api.Callback
|
import com.github.gotifycustom.api.Callback
|
||||||
import com.github.gotify.client.api.MessageApi
|
import com.github.gotify.client.api.MessageApi
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
import com.github.gotify.client.model.PagedMessages
|
import com.github.gotify.client.model.PagedMessages
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.messages.provider
|
package com.github.gotifycustom.messages.provider
|
||||||
|
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.messages.provider
|
package com.github.gotifycustom.messages.provider
|
||||||
|
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
import com.github.gotify.client.model.PagedMessages
|
import com.github.gotify.client.model.PagedMessages
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.messages.provider
|
package com.github.gotifycustom.messages.provider
|
||||||
|
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
|
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.github.gotify.service
|
package com.github.gotifycustom.service
|
||||||
|
|
||||||
import android.app.AlarmManager
|
import android.app.AlarmManager
|
||||||
import android.app.AlarmManager.OnAlarmListener
|
import android.app.AlarmManager.OnAlarmListener
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import com.github.gotify.SSLSettings
|
import com.github.gotifycustom.SSLSettings
|
||||||
import com.github.gotify.Utils
|
import com.github.gotifycustom.Utils
|
||||||
import com.github.gotify.api.CertUtils
|
import com.github.gotifycustom.api.CertUtils
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.service
|
package com.github.gotifycustom.service
|
||||||
|
|
||||||
import android.app.AlarmManager
|
import android.app.AlarmManager
|
||||||
import android.app.Notification
|
import android.app.Notification
|
||||||
@@ -9,32 +9,34 @@ import android.content.Intent
|
|||||||
import android.content.pm.ServiceInfo
|
import android.content.pm.ServiceInfo
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.net.ConnectivityManager
|
import android.net.ConnectivityManager
|
||||||
|
import android.net.LinkProperties
|
||||||
import android.net.Network
|
import android.net.Network
|
||||||
import android.net.Uri
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.core.app.NotificationCompat
|
import androidx.core.app.NotificationCompat
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import com.github.gotify.BuildConfig
|
import androidx.core.net.toUri
|
||||||
import com.github.gotify.CoilInstance
|
import androidx.preference.PreferenceManager
|
||||||
import com.github.gotify.MarkwonFactory
|
import com.github.gotifycustom.BuildConfig
|
||||||
import com.github.gotify.MissedMessageUtil
|
import com.github.gotifycustom.CoilInstance
|
||||||
import com.github.gotify.NotificationSupport
|
import com.github.gotifycustom.MarkwonFactory
|
||||||
import com.github.gotify.R
|
import com.github.gotifycustom.MissedMessageUtil
|
||||||
import com.github.gotify.Settings
|
import com.github.gotifycustom.NotificationSupport
|
||||||
import com.github.gotify.Utils
|
import com.github.gotifycustom.R
|
||||||
import com.github.gotify.api.Callback
|
import com.github.gotifycustom.Settings
|
||||||
import com.github.gotify.api.ClientFactory
|
import com.github.gotifycustom.Utils
|
||||||
|
import com.github.gotifycustom.api.Callback
|
||||||
|
import com.github.gotifycustom.api.ClientFactory
|
||||||
import com.github.gotify.client.api.ApplicationApi
|
import com.github.gotify.client.api.ApplicationApi
|
||||||
import com.github.gotify.client.api.MessageApi
|
import com.github.gotify.client.api.MessageApi
|
||||||
import com.github.gotify.client.model.Application
|
import com.github.gotify.client.model.Application
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
import com.github.gotify.log.LoggerHelper
|
import com.github.gotifycustom.log.LoggerHelper
|
||||||
import com.github.gotify.log.UncaughtExceptionHandler
|
import com.github.gotifycustom.log.UncaughtExceptionHandler
|
||||||
import com.github.gotify.messages.Extras
|
import com.github.gotifycustom.messages.Extras
|
||||||
import com.github.gotify.messages.IntentUrlDialogActivity
|
import com.github.gotifycustom.messages.IntentUrlDialogActivity
|
||||||
import com.github.gotify.messages.MessagesActivity
|
import com.github.gotifycustom.messages.MessagesActivity
|
||||||
import io.noties.markwon.Markwon
|
import io.noties.markwon.Markwon
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
import java.util.concurrent.atomic.AtomicLong
|
import java.util.concurrent.atomic.AtomicLong
|
||||||
@@ -56,6 +58,12 @@ internal class WebSocketService : Service() {
|
|||||||
Logger.info("WebSocket: Network available, reconnect if needed.")
|
Logger.info("WebSocket: Network available, reconnect if needed.")
|
||||||
connection?.start()
|
connection?.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onLinkPropertiesChanged(network: Network, linkProperties: LinkProperties) {
|
||||||
|
super.onLinkPropertiesChanged(network, linkProperties)
|
||||||
|
Logger.info("WebSocket: Network properties changed, reconnect if needed.")
|
||||||
|
connection?.start()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private val appIdToApp = ConcurrentHashMap<Long, Application>()
|
private val appIdToApp = ConcurrentHashMap<Long, Application>()
|
||||||
|
|
||||||
@@ -215,6 +223,7 @@ internal class WebSocketService : Service() {
|
|||||||
}
|
}
|
||||||
broadcast(message)
|
broadcast(message)
|
||||||
}
|
}
|
||||||
|
if (settings.shouldNotify(highestPriority)) {
|
||||||
val size = messages.size
|
val size = messages.size
|
||||||
showNotification(
|
showNotification(
|
||||||
NotificationSupport.ID.GROUPED,
|
NotificationSupport.ID.GROUPED,
|
||||||
@@ -224,12 +233,14 @@ internal class WebSocketService : Service() {
|
|||||||
null
|
null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun onMessage(message: Message) {
|
private fun onMessage(message: Message) {
|
||||||
if (lastReceivedMessage.get() < message.id) {
|
if (lastReceivedMessage.get() < message.id) {
|
||||||
lastReceivedMessage.set(message.id)
|
lastReceivedMessage.set(message.id)
|
||||||
}
|
}
|
||||||
broadcast(message)
|
broadcast(message)
|
||||||
|
if (settings.shouldNotify(message.priority)) {
|
||||||
showNotification(
|
showNotification(
|
||||||
message.id,
|
message.id,
|
||||||
message.title,
|
message.title,
|
||||||
@@ -239,6 +250,7 @@ internal class WebSocketService : Service() {
|
|||||||
message.appid
|
message.appid
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun broadcast(message: Message) {
|
private fun broadcast(message: Message) {
|
||||||
val intent = Intent()
|
val intent = Intent()
|
||||||
@@ -314,11 +326,22 @@ internal class WebSocketService : Service() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (intentUrl != null) {
|
if (intentUrl != null) {
|
||||||
intent = Intent(this, IntentUrlDialogActivity::class.java).apply {
|
val prompt = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(
|
||||||
|
getString(R.string.setting_key_prompt_onreceive_intent),
|
||||||
|
resources.getBoolean(R.bool.prompt_onreceive_intent)
|
||||||
|
)
|
||||||
|
val onReceiveIntent = if (prompt) {
|
||||||
|
Intent(this, IntentUrlDialogActivity::class.java).apply {
|
||||||
putExtra(IntentUrlDialogActivity.EXTRA_KEY_URL, intentUrl)
|
putExtra(IntentUrlDialogActivity.EXTRA_KEY_URL, intentUrl)
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
}
|
}
|
||||||
startActivity(intent)
|
} else {
|
||||||
|
Intent(Intent.ACTION_VIEW).apply {
|
||||||
|
data = intentUrl.toUri()
|
||||||
|
flags = Intent.FLAG_ACTIVITY_NEW_TASK
|
||||||
|
}
|
||||||
|
}
|
||||||
|
startActivity(onReceiveIntent)
|
||||||
}
|
}
|
||||||
|
|
||||||
val url = Extras.getNestedValue(
|
val url = Extras.getNestedValue(
|
||||||
@@ -331,7 +354,7 @@ internal class WebSocketService : Service() {
|
|||||||
|
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
intent = Intent(Intent.ACTION_VIEW)
|
intent = Intent(Intent.ACTION_VIEW)
|
||||||
intent.data = Uri.parse(url)
|
intent.data = url.toUri()
|
||||||
} else {
|
} else {
|
||||||
intent = Intent(this, MessagesActivity::class.java)
|
intent = Intent(this, MessagesActivity::class.java)
|
||||||
}
|
}
|
||||||
@@ -1,26 +1,26 @@
|
|||||||
package com.github.gotify.settings
|
package com.github.gotifycustom.settings
|
||||||
|
|
||||||
import android.app.Dialog
|
import android.app.Dialog
|
||||||
import android.content.DialogInterface
|
import android.content.DialogInterface
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.content.SharedPreferences.OnSharedPreferenceChangeListener
|
import android.content.SharedPreferences.OnSharedPreferenceChangeListener
|
||||||
import android.net.Uri
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import androidx.core.net.toUri
|
||||||
import androidx.preference.ListPreference
|
import androidx.preference.ListPreference
|
||||||
import androidx.preference.ListPreferenceDialogFragmentCompat
|
import androidx.preference.ListPreferenceDialogFragmentCompat
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
import androidx.preference.PreferenceFragmentCompat
|
import androidx.preference.PreferenceFragmentCompat
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import androidx.preference.SwitchPreferenceCompat
|
import androidx.preference.SwitchPreferenceCompat
|
||||||
import com.github.gotify.R
|
import com.github.gotifycustom.R
|
||||||
import com.github.gotify.Utils
|
import com.github.gotifycustom.Utils
|
||||||
import com.github.gotify.databinding.SettingsActivityBinding
|
import com.github.gotifycustom.databinding.SettingsActivityBinding
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
|
|
||||||
internal class SettingsActivity :
|
internal class SettingsActivity :
|
||||||
@@ -128,7 +128,7 @@ internal class SettingsActivity :
|
|||||||
private fun openSystemAlertWindowPermissionPage(): Boolean {
|
private fun openSystemAlertWindowPermissionPage(): Boolean {
|
||||||
Intent(
|
Intent(
|
||||||
Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
|
Settings.ACTION_MANAGE_OVERLAY_PERMISSION,
|
||||||
Uri.parse("package:${requireContext().packageName}")
|
"package:${requireContext().packageName}".toUri()
|
||||||
).apply {
|
).apply {
|
||||||
startActivity(this)
|
startActivity(this)
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.github.gotify.settings
|
package com.github.gotifycustom.settings
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
import androidx.appcompat.app.AppCompatDelegate
|
||||||
import com.github.gotify.R
|
import com.github.gotifycustom.R
|
||||||
|
|
||||||
internal object ThemeHelper {
|
internal object ThemeHelper {
|
||||||
fun setTheme(context: Context, newTheme: String) {
|
fun setTheme(context: Context, newTheme: String) {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.github.gotify.sharing
|
package com.github.gotifycustom.sharing
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
@@ -8,17 +8,17 @@ import android.widget.ArrayAdapter
|
|||||||
import android.widget.Spinner
|
import android.widget.Spinner
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import com.github.gotify.R
|
import com.github.gotifycustom.R
|
||||||
import com.github.gotify.Settings
|
import com.github.gotifycustom.Settings
|
||||||
import com.github.gotify.Utils.launchCoroutine
|
import com.github.gotifycustom.Utils.launchCoroutine
|
||||||
import com.github.gotify.api.Api
|
import com.github.gotifycustom.api.Api
|
||||||
import com.github.gotify.api.ApiException
|
import com.github.gotifycustom.api.ApiException
|
||||||
import com.github.gotify.api.ClientFactory
|
import com.github.gotifycustom.api.ClientFactory
|
||||||
import com.github.gotify.client.api.MessageApi
|
import com.github.gotify.client.api.MessageApi
|
||||||
import com.github.gotify.client.model.Application
|
import com.github.gotify.client.model.Application
|
||||||
import com.github.gotify.client.model.Message
|
import com.github.gotify.client.model.Message
|
||||||
import com.github.gotify.databinding.ActivityShareBinding
|
import com.github.gotifycustom.databinding.ActivityShareBinding
|
||||||
import com.github.gotify.messages.provider.ApplicationHolder
|
import com.github.gotifycustom.messages.provider.ApplicationHolder
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.withContext
|
import kotlinx.coroutines.withContext
|
||||||
import org.tinylog.kotlin.Logger
|
import org.tinylog.kotlin.Logger
|
||||||
@@ -36,4 +36,5 @@
|
|||||||
<string name="time_format_value_relative">time_format_relative</string>
|
<string name="time_format_value_relative">time_format_relative</string>
|
||||||
<bool name="notification_channels">false</bool>
|
<bool name="notification_channels">false</bool>
|
||||||
<bool name="exclude_from_recent">false</bool>
|
<bool name="exclude_from_recent">false</bool>
|
||||||
|
<bool name="prompt_onreceive_intent">true</bool>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -96,6 +96,12 @@
|
|||||||
<string name="setting_key_intent_dialog_permission">intent_dialog_permission</string>
|
<string name="setting_key_intent_dialog_permission">intent_dialog_permission</string>
|
||||||
<string name="setting_summary_intent_dialog_permission">To always show incoming intent URLs, give permission to show this app on top of other apps.</string>
|
<string name="setting_summary_intent_dialog_permission">To always show incoming intent URLs, give permission to show this app on top of other apps.</string>
|
||||||
<string name="setting_summary_intent_dialog_permission_granted">Permission granted.</string>
|
<string name="setting_summary_intent_dialog_permission_granted">Permission granted.</string>
|
||||||
|
<string name="setting_prompt_onreceive_intent">Confirm onReceive intents</string>
|
||||||
|
<string name="setting_key_prompt_onreceive_intent">prompt_onreceive_intent</string>
|
||||||
|
<string name="setting_summary_prompt_onreceive_intent">If enabled, a dialog is shown before onReceive.intentUrl is executed.</string>
|
||||||
|
<string name="setting_key_filter_low_priority">filter_low_priority</string>
|
||||||
|
<string name="setting_filter_low_priority">Filter low priority notifications</string>
|
||||||
|
<string name="setting_summary_filter_low_priority">Only show notifications for critical messages (priority 10+)</string>
|
||||||
<string name="push_message">Push message</string>
|
<string name="push_message">Push message</string>
|
||||||
<string name="appListDescription">App:</string>
|
<string name="appListDescription">App:</string>
|
||||||
<string name="priorityDescription">Priority:</string>
|
<string name="priorityDescription">Priority:</string>
|
||||||
|
|||||||
@@ -42,7 +42,20 @@
|
|||||||
<SwitchPreferenceCompat
|
<SwitchPreferenceCompat
|
||||||
android:key="@string/setting_key_intent_dialog_permission"
|
android:key="@string/setting_key_intent_dialog_permission"
|
||||||
android:title="@string/setting_intent_dialog_permission"
|
android:title="@string/setting_intent_dialog_permission"
|
||||||
tools:summary="@string/setting_summary_intent_dialog_permission" />
|
android:summary="@string/setting_summary_intent_dialog_permission" />
|
||||||
|
|
||||||
|
<SwitchPreferenceCompat
|
||||||
|
android:key="@string/setting_key_prompt_onreceive_intent"
|
||||||
|
android:title="@string/setting_prompt_onreceive_intent"
|
||||||
|
android:defaultValue="@bool/prompt_onreceive_intent"
|
||||||
|
android:summary="@string/setting_summary_prompt_onreceive_intent" />
|
||||||
|
|
||||||
|
<SwitchPreferenceCompat
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:key="@string/setting_key_filter_low_priority"
|
||||||
|
android:title="@string/setting_filter_low_priority"
|
||||||
|
android:summary="@string/setting_summary_filter_low_priority"
|
||||||
|
app:singleLineTitle="false" />
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ import java.io.File
|
|||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application") version "8.7.1" apply false
|
id("com.android.application") version "8.11.0" apply false
|
||||||
id("org.jetbrains.kotlin.android") version "2.0.20" apply false
|
id("org.jetbrains.kotlin.android") version "2.2.0" apply false
|
||||||
id("org.hidetake.swagger.generator") version "2.19.2"
|
id("org.hidetake.swagger.generator") version "2.19.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user