# Create a list containing up to 500 registration tokens.# These registration tokens come from the client FCM SDKs.
registration_tokens = [
'YOUR_REGISTRATION_TOKEN_1',
# ...'YOUR_REGISTRATION_TOKEN_N',
]
message = messaging.MulticastMessage(
data={'score': '850', 'time': '2:45'},
tokens=registration_tokens,
)
response = messaging.send_multicast(message)
# See the BatchResponse reference documentation# for the contents of response.print('{0} messages were sent successfully'.format(response.success_count))
결론부터 말하자면
Messaging.sendMulticast() is deprecated.
수많은 501 에러와
Operation is not implemented, or supported, or enabled.
E/MethodChannel#.com/flutter/local_notifications( 7674): Failed to handle method call
E/MethodChannel#.com/flutter/local_notifications( 7674): java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
E/MethodChannel#.com/flutter/local_notifications( 7674): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.setSmallIcon(FlutterLocalNotificationsPlugin.java:76)
E/MethodChannel#.com/flutter/local_notifications( 7674): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.createNotification(FlutterLocalNotificationsPlugin.java:88)
flutter app android error
FlutterLocalNotificationsPlugin.setSmallIcon
안드로이드에서 FlutterLocalNotificationsPlugin을 통해 내부 알림을 보낼 때 나타나는 icon 설정이 잘못되어있기 때문에 이미지를 찾을 수 없어 알림이 안 나오는 에러!
앱에서 달력으로 기간을 선택해오는 머티리얼.. 마테리얼... 머테리얼... 그 라이브러리를 적용했을때 볼 수 있는 오류다.
java.lang.IllegalArgumentException: com.google.android.material.datepicker.MaterialDatePicker requires a value for the com.cyd.selllaundryadmin:attr/colorSurface attribute to be set in your app theme. You can either set the attribute in your theme or update your theme to inherit from Theme.MaterialComponents (or a descendant).
적혀있듯이 테마를 넣어달라고 한다. 테마는 필수 ~!
다른 액티비티에는 적용을 시켜뒀는데 새로운 액티비티 생성 후, 적용을 시켜주지 않아서 오류가났다.