今日の天気


-


GitHub

-


言語、ライブラリ

  • Kotlin
  • Coroutines
  • ViewBinding
  • Room
  • Retrofit
  • DataStore
  • WorkManager
  • AlarmManager
  • Dagger-hilt
  • Glide
  • Lottie
  • FirebaseAnalytics
  • FirebaseCrashlytics
  • -


    アーキテクチャ




    -


    WorkManager + AlarmManager

    abstract class HiltBroadcastReceiver: BroadcastReceiver() {
        @CallSuper
        override fun onReceive(context: Context, intent: Intent) {}
    }
    
    @AndroidEntryPoint
    class AlarmReceiver: HiltBroadcastReceiver() {
    
        override fun onReceive(context: Context, intent: Intent) {
            super.onReceive(context, intent)
    
            WorkManager.getInstance(context).enqueueUniqueWork(
                DOWNLOAD_WEATHER_DATA_WORKER_NAME,
                ExistingWorkPolicy.KEEP,
                OneTimeWorkRequestBuilder<DownloadWeatherDataWorker>()
                        .setBackoffCriteria(BackoffPolicy.LINEAR, 1, TimeUnit.MINUTES)
                        .build()
            )
            
            ...
        }
    }

    -


    気象データソース


    気象庁

    -


    ゲームショップ


    今日の天気🌤