package Ġvit . kh ud enko . android . session tracker . sample . k oin . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġorg . k oin . android . ext . k oin . android Application Ċ import Ġorg . k oin . android . ext . k oin . android Context Ċ import Ġorg . k oin . core . qual ifier . named Ċ import Ġorg . k oin . dsl . module Ċ import Ġvit . kh ud enko . android . session tracker . IS ession State Transitions Supplier Ċ import Ġvit . kh ud enko . android . session tracker . SessionId Ċ import Ġvit . kh ud enko . android . session tracker . Session Tracker Ċ import Ġvit . kh ud enko . android . session tracker . Transition Ċ import Ġvit . kh ud enko . android . session tracker . sample . k oin . Session . Event Ċ import Ġvit . kh ud enko . android . session tracker . sample . k oin . Session . State Ċ import Ġvit . kh ud enko . android . session tracker . sample . k oin . Session Tracker Listener Ċ import Ġvit . kh ud enko . android . session tracker . sample . k oin . Session Tracker Storage Ċ Ċ val Ġapp Module Ġ= Ġmodule Ġ{ ĊĊĠĠĠ Ġsingle ( named ( DI _ NAME _ SESSION _ SHARED _ PREFER ENCES )) Ġ{ ĊĠĠĠĠĠĠĠ Ġandroid Context (). get SharedPreferences (" session ", ĠContext . MODE _ PRIVATE ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġsingle Ġ{ ĊĠĠĠĠĠĠĠ ĠSession Tracker ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsession Tracker Storage Ġ= ĠSession Tracker Storage ( android Application ()), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsession State Transitions Supplier Ġ= Ġobject Ġ: ĠIS ession State Transitions Supplier < Event , ĠState > Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġoverride Ġfun ĠgetState Transitions ( sessionId : ĠSession Id ) Ġ= ĠlistOf ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠTransition ( event Ġ= ĠEvent . LOGIN , Ġstate Path Ġ= ĠlistOf ( State . IN ACTIVE , ĠState . ACTIVE )), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠTransition ( event Ġ= ĠEvent . LOG OUT , Ġstate Path Ġ= ĠlistOf ( State . ACTIVE , ĠState . IN ACTIVE )), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠTransition ( event Ġ= ĠEvent . LOG OUT _ AND _ FOR GET , Ġstate Path Ġ= ĠlistOf ( State . ACTIVE , ĠState . FOR G OT TEN )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}, ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlistener Ġ= ĠSession Tracker Listener ( android Application ()), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġauto Un track States Ġ= Ġset Of ( State . FOR G OT TEN ), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmode Ġ= ĠSession Tracker . Mode . STRICT _ VERBOSE ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ Ċ }