how to convert beloved android code into nativescript


i try to convert beloved code same into nativescript but i am new i have no idea for this please tell me how to convert android code to nativescript …

 private void createWebPrintJob() {

    // Get a PrintManager instance
    PrintManager printManager = (PrintManager)

    // Get a print adapter instance
    PrintDocumentAdapter printAdapter = webView.createPrintDocumentAdapter();

    // Create a print job with name and adapter instance
    String jobName = getString(R.string.app_name) + " Document";
    PrintJob printJob = printManager.print(jobName, printAdapter,
            new PrintAttributes.Builder().build());

    // Save the job object for later status checking
    // mPrintJobs.add(printJob);


May be something like this,

var application = require('application');
var utils = require('utils/utils');

function createWebPrintJob() {
 var printManager =
 var printAdapter = webView.createPrintDocumentAdapter();
 var jobName = getString("app_name")) + " Document";
 var printJob = printManager.print(jobName, printAdapter, new;

The above is just puedo code, end of the day it’s JavaScript nothing super special.

Answered By – Manoj

Answer Checked By – Gilberto Lyons (AngularFixing Admin)

Leave a Reply

Your email address will not be published.