How to create project specific local plugin | Ionic | Capacitor

preview_player
Показать описание


ℹ️ Description:
We will get Status Bar height through native platform code and learn how to communicate between Ionic JavaScript and native code to build a custom Capacitor plugin that is local to your app.

🌟Chapters🌟
- (00:00) Intro
- (00:14) Android Native Implementation
- (03:07) iOS Native Implementation
- (04:54) Access Plugin in JavaScript
- (05:52) Using the Plugin
- (06:39) iOS result
- (06:48) Android result
- (07:04) Using as CSS variable
- (07:32) Outro

🌐 Other distributions:

FOLLOW ME ON:

Support 💖
You can support me by subscribing to the channel and/or voluntarily sponsor through any of the following ways 🙂

🧑🏻‍💻 My Equipments - Affiliates (if you buy anything through these it will support the channel and allow me to improve the content quality!):

Tags 🏷:
Create a plugin in ionic capacitorjs
create a package for ionic capacitor
create an npm package for ionic capacitorjs
write java swift in ionic
using java swift in ionic capacitor
writing native code in ionic
ionic, capacitor, capacitorjs, cordova

#ionic #plugin #codeguru #capacitor #20
Рекомендации по теме
Комментарии
Автор

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.

This change is only required for Capacitor v4.x projects, while everything stays the same in case of Capacitor v3.x.

massive.educator
Автор

thank you!. it's really helped me

EnkhmandalBattsengel
Автор

Great content, Is there are anyway to customize the capacitor's Official Plugin?

kesavanr
Автор

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

elazarzadiki
Автор

Thanks, it's best that capacitor docs!

davidcandamil
Автор

awesome video thank you, can we use this technique to run capacitor app as a background /foreground service?

note
Автор

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

emberarc