Hey, I am building an app with VueJS/Vuetify and Capacitor for Android.
The app allows the user to create reminders for certain tasks that are linked to profiles they have created before. I managed to create LocalNotifications, but I’m struggling to add a profile picture as ‘largeIcon’.
The documentation for LocalNotification says about largeIcon
:
Icons should be placed in your app’s
res/drawable
folder. The value for this option should be the drawable resource ID, which is the filename without an extension.
I’m able to add a largeIcon
following this approach, but only if I specify it in capacitor.config.ts
. It doesn’t work if I specify it from the LocalNotifications.schedule({}]
function. Not the static picture from res/drawable
that works well if specified in capacitor.config.ts
, but even less a picture that the user has previously uploaded to the app.
So how can I specify a largeIcon
from the schedule
method and how can I make it a picture that the user has uploaded into the app?
For other Vue components I use this approach to display the profile picture:
require('@/assets/img/some-image.png')
This works well as src
for v-img
for example and also as value for css background image url.
Is there any way to get this working with largeIcon
in LocalNotifications as well?
Edit: I found this SO thread about the issue which discusses a solution in Java. Is there a similar solution in Capacitor/JS?
1 post - 1 participant