Rank 4: Virtual Machine
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
Votes
1
Replies
24
Participants
Unknown
Messages
25
Rank 4: Virtual Machine
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
Rank 4: Virtual Machine
Lemme try to print identifiers and compare. Because on is ios and other is android.
Maybe it was added for another user already
Rank 4: Virtual Machine
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.
Rank 4: Virtual Machine
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 🧐
Rank 4: Virtual Machine
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
Rank 4: Virtual Machine
Hello @Steven my app crashes when i receive an fcm notification. it is related to notification handler
Rank 4: Virtual Machine
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
Rank 4: Virtual Machine
This a serious issue. i dont even know where to start research about appwrite handler.
Rank 4: Virtual Machine
Maybe anyone who has managed to setup notifications might help
Rank 4: Virtual Machine
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.```Rank 4: Virtual Machine
these steps are too summarised for a new feature
Rank 4: Virtual Machine
i had to delete the notification handler for appwrite the notifications worked
Rank 4: Virtual Machine
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
Rank 4: Virtual Machine
My project is already using new buil.gradle format so manual installation of firebase was an issue
Rank 4: Virtual Machine
I used firebase cli
flutterfire ?
Rank 4: Virtual Machine
Yes, if you are using latest flutter version
Rank 4: Virtual Machine
Then handle notifications like it's fcm
Let me double check with the team on this