Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The following plug-ins are used by Canvas Technology to implement the About Page and Send Logs features for mobile apps. These plug-ins come installed in the Canvas Technology framework package.

Plug-in

Description

cordova-plugin-app-preferences

This is a plug-in created by Canvas Technology and is used to store, retrieve, remove and display the app preference (About Page).

cordova-plugin-device

This plug-in is used to get the device's hardware and software details.

cordova-plugin-app-version

This plug-in is used to get the app details.

cordova-plugin-canvas

This is a plug-in created by Canvas Technology to check if the device running the app is rooted or jail broken.

cordova-plugin-uniquedeviceid

This plug-in is used to provide a unique ID to the device.

cordova-plugin-file

This plug-in is used to read or write from the log file.

cordova-plugin-email

This plug-in is used for emailing the log file to the app's support team.


  1. Call the following APIs in the listener file containing the events to display the About Page and to send logs. Sample codes are as follows:
  • showAboutPage


canvasHybridUtil.showAboutPage(function ()
{
console.log("About Page Triggered!");
}, function (errormsg)
{
alert(errormsg);
});

  • sendLogs


canvasHybridUtil.sendLogs(successCallback);

Ensure that you replace your app's support team's mail ID in the Hybrid.xml file available in your app bundle.

In Android devices, the sendLogs API will allow you to select the mail apps. After you select a mail app, it will attach the log details along with the app support team's mail ID automatically to the mail composer. The following screen shot will help you understand how the sendLogs API functions in an Android device.

In iOS devices, the sendLogs API opens the default mail composer for the device with the attached log details and the mail ID as shown in the following screen shot.

  1. If you want to add additional log messages to the app log file, use the logToFile API. Sample code is as follows:


canvasHybridUtil.logToFile(logMsg);

Or

console.log("logMsg");


Note: canvasHybridUtil is the object of the class CanvasHybridUtil, present in the canvas.hybrid.util.js file.

  • No labels