Update the glance section

This commit is contained in:
Tommaso Berlose
2020-10-13 16:55:42 +02:00
parent abafe108c6
commit 0a0c5a90a7
60 changed files with 665 additions and 709 deletions

View File

@ -0,0 +1,19 @@
package com.tommasoberlose.anotherwidget.helpers
import android.app.NotificationManager
import android.content.Context
import android.service.notification.StatusBarNotification
import android.util.Log
import com.google.gson.Gson
object ActiveNotificationsHelper {
fun getLastNotification(context: Context): StatusBarNotification? {
with(context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager) {
activeNotifications.forEach {
Log.d("ciao", Gson().toJson(it).toString())
}
return activeNotifications.lastOrNull()
}
}
}