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
- functions domain error
I cannot set up the domain for function Iโm trying to add the domain api.example.com I can only use Cloudflare as the DNS provider because my domain provider do...
- Storage Bucket Permissions
Hey folks, when enabling CRUD on the bucket level for the role any, should the bucket be accessible when using a session client?
- Python function - error while creating /...
I have been trying to figure it out myself for the last 2 days. I have self-hosted appwrite instance, and I am running python 3.12 function. It works great up t...