Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.trae/
.gradle*
47 changes: 0 additions & 47 deletions .trae/documents/Create todo.md for Version 0.1.0.md

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 5 additions & 0 deletions Kiosk/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.secgo.kiosk

import android.app.Notification
import android.os.Build
import android.content.Context
import android.content.Intent
import android.service.notification.NotificationListenerService
Expand Down Expand Up @@ -115,12 +116,14 @@ class SecgoNotificationListenerService : NotificationListenerService() {
private fun buildNotificationJson(sbn: StatusBarNotification): JSONObject {
val n = sbn.notification
val extras = n.extras
val channelId =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) n.channelId else null
val json =
JSONObject()
.put("package", sbn.packageName)
.put("key", sbn.key)
.put("id", sbn.id)
.put("channelId", n.channelId ?: JSONObject.NULL)
.put("channelId", channelId ?: JSONObject.NULL)
.put("postTime", sbn.postTime)
.put("when", n.`when`)
.put("category", n.category ?: JSONObject.NULL)
Expand Down
Binary file added Kiosk/assets/audio/add_success.mp3
Binary file not shown.
Loading