Browse Source

notifications channel fix

main v0.10.5
Nareshkumar Rao 4 years ago
parent
commit
16abbaf843
  1. 2
      .idea/dictionaries/naresh.xml
  2. 4
      app/build.gradle
  3. BIN
      app/release/app-release.apk
  4. 4
      app/release/output-metadata.json
  5. 9
      app/src/main/java/com/nareshkumarrao/eiweblog/MainActivity.kt
  6. 1
      app/src/main/java/com/nareshkumarrao/eiweblog/Utilities.kt

2
.idea/dictionaries/naresh.xml

@ -1,8 +1,10 @@
<component name="ProjectDictionaryState">
<dictionary name="naresh">
<words>
<w>eiweblog</w>
<w>elektro</w>
<w>hsdsans</w>
<w>nareshkumarrao</w>
<w>weblog</w>
</words>
</dictionary>

4
app/build.gradle

@ -11,8 +11,8 @@ android {
applicationId "com.nareshkumarrao.eiweblog"
minSdkVersion 16
targetSdkVersion 30
versionCode 8
versionName "0.10.4"
versionCode 9
versionName "0.10.5"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

BIN
app/release/app-release.apk

Binary file not shown.

4
app/release/output-metadata.json

@ -10,8 +10,8 @@
{
"type": "SINGLE",
"filters": [],
"versionCode": 8,
"versionName": "0.10.4",
"versionCode": 9,
"versionName": "0.10.5",
"outputFile": "app-release.apk"
}
]

9
app/src/main/java/com/nareshkumarrao/eiweblog/MainActivity.kt

@ -11,6 +11,7 @@ import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.Toolbar
import androidx.viewpager.widget.ViewPager
import androidx.work.ExistingPeriodicWorkPolicy
import androidx.work.PeriodicWorkRequestBuilder
import androidx.work.WorkManager
import androidx.work.WorkRequest
@ -37,15 +38,15 @@ class MainActivity : AppCompatActivity() {
Utilities.createNotificationChannel(this)
HISUtility.createNotificationChannel(this)
val updateWeblogWorkerRequest: WorkRequest =
val updateWeblogWorkerRequest =
PeriodicWorkRequestBuilder<UpdateWeblogWorker>(1, TimeUnit.HOURS)
.build()
val updateGradesWorkerRequest: WorkRequest =
val updateGradesWorkerRequest =
PeriodicWorkRequestBuilder<UpdateGradesWorker>(3, TimeUnit.HOURS)
.build()
WorkManager.getInstance(this).enqueue(updateWeblogWorkerRequest)
WorkManager.getInstance(this).enqueue(updateGradesWorkerRequest)
WorkManager.getInstance(this).enqueueUniquePeriodicWork("weblog", ExistingPeriodicWorkPolicy.REPLACE, updateWeblogWorkerRequest)
WorkManager.getInstance(this).enqueueUniquePeriodicWork("grades", ExistingPeriodicWorkPolicy.REPLACE, updateGradesWorkerRequest)
Utilities.fetchRepoReleaseInformation(this, ::repoReleaseCallback)
}

1
app/src/main/java/com/nareshkumarrao/eiweblog/Utilities.kt

@ -167,6 +167,7 @@ internal object Utilities {
}
val notificationManager: NotificationManager = context?.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.createNotificationChannel(channel)
notificationManager.deleteNotificationChannel("com.nareshkumarrao.eiweblog.update")
}
}

Loading…
Cancel
Save