Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Windows Tipps & SecurityGrafikkarte vor Überhitzung schützen: So geht’s(25.09.2026 um 08:00 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

ViewModel SavedStateHandle Guide — Surviving Process Death in Android

What You'll Learn How to use SavedStateHandle to preserve ViewModel state across process death. Why SavedStateHandle? Regular ViewModel variables live in memory only — they're lost on process death. SavedStateHandle saves s…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




What You'll Learn



How to use SavedStateHandle to preserve ViewModel state across process death.






Why SavedStateHandle?



Regular ViewModel variables live in memory only — they're lost on process death. SavedStateHandle saves state via Bundle, surviving process death and restoration.






Basic Usage






class SearchViewModel(
private val savedStateHandle: SavedStateHandle
) : ViewModel() {
val query: StateFlow<String> = savedStateHandle.getStateFlow("query", "")
val selectedTab: StateFlow<Int> = savedStateHandle.getStateFlow("selectedTab", 0)
fun updateQuery(newQuery: String) { savedStateHandle["query"] = newQuery }
fun selectTab(index: Int) { savedStateHandle["selectedTab"] = index }
}











class UserDetailViewModel(savedStateHandle: SavedStateHandle) : ViewModel() {
private val userId: String = checkNotNull(savedStateHandle["userId"])
init { loadUser(userId) }
}









With Hilt






@HiltViewModel
class TodoViewModel @Inject constructor(
private val repository: TodoRepository,
private val savedStateHandle: SavedStateHandle
) : ViewModel() {
val filter: StateFlow<String> = savedStateHandle.getStateFlow("filter", "all")
val todos = filter.flatMapLatest { f ->
when (f) {
"active" -> repository.getActiveTodos()
else -> repository.getAllTodos()
}
}.stateIn(viewModelScope, SharingStarted.Lazily, emptyList())
}









Summary





  • SavedStateHandle for process death survival


  • getStateFlow() for reactive state management

  • Navigation arguments via SavedStateHandle

  • Hilt auto-injection support






8 production-ready Android app templates on Gumroad.

Browse templates → Gumroad

1. Sofort-Triage & Abwehrmaßnahmen

SOC Incident Playbook: Vulnerability Remediation & Verification
Syntax validiert (0 Fehler)
title: Detect Exploitation - ViewModel SavedStateHandle Guide — Surviving Process Death in Android
id: 728faf01-b229-4aed-bc4c-93518126bb29
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-25
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-25"
        description = "YARA Signature for "
    strings:
        $str = "ViewModel SavedStateHandle Gui" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("ViewModel SavedStateHandle Guide  Surviv")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*ViewModel SavedStateHandle Guide  Surviv*"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "ViewModel SavedStateHandle Guide  Surviv"
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc

2. Cyber Threat Intelligence & Forensik

🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich ViewModel SavedStateHandle Guide — Survi.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten ViewModel SavedStateHandle Guide — Surviving Process Death in Android

Thematisch verwandte Begriffe: ViewModel, SavedStateHandle, Guide, Surviving · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-97898 | Insecure Direct Object Reference / missing object-level authorization in…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag