How to create project specific local plugin | Ionic | Capacitor

Поделиться
HTML-код
  • Опубликовано: 25 дек 2024

Комментарии • 19

  • @massive.educator
    @massive.educator  2 года назад +3

    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.

    • @navaneeth-007
      @navaneeth-007 7 месяцев назад

      This tip really helped me. 😍😍

    • @elazarzadiki3059
      @elazarzadiki3059 6 месяцев назад

      note: v4 or *above* needs to do that

    • @php_master
      @php_master 25 дней назад

      I have spent more than 12 hours to fix
      Thanks for your instructions! It's fix just 1 mnt!

  • @ahmadabdallah2896
    @ahmadabdallah2896 9 дней назад

    straight to the point, thanks

  • @mahdibouguerzi
    @mahdibouguerzi День назад

    Very helpful thanks!

  • @EnkhmandalBattsengel
    @EnkhmandalBattsengel 22 дня назад

    thank you!. it's really helped me

  • @Abhishekn._
    @Abhishekn._ Месяц назад

    thank you

  • @kesavanr5341
    @kesavanr5341 Год назад +1

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

  • @davidcandamil9830
    @davidcandamil9830 2 года назад

    Thanks, it's best that capacitor docs!

  • @skandakumar9940
    @skandakumar9940 2 года назад

    Great Tutorial Thank Q :-)

  • @elazarzadiki3059
    @elazarzadiki3059 6 месяцев назад

    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

  • @note380
    @note380 2 года назад

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

    • @massive.educator
      @massive.educator  2 года назад

      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.

  • @emberarc
    @emberarc 2 года назад

    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

    • @massive.educator
      @massive.educator  2 года назад +6

      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.

    • @gabrielmoreno7482
      @gabrielmoreno7482 2 года назад

      @@massive.educator 😀thank you so much, this works

    • @dronesete
      @dronesete Год назад +1

      @@massive.educator I've searched everywhere and found nothing until I found your comment. Thank you!