mirror of
https://github.com/hmalik144/Weather-apps.git
synced 2026-03-18 15:36:04 +00:00
- Update to test framework
- Adjustments to layouts
This commit is contained in:
@@ -11,8 +11,6 @@ import android.icu.util.GregorianCalendar
|
||||
import androidx.core.app.NotificationManagerCompat
|
||||
|
||||
|
||||
private const val HOUR_TO_SHOW_PUSH = 6
|
||||
|
||||
class NotificationService(context: Context) {
|
||||
|
||||
private val alarmManager = context.getSystemService(ALARM_SERVICE) as AlarmManager
|
||||
@@ -26,10 +24,10 @@ class NotificationService(context: Context) {
|
||||
fun schedulePushNotifications() {
|
||||
val calendar = getCalendarForNotification()
|
||||
|
||||
alarmManager.setRepeating(
|
||||
alarmManager.setWindow(
|
||||
AlarmManager.RTC_WAKEUP,
|
||||
calendar.timeInMillis,
|
||||
AlarmManager.INTERVAL_DAY,
|
||||
AlarmManager.INTERVAL_HOUR,
|
||||
alarmPendingIntent
|
||||
)
|
||||
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
<resources>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
<color name="colorAccent">@android:color/white</color>
|
||||
|
||||
<color name="colour_one">#E8D0DD</color>
|
||||
<color name="colour_two">#5F8E7B</color>
|
||||
<color name="colour_three">#B3C0CA</color>
|
||||
<color name="colour_four">#8C98AD</color>
|
||||
<color name="colour_five">#2E3532</color>
|
||||
|
||||
<color name="weather_cell_colour">@android:color/transparent</color>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user