Note:- IF you're Capacitor v4, there is a minor change in case of Android, in MainActivity. java you have to call 'registerPlugin' before 'super.onCreate' instead of after, as in the video. reference:- capacitorjs.com/docs/updating/4-0#change-registerplugin-order This change is only required for Capacitor v4.x projects, while everything stays the same in case of Capacitor v3.x.
very good tutorial thanks! can you make a video on how to create a plugin that will handle notifications in addition to capacitor's notification plugin without interfering? thanks
Thank you. I think, as we are allowed to use platform specific native code, if some API is available for that platform, it should be possible to integrate that in a Capacitor app (as you can see from a lot of existing plugins). Rest you can get a better idea from the Capacitor docs, if it can work for your specific use case, or try to find if there are some existing solutions by the community.
It's simply does not work with Capacitor 4. "cap sync android" cannot find your plugin this way and will result "Msg: ERROR Error: Uncaught (in promise): Error: "CustomPlugin" plugin is not implemented on android Error: "CustomPlugin" plugin is not implemented on android
I tried the steps with Capacitor 4 project, just to make sure, while iOS is working fine, I was able to reproduce the error on Android. It seems because of a minor change for Android in v4, where you have to call 'registerPlugin' before 'super.onCreate' instead of after as in the video. reference:- capacitorjs.com/docs/updating/4-0#change-registerplugin-order After making the change, it worked on Android too, so that should fix the issue for you. Other than that this error also occur when plugin name is not same on JS, Android and iOS code, so also make sure of that. I'll mention this change in the pin comment.
Note:- IF you're Capacitor v4, there is a minor change in case of Android, in MainActivity. java you have to call 'registerPlugin' before 'super.onCreate' instead of after, as in the video.
reference:- capacitorjs.com/docs/updating/4-0#change-registerplugin-order
This change is only required for Capacitor v4.x projects, while everything stays the same in case of Capacitor v3.x.
This tip really helped me. 😍😍
note: v4 or *above* needs to do that
I have spent more than 12 hours to fix
Thanks for your instructions! It's fix just 1 mnt!
straight to the point, thanks
Very helpful thanks!
thank you!. it's really helped me
thank you
Great content, Is there are anyway to customize the capacitor's Official Plugin?
Thanks, it's best that capacitor docs!
Great Tutorial Thank Q :-)
very good tutorial thanks!
can you make a video on how to create a plugin that will handle notifications in addition to capacitor's notification plugin without interfering? thanks
awesome video thank you, can we use this technique to run capacitor app as a background /foreground service?
Thank you.
I think, as we are allowed to use platform specific native code, if some API is available for that platform, it should be possible to integrate that in a Capacitor app (as you can see from a lot of existing plugins).
Rest you can get a better idea from the Capacitor docs, if it can work for your specific use case, or try to find if there are some existing solutions by the community.
It's simply does not work with Capacitor 4. "cap sync android" cannot find your plugin this way and will result
"Msg: ERROR Error: Uncaught (in promise): Error: "CustomPlugin" plugin is not implemented on android Error: "CustomPlugin" plugin is not implemented on android
I tried the steps with Capacitor 4 project, just to make sure, while iOS is working fine, I was able to reproduce the error on Android.
It seems because of a minor change for Android in v4, where you have to call 'registerPlugin' before 'super.onCreate' instead of after as in the video.
reference:- capacitorjs.com/docs/updating/4-0#change-registerplugin-order
After making the change, it worked on Android too, so that should fix the issue for you.
Other than that this error also occur when plugin name is not same on JS, Android and iOS code, so also make sure of that.
I'll mention this change in the pin comment.
@@massive.educator 😀thank you so much, this works
@@massive.educator I've searched everywhere and found nothing until I found your comment. Thank you!