Skip to content

Instantly share code, notes, and snippets.

View SmartfaceDocs's full-sized avatar

SmartfaceDocs SmartfaceDocs

View GitHub Profile
@SmartfaceDocs
SmartfaceDocs / include.js
Last active May 27, 2018 21:04
Salesforce Plugin
include("sf.js");
@SmartfaceDocs
SmartfaceDocs / mybutton.js
Last active January 5, 2016 17:25
Device Force Touch
var myTextButton = new SMF.UI.TextButton({
top : "35%",
left : "15%",
height : "10%",
width : "70%",
text : "trigger dragInside"
});
Pages.Page1.add(myTextButton);
myTextButton.onDragInside = function (e) {
if (Device.forceTouchCapability) {
@SmartfaceDocs
SmartfaceDocs / canevaluatefingerprint.js
Last active December 19, 2020 12:00
Device fingerprint
if (Device.canEvaluateFingerPrint) {
// here scan fingerprint method can be called
} else {
// biometry is not available for that device
}
@SmartfaceDocs
SmartfaceDocs / define-global-variables.js
Last active December 11, 2015 14:54
MapView Functions
var myLat = null;
var myLong = null;
var myNewLat;
var myNewLong;
@SmartfaceDocs
SmartfaceDocs / myhellobutton-ios.js
Last active December 10, 2015 18:46
Hello World Plugin Guide - Android and iOS
var helloworld = new HelloNotifier();
var myHelloButton = new SMF.UI.TextButton({
top : "15%",
left : "10%",
height : "10%",
width : "80%",
text : "say hello",
onPressed : function () {
helloworld.sayHello(function (e) {
alert(e);
@SmartfaceDocs
SmartfaceDocs / example1.js
Created December 8, 2015 08:50
Android Key Codes Guide
function Page1_Self_OnKeyPress(e) {
if (e.keyCode == 4) {
Application.exit();
}
}
@SmartfaceDocs
SmartfaceDocs / android-example.js
Last active January 4, 2016 15:24
Plugin Examples
{
"name" : "helloPlugin",
"version" : "1.0.0",
"description" : "Smartface Hello Plugin",
"keywords" : [
"Smartface",
"Hello",
"Plugin"
],
"author" : "Smartface Inc.",
@SmartfaceDocs
SmartfaceDocs / closesession.js
Last active December 4, 2015 09:26
Plugins Facebook Guide - after 4.5.0
fb.closeSession();
@SmartfaceDocs
SmartfaceDocs / adrequest.js
Last active November 3, 2015 13:39
Plugins AdMob Guide
var request = GADRequest.request();
request.testDevices = [adView.simulatorId()];
adView.loadRequest(request);
@SmartfaceDocs
SmartfaceDocs / dispatchinterval.js
Last active October 28, 2015 14:30
Plugins Google Analytics iOS (450)
instance.dispatchInterval = 0;