Can't use custom Android library I created. Package domain not defined

plugins

#1

Hi everyone

I created a custom Android library following the guide at https://www.nativescript.org/blog/plugins-and-jars

When I try and run the code from nativescript, I get an error like “com is not defined”.
This “com” matches the com in the index.js of nativescript library.

var application = require("application");
var context = application.android.context;

module.exports = {
    showToast: function() {
        var toaster = new com.example.Toaster();
        toaster.show(context);
    }
};

I am using tns version 3.4.0

Anything that I could be doing wrong? Is the guide outdated?