File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
android/src/main/java/com/devsonflutter/reflex/notification Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 2222import androidx .core .app .RemoteInput ;
2323
2424import com .devsonflutter .reflex .ReflexPlugin ;
25- import com .devsonflutter .reflex .notification .model .App ;
2625import com .devsonflutter .reflex .notification .model .NotificationWear ;
2726
2827import java .util .ArrayList ;
29- import java .util .HashSet ;
3028import java .util .List ;
3129import java .util .Map ;
32- import java .util .Set ;
3330import java .util .UUID ;
3431
3532public class NotificationUtils {
@@ -135,9 +132,18 @@ static boolean canReply(StatusBarNotification notification) {
135132
136133 private static boolean checkListeningAndReplyPackages (String notificationPackageName ,
137134 List <String > replyPackageNameList ) {
138- // TODO: check Listening and Replying PackageNames also debugPrint if necessary
139- // Use listeningPackageNameList & listeningExceptionPackageNameList
140- return true ;
135+ if (listeningPackageNameList == null && listeningExceptionPackageNameList == null && replyPackageNameList == null ){
136+ return true ;
137+ }else if (listeningPackageNameList == null && listeningExceptionPackageNameList == null ){
138+ return replyPackageNameList .contains (notificationPackageName );
139+ }
140+ else if (listeningPackageNameList == null ){
141+
142+ return !listeningExceptionPackageNameList .contains (notificationPackageName );
143+ }
144+ else {
145+ return true ;
146+ }
141147 }
142148
143149 @ RequiresApi (api = Build .VERSION_CODES .JELLY_BEAN_MR2 )
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class _MyAppState extends State<MyApp> {
2525 Reflex reflex = Reflex (
2626 debug: true ,
2727 packageNameList: ["com.whatsapp" , "com.tyup" ],
28- packageNameExceptionList: ["com.miui.securitycenter " ],
28+ packageNameExceptionList: ["com.android.systemui " ],
2929 autoReply: AutoReply (
3030 packageNameList: ["com.whatsapp" ],
3131 message: "[Reflex] This is an automated reply." ,
You can’t perform that action at this time.
0 commit comments