feat: Codigo fuente SIO Mobile - App Android para Operadores
Aplicacion movil Android para el sistema SIO (Sistema Integral de Operaciones) de Drenax. Permite a los operadores gestionar sus servicios diarios. Funcionalidades principales: - Login y autenticacion JWT - Checklist de vehiculos - Gestion de jornada laboral - Lista de servicios asignados - Captura de evidencias fotograficas - Firma digital del cliente - Encuestas de satisfaccion - Notificaciones push (Firebase) - Almacenamiento offline (ObjectBox) - Geolocalizacion y mapas Stack tecnologico: - Kotlin - Android SDK 33 - Retrofit + OkHttp - ObjectBox - Firebase (FCM, Crashlytics, Analytics) - Google Maps Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.iesoluciones.siodrenax.receivers
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.IntentFilter
|
||||
import com.iesoluciones.siodrenax.services.NotificationService.Companion.UPDATE_UI
|
||||
|
||||
class UpdateUIReceiver: BroadcastReceiver() {
|
||||
|
||||
private var listener: UiUpdateListener? = null
|
||||
|
||||
interface UiUpdateListener {
|
||||
fun updateUI()
|
||||
}
|
||||
|
||||
fun updateUIReceiver(listener: UiUpdateListener) {
|
||||
this.listener = listener
|
||||
(listener as Context).registerReceiver(this, IntentFilter(UPDATE_UI))
|
||||
}
|
||||
|
||||
fun unRegisterReceiver(listener: UiUpdateListener) {
|
||||
(listener as Context).unregisterReceiver(this)
|
||||
}
|
||||
|
||||
fun registerReceiver(listener: UiUpdateListener) {
|
||||
this.listener = listener
|
||||
(listener as Context).registerReceiver(this, IntentFilter(UPDATE_UI))
|
||||
}
|
||||
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
if (listener != null) listener!!.updateUI()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user