Why a Custom Plugin

When a Cordova App Needs Its Own Plugin

Write a plugin only after three cheaper options fail: a web API the WebView supports (Sharing and Firebase), an existing plugin that passes Evaluating Plugins's checks, and a config.xml setting (edit-config). What remains is what only native code can reach, and native code you would otherwise paste into the regenerated platforms/android.

BookNest wants two such features: the system font scale, so the reading view can match it, and a native "time to read" notification, which on Android 13 and later needs the runtime POST_NOTIFICATIONS permission. Its plugin lives in local-plugins/cordova-plugin-booknest inside the project, with four files: plugin.xml, www/booknest.js, src/android/BookNestPlugin.java and package.json.