Im setting up notifications in appwrite for a user with two sessions on two separate devices. But unfortunately appwrite allows two sessions but not two push targets of the same account. as shown in the pics
Lemme try to print identifiers and compare. Because on is ios and other is android.
Maybe it was added for another user already
i compared users proviers and they are different. I have signed out every device and logged in when target id is 'unique()' and it worked.
May be the issue was the login functions which creates a session then creates a target. So when i get an error the target isnt created and login session is created and when i trigger login again. appwrite detects there is a session already
Login doesn't create a push target š§
no. my function was that i create a session then i create a push. so i was getting an error on push target when a session is already created
Hello @Steven my app crashes when i receive an fcm notification. it is related to notification handler
E/AndroidRuntime(30943): java.lang.RuntimeException: Unable to create service io.appwrite.NotificationHandler: java.lang.ClassNotFoundException: Didn't find class "io.appwrite.NotificationHandler" on path: DexPathList[[zip file "/data/app/~~uGfbWv0P559iM7huRGUZNw==/com.pregnut.app-pFhFvbvxv7abzCwaZanCcw==/base.apk"],nativeLibraryDirectories=[/data/app/~~uGfbWv0P559iM7huRGUZNw==/com.pregnut.app-pFhFvbvxv7abzCwaZanCcw==/lib/arm64, /data/app/~~uGfbWv0P559iM7huRGUZNw==/com.pregnut.app-pFhFvbvxv7abzCwaZanCcw==/base.apk!/lib/arm64-v8a, /system/lib64, /system/system_ext/lib64]]
Hmm I'm not sure. Maybe you need some more setup
This a serious issue. i dont even know where to start research about appwrite handler.
Maybe anyone who has managed to setup notifications might help
In your Firebase console, navigate to Settings > General > Your apps > add an Android app.
Register and download your google-services.json config file.
Add google-services.json at the root of your project.
Add Google Services class path to your app-level Gradle dependencies block "com.google.gms:google-services:4.4.0".
Add Google Services plugin to your app-level Gradle in the plugins block as "com.google.gms.google-services".
Add notification handler service to AndroidManifest.xml inside the application tag, alongisde other activities.```
these steps are too summarised for a new feature
i had to delete the notification handler for appwrite the notifications worked
So i treat them as fcm notifications
facing the same issue here , sometimes it crashes even in debug mode on app launch
"com.google.gms:google-services:4.4.0". by adding this the app does not even compile for me
My project is already using new buil.gradle format so manual installation of firebase was an issue
I used firebase cli
flutterfire ?
Yes, if you are using latest flutter version
Then handle notifications like it's fcm
Let me double check with the team on this
Recommended threads
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...
- I'm experiencing a critical bug on Appwr...
Hey <@870607367597850624> team / support š I'm experiencing a critical bug on Appwrite Cloud that's blocking my production Flutter app. I've already filed GitH...