add button to jump into device & app notifications setting
add Polish translation, thanks to py3o4f4ifk5v9fko
update Italian translation, thanks to Giovanni Donisi (@gdonisi + @giovannidonisi)
This commit is contained in:
lucky 2022-07-10 09:07:12 +03:00
parent b528d49c45
commit b5bebfe838
9 changed files with 104 additions and 4 deletions

View File

@ -10,8 +10,8 @@ android {
applicationId "me.lucky.wasted"
minSdk 23
targetSdk 32
versionCode 31
versionName "1.5.2"
versionCode 32
versionName "1.5.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -63,6 +63,7 @@ open class MainActivity : AppCompatActivity() {
private fun getFragment(id: Int) = when (id) {
R.id.nav_main -> MainFragment()
R.id.nav_trigger_tile -> TileFragment()
R.id.nav_trigger_notification -> NotificationFragment()
R.id.nav_trigger_lock -> LockFragment()
R.id.top_settings -> SettingsFragment()
else -> MainFragment()

View File

@ -0,0 +1,31 @@
package me.lucky.wasted.fragment
import android.content.Intent
import android.os.Bundle
import android.provider.Settings
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import me.lucky.wasted.databinding.FragmentNotificationBinding
class NotificationFragment : Fragment() {
private lateinit var binding: FragmentNotificationBinding
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?,
): View {
binding = FragmentNotificationBinding.inflate(inflater, container, false)
setup()
return binding.root
}
private fun setup() = binding.apply {
gotoButton.setOnClickListener {
startActivity(Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS))
}
}
}

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragment.NotificationFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/gotoButton"
android:text="@string/goto_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?attr/textAppearanceTitleMedium"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@ -15,6 +15,10 @@
android:id="@+id/nav_trigger_tile"
android:title="@string/trigger_tile" />
<item
android:id="@+id/nav_trigger_notification"
android:title="@string/trigger_notification" />
<item
android:id="@+id/nav_trigger_lock"
android:title="@string/trigger_lock" />

View File

@ -12,6 +12,7 @@
<string name="trigger_lock_time_hint">tempo</string>
<string name="trigger_lock_time_error">7d / 48h / 120m</string>
<string name="trigger_lock_time_helper_text">Quanto tempo aspettare. Modificatori: [d]giorni [h]ore [m]minuti</string>
<string name="trigger_tile_delay_description">Ritardo sicuro prima di attivare. Dà un po\' di tempo per annullare l\'attivazione se si tocca accidentalmente un toggle.</string>
<string name="notification_channel_default_name">Predefinito</string>
<string name="foreground_service_notification_title">Guardia</string>
<string name="trigger_panic_kit">PanicKit</string>
@ -25,7 +26,7 @@
<string name="main">Principale</string>
<string name="settings">Impostazioni</string>
<string name="trigger_panic_kit_description">Abilita il panic responder. PanicKit è una raccolta di strumenti per la creazione di \"pulsanti di panico\" che possono attivare una risposta a livello di sistema quando l\'utente si trova in una situazione di ansia o di pericolo. Consente alle app trigger e alle app responder di connettersi tra loro in modo sicuro e semplice. L\'utente si collega all\'app trigger quando si trova in una situazione di panico. Le app di risposta ricevono il segnale di attivazione ed eseguono individualmente le operazioni per le quali sono state configurate.</string>
<string name="trigger_tile_description">Abilita il servizio toggle. Si tratta di un pulsante nel pannello delle impostazioni rapide quando scorri il dito dalla parte superiore dello schermo. Questo pulsante simula la modalità aereo. Ha un ritardo di due secondi se lo si tocca accidentalmente.</string>
<string name="trigger_tile_description">Abilita il servizio toggle. Si tratta di un pulsante nel pannello delle impostazioni rapide quando scorri il dito dalla parte superiore dello schermo. Questo pulsante simula la modalità aereo.</string>
<string name="trigger_shortcut_description">Abilita la scorciatoia dell\'icona. È un pulsante che viene visualizzato quando si tocca a lungo l\'icona di Wasted.</string>
<string name="trigger_broadcast_description">Abilita il ricevitore broadcast. È utile per comunicare con altre applicazioni Android. Ad esempio, è possibile avviare Wasted da Tasker.</string>
<string name="trigger_notification_description">Abilita l\'ascoltatore di notifiche del dispositivo. Esaminerà tutte le notifiche a cui ha accesso alla ricerca del codice segreto. Quando lo trova, si attiva. È necessario concedere a Wasted le autorizzazioni necessarie nelle Impostazioni &gt; Notifiche &gt; Notifiche app e dispositivi.</string>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Wasted</string>
<string name="wipe_data_checkbox">Wyczyść dane</string>
<string name="wipe_embedded_sim_checkbox">Wyczyść eSIM</string>
<string name="panic_app_dialog_title">Potwierdź aplikację paniki</string>
<string name="panic_app_dialog_message">Czy na pewno chcesz zezwolić %1$s na wywoływanie destruktywnych akcji paniki\\?</string>
<string name="panic_app_unknown_app">nieznana aplikacja</string>
<string name="allow">Zezwól</string>
<string name="tile_label">Tryb samolotowy</string>
<string name="shortcut_label">Panika</string>
<string name="trigger_lock_time_hint">czas</string>
<string name="trigger_lock_time_error">7d / 48h / 120m</string>
<string name="trigger_lock_time_helper_text">Ile czasu czekać. Modyfikatory: [d]ni [h](godziny) [m]inuty</string>
<string name="trigger_tile_delay_description">Bezpieczne opóźnienie zanim się odpali. Daje Ci troche czasu na anulowanie, jeśli przypadkowo stukniesz w kafelek.</string>
<string name="notification_channel_default_name">Domyślny</string>
<string name="foreground_service_notification_title">Strażnik</string>
<string name="trigger_panic_kit">PanicKit</string>
<string name="trigger_tile">Kafelek</string>
<string name="trigger_shortcut">Skrót</string>
<string name="trigger_broadcast">Broadcast</string>
<string name="trigger_notification">Powiadomienie</string>
<string name="trigger_lock">Blokada</string>
<string name="trigger_usb">USB</string>
<string name="copied_popup">Skopiowano</string>
<string name="main">Główne</string>
<string name="settings">Ustawienia</string>
<string name="trigger_panic_kit_description">Włącz reagowanie na panikę. PanicKit to zbiór narzędzi do tworzenia \"przycisków paniki\", które mogą wywołać reakcję całego systemu, gdy użytkownik znajdzie się w niespokojnej lub niebezpiecznej sytuacji. Umożliwia on aplikacjom wyzwalającym oraz reagującym bezpiecznie i łatwo połączyć się ze sobą. Użytkownik uruchamia aplikację wyzwalającą podczas paniki. Aplikacja reagująca odbiera ten sygnał i indywidualnie wykonuje kroki, do których została skonfigurowana.</string>
<string name="trigger_tile_description">Włącz obsługę kafelków. To jest przycisk w panelu szybkich ustawień, kiedy przeciągniesz palcem od góry ekranu. Ten przycisk będzie udawał tryb samolotowy.</string>
<string name="trigger_shortcut_description">Włącz skrót z ikoną. To jest przycisk, który zobaczysz po długim naciśnięciu ikony Wasted.</string>
<string name="trigger_broadcast_description">Włącz odbiornik transmisji. Jest to przydatne do komunikacji z innymi aplikacjami Androida. Za pomocą tego możesz na przykład wyzwolić Wasted z Taskera.</string>
<string name="trigger_notification_description">Włącz odbiornik powiadomień urządzenia. Będzie on skanował wszystkie powiadomienia, do których ma dostęp, w poszukiwaniu sekretnego kodu. Gdy już zostanie znaleziony, wyzwoli aplikację. Musisz przyznać Wasted niezbędne uprawnienia w Ustawienia &gt; Powiadomienia &gt; Urządzenie oraz powiadomienia aplikacji.</string>
<string name="trigger_lock_description">Włącz harmonogram zadań blokady. Zaplanuje on zadanie za każdym razem, gdy zablokujesz urządzenie i anuluje je za każdym razem, gdy odblokujesz urządzenie. Jeśli nie odblokujesz urządzenia przez X czasu, zadanie zostanie wyzwolone.</string>
<string name="trigger_usb_description">Włącz odbiornik stanu USB. Po nawiązaniu połączenia danych USB, gdy urządzenie jest zablokowane, zadanie zostanie uruchomione. Nie zostanie uruchomione podczas ładowania, tylko przy akcesoriach.</string>
</resources>

View File

@ -25,11 +25,12 @@
<string name="copied_popup">Copied</string>
<string name="main">Main</string>
<string name="settings">Settings</string>
<string name="goto_button">GOTO</string>
<string name="trigger_panic_kit_description">Enable panic responder. PanicKit is a collection of tools for creating “panic buttons” that can trigger a system-wide response when the user is in an anxious or dangerous situation. It enables trigger apps and responder apps to safely and easily connect to each other. The user engages with the trigger app when in a panic situation. The responder apps receive that trigger signal, and individually execute the steps that they were configured to do.</string>
<string name="trigger_tile_description">Enable tile service. It is a button in quick settings panel when you swipe from the top of the screen. This button will mimic to the airplane mode.</string>
<string name="trigger_shortcut_description">Enable icon shortcut. It is a button you will see when you make a long tap on the Wasted icon.</string>
<string name="trigger_broadcast_description">Enable broadcast receiver. It is useful to communicate with another Android apps. For example you can fire Wasted from Tasker using this.</string>
<string name="trigger_notification_description">Enable device notification listener. It will scan all notifications it has access to for the secret code. When found it will fire. You have to give Wasted necessary permissions in Settings > Notifications > Device and app notifications.</string>
<string name="trigger_notification_description">Enable device notification listener. It will scan all notifications it has access to for the secret code. When found it will fire.</string>
<string name="trigger_lock_description">Enable lock job scheduler. It will schedule a job every time you lock a device and cancel it every time you unlock a device. When you do not unlock a device for X time a job will fire.</string>
<string name="trigger_usb_description">Enable USB state receiver. When you make a USB data connection while a device is locked it will fire. It must not fire on charger, only on device and accessory.</string>
</resources>

View File

@ -0,0 +1,3 @@
add button to jump into device & app notifications setting
add Polish translation, thanks to py3o4f4ifk5v9fko
update Italian translation, thanks to Giovanni Donisi (@gdonisi + @giovannidonisi)