<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>devadri</title><link>https://devadri.com/</link><description>Recent content on devadri</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 12 Aug 2024 12:00:00 +0100</lastBuildDate><atom:link href="https://devadri.com/index.xml" rel="self" type="application/rss+xml"/><item><title>I created my first open source npm package: @devadri/create-sticker</title><link>https://devadri.com/blog/my-first-npm-package-devadri-create-sticker/</link><pubDate>Mon, 12 Aug 2024 12:00:00 +0100</pubDate><guid>https://devadri.com/blog/my-first-npm-package-devadri-create-sticker/</guid><description>&lt;p&gt;A few days ago I created my first open source npm package. I was building a simple concept app that erases the background of images using AI (just keeping the main object/person) and thought it would be nice to make them have a sticker border effect. I found out that there were no libraries yet that solves this task. However, I found a &lt;a href="https://stackoverflow.com/a/24091727" target="_blank" rel="noopener"&gt;Stack Overflow answer&lt;/a&gt; that had the code I needed. The code just worked the way I wanted but it was not easy to use it like &amp;lsquo;plug-and-play&amp;rsquo;. So I reorganized it, adapted it to TypeScript and publish it as a npm package to make it super simple to be used by anyone. Now you only have to install the package (&lt;code&gt;npm install @devadri/create-sticker&lt;/code&gt;) and call the function: &lt;code&gt;createSticker(img.src, { strokeWidth, strokeColor, padding, fillHoles })&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Build the Ionic Native wrapper for a Cordova plugin</title><link>https://devadri.com/blog/ionic-native-wrapper-for-cordova-plugin/</link><pubDate>Mon, 18 Apr 2022 12:04:00 +0100</pubDate><guid>https://devadri.com/blog/ionic-native-wrapper-for-cordova-plugin/</guid><description>&lt;p&gt;In this post we will learn how to create the &lt;a href="https://github.com/danielsogl/awesome-cordova-plugins" target="_blank" rel="noopener"&gt;@awesome-cordova-plugins&lt;/a&gt; wrapper to make using Cordova plugins easier. This simplification is achieved by mapping Cordova plugin&amp;rsquo;s callback funtions to Promises and Observables.&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;&lt;strong&gt;@awesome-cordova-plugins&lt;/strong&gt; was previously known as &lt;strong&gt;@ionic-native&lt;/strong&gt;.&lt;br&gt;&#10;The project only changed its name, the functionality continues the same.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;This post is the continuation of the following Cordova plugin tutorial:&lt;/p&gt;&#10;&#10;&#10;&lt;a class="post-link" href="https://devadri.com/blog/multiplatform-cordova-plugin/"&gt;&#10;&#10; &#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10; &#10; &#10; &#10; &#10;&#10; &lt;picture&gt;&#10; &lt;source srcset="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_d8e9996f767b7532.webp 500w, https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_ef0bf0f81523effe.webp 1000w"&#10; sizes="(max-width: 768px) 90vw, 704px" type="image/webp"&gt;&#10; &lt;img src="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_12afa1448281d390.jpg"&#10; srcset="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_9a3439a967e227d9.jpg 500w, https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_12afa1448281d390.jpg 1000w"&#10; sizes="(max-width: 768px) 90vw, 704px"&#10; width="1000" height="563" loading="lazy" alt=""&gt;&#10; &lt;/picture&gt;&#10;&#10;&#10;&#10;&#10; &lt;div class="post-meta"&gt;&#10; &lt;span class="post-title"&gt;Build a multiplatform Cordova plugin for Android, iOS and Electron&lt;/span&gt;&#10; &lt;span class="post-date"&gt;&#10; April 18, 2022&#10;&#10; &#10; &lt;span&gt;&#10; (Last update:&#10; August 1, 2024)&#10; &lt;/span&gt;&#10; &#10; &lt;/span&gt;&#10; &lt;/div&gt;&#10;&lt;/a&gt;&#10;&#10;&#10;&#10;&lt;p&gt;So we will build the wrapper for the plugin of that tutorial.&lt;/p&gt;</description></item><item><title>Build a Cordova plugin for Electron</title><link>https://devadri.com/blog/cordova-plugin-electron/</link><pubDate>Mon, 18 Apr 2022 12:03:00 +0100</pubDate><guid>https://devadri.com/blog/cordova-plugin-electron/</guid><description>&lt;h2 id="main-post"&gt;Main post&lt;/h2&gt;&#10;&lt;p&gt;This post forms part of this tutorial:&lt;/p&gt;&#10;&#10;&#10;&lt;a class="post-link" href="https://devadri.com/blog/multiplatform-cordova-plugin/"&gt;&#10;&#10; &#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10; &#10; &#10; &#10; &#10;&#10; &lt;picture&gt;&#10; &lt;source srcset="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_d8e9996f767b7532.webp 500w, https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_ef0bf0f81523effe.webp 1000w"&#10; sizes="(max-width: 768px) 90vw, 704px" type="image/webp"&gt;&#10; &lt;img src="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_12afa1448281d390.jpg"&#10; srcset="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_9a3439a967e227d9.jpg 500w, https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_12afa1448281d390.jpg 1000w"&#10; sizes="(max-width: 768px) 90vw, 704px"&#10; width="1000" height="563" loading="lazy" alt=""&gt;&#10; &lt;/picture&gt;&#10;&#10;&#10;&#10;&#10; &lt;div class="post-meta"&gt;&#10; &lt;span class="post-title"&gt;Build a multiplatform Cordova plugin for Android, iOS and Electron&lt;/span&gt;&#10; &lt;span class="post-date"&gt;&#10; April 18, 2022&#10;&#10; &#10; &lt;span&gt;&#10; (Last update:&#10; August 1, 2024)&#10; &lt;/span&gt;&#10; &#10; &lt;/span&gt;&#10; &lt;/div&gt;&#10;&lt;/a&gt;&#10;&#10;&#10;&#10;&lt;p style="margin-bottom: 0"&gt;&#10; You might want to check that post first before continuing with this one. You will learn how to:&#10;&lt;/p&gt;&#10;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://devadri.com/blog/multiplatform-cordova-plugin/#base-configuration"&gt;Prepare the base plugin configuration&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://devadri.com/blog/multiplatform-cordova-plugin/#www"&gt;Create the JavaScript interface&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://devadri.com/blog/multiplatform-cordova-plugin/#using-the-plugin-in-a-cordova-app"&gt;Use the plugin in a Cordova app&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;You could find the source code of this tutorial on GitHub:&lt;br&gt;&#10;&lt;a href="https://github.com/adrian-bueno/multiplatform-cordova-plugin-example" target="_blank" rel="noopener"&gt;https://github.com/adrian-bueno/multiplatform-cordova-plugin-example&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>Build a Cordova plugin for iOS</title><link>https://devadri.com/blog/cordova-plugin-ios/</link><pubDate>Mon, 18 Apr 2022 12:02:00 +0100</pubDate><guid>https://devadri.com/blog/cordova-plugin-ios/</guid><description>&lt;h2 id="main-post"&gt;Main post&lt;/h2&gt;&#10;&lt;p&gt;This post forms part of this tutorial:&lt;/p&gt;&#10;&#10;&#10;&lt;a class="post-link" href="https://devadri.com/blog/multiplatform-cordova-plugin/"&gt;&#10;&#10; &#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10; &#10; &#10; &#10; &#10;&#10; &lt;picture&gt;&#10; &lt;source srcset="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_d8e9996f767b7532.webp 500w, https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_ef0bf0f81523effe.webp 1000w"&#10; sizes="(max-width: 768px) 90vw, 704px" type="image/webp"&gt;&#10; &lt;img src="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_12afa1448281d390.jpg"&#10; srcset="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_9a3439a967e227d9.jpg 500w, https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_12afa1448281d390.jpg 1000w"&#10; sizes="(max-width: 768px) 90vw, 704px"&#10; width="1000" height="563" loading="lazy" alt=""&gt;&#10; &lt;/picture&gt;&#10;&#10;&#10;&#10;&#10; &lt;div class="post-meta"&gt;&#10; &lt;span class="post-title"&gt;Build a multiplatform Cordova plugin for Android, iOS and Electron&lt;/span&gt;&#10; &lt;span class="post-date"&gt;&#10; April 18, 2022&#10;&#10; &#10; &lt;span&gt;&#10; (Last update:&#10; August 1, 2024)&#10; &lt;/span&gt;&#10; &#10; &lt;/span&gt;&#10; &lt;/div&gt;&#10;&lt;/a&gt;&#10;&#10;&#10;&#10;&lt;p style="margin-bottom: 0"&gt;&#10; You might want to check that post first before continuing with this one. You will learn how to:&#10;&lt;/p&gt;&#10;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://devadri.com/blog/multiplatform-cordova-plugin/#base-configuration"&gt;Prepare the base plugin configuration&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://devadri.com/blog/multiplatform-cordova-plugin/#www"&gt;Create the JavaScript interface&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://devadri.com/blog/multiplatform-cordova-plugin/#using-the-plugin-in-a-cordova-app"&gt;Use the plugin in a Cordova app&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;You could find the source code of this tutorial on GitHub:&lt;br&gt;&#10;&lt;a href="https://github.com/adrian-bueno/multiplatform-cordova-plugin-example" target="_blank" rel="noopener"&gt;https://github.com/adrian-bueno/multiplatform-cordova-plugin-example&lt;/a&gt;.&lt;/p&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>Build a Cordova plugin for Android</title><link>https://devadri.com/blog/cordova-plugin-android/</link><pubDate>Mon, 18 Apr 2022 12:01:00 +0100</pubDate><guid>https://devadri.com/blog/cordova-plugin-android/</guid><description>&lt;h2 id="main-post"&gt;Main post&lt;/h2&gt;&#10;&lt;p&gt;This post forms part of this tutorial:&lt;/p&gt;&#10;&#10;&#10;&lt;a class="post-link" href="https://devadri.com/blog/multiplatform-cordova-plugin/"&gt;&#10;&#10; &#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10;&#10; &#10; &#10; &#10; &#10;&#10; &lt;picture&gt;&#10; &lt;source srcset="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_d8e9996f767b7532.webp 500w, https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_ef0bf0f81523effe.webp 1000w"&#10; sizes="(max-width: 768px) 90vw, 704px" type="image/webp"&gt;&#10; &lt;img src="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_12afa1448281d390.jpg"&#10; srcset="https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_9a3439a967e227d9.jpg 500w, https://devadri.com/blog/multiplatform-cordova-plugin/cover_hu_12afa1448281d390.jpg 1000w"&#10; sizes="(max-width: 768px) 90vw, 704px"&#10; width="1000" height="563" loading="lazy" alt=""&gt;&#10; &lt;/picture&gt;&#10;&#10;&#10;&#10;&#10; &lt;div class="post-meta"&gt;&#10; &lt;span class="post-title"&gt;Build a multiplatform Cordova plugin for Android, iOS and Electron&lt;/span&gt;&#10; &lt;span class="post-date"&gt;&#10; April 18, 2022&#10;&#10; &#10; &lt;span&gt;&#10; (Last update:&#10; August 1, 2024)&#10; &lt;/span&gt;&#10; &#10; &lt;/span&gt;&#10; &lt;/div&gt;&#10;&lt;/a&gt;&#10;&#10;&#10;&#10;&lt;p style="margin-bottom: 0"&gt;&#10; You might want to check that post first before continuing with this one. You will learn how to:&#10;&lt;/p&gt;&#10;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://devadri.com/blog/multiplatform-cordova-plugin/#base-configuration"&gt;Prepare the base plugin configuration&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://devadri.com/blog/multiplatform-cordova-plugin/#www"&gt;Create the JavaScript interface&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://devadri.com/blog/multiplatform-cordova-plugin/#using-the-plugin-in-a-cordova-app"&gt;Use the plugin in a Cordova app&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;You could find the source code of this tutorial on GitHub:&lt;br&gt;&#10;&lt;a href="https://github.com/adrian-bueno/multiplatform-cordova-plugin-example" target="_blank" rel="noopener"&gt;https://github.com/adrian-bueno/multiplatform-cordova-plugin-example&lt;/a&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;</description></item><item><title>Build a multiplatform Cordova plugin for Android, iOS and Electron</title><link>https://devadri.com/blog/multiplatform-cordova-plugin/</link><pubDate>Mon, 18 Apr 2022 12:00:00 +0100</pubDate><guid>https://devadri.com/blog/multiplatform-cordova-plugin/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;&#10;&lt;p&gt;In this tutorial I&amp;rsquo;m going to show you how to setup a plugin, use native dependencies, return one or multiple responses for each request and add settings to native configuration files like &lt;code&gt;AndroidManifest.xml&lt;/code&gt;. I learned to develop Cordova plugins by looking to the source code of other plugins. If you don&amp;rsquo;t find the solution you need here, I encourage you to do the same (&lt;a href="#comments"&gt;or leave a comment&lt;/a&gt; 🙂). I will assume you already have some experience building Cordova apps and using Cordova plugins.&lt;/p&gt;</description></item></channel></rss>