Skip to content

Instantly share code, notes, and snippets.

@MotiurRahman
Last active October 29, 2019 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MotiurRahman/c39f486dff0b600e0f6572d4f91d1eda to your computer and use it in GitHub Desktop.
Save MotiurRahman/c39f486dff0b600e0f6572d4f91d1eda to your computer and use it in GitHub Desktop.
setUsername and setMetadata Test
var win = Ti.UI.createWindow({
backgroundColor : '#fff'
});
// Create a Button.
var ACATest = Ti.UI.createButton({
title : 'ACATest',
color : "red",
height : Ti.UI.SIZE,
width : Ti.UI.SIZE,
});
var acs = require("com.appcelerator.aca");
acs.setUsername('motiur rahman');
// Listen for click events.
ACATest.addEventListener('click', function() {
try {
var err = new Error('FATAL ERROR: Value cannot be null or undefined!');
if (value === null || value === undefined)
throw err;
} catch (err) {
acs.logHandledException(err);
acs.setMetadata('email', 'motiur@gmil.com');
}
});
win.add(ACATest);
win.open();
@milon120203
Copy link

error on this link -> aca.setMetadata('motiur', 'might be an issue');
it shoulbe acs.setMetadata('motiur', 'might be an issue');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment