This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Operating System | |
Name = Microsoft Windows 8.1 Pro with Media Center | |
Version = 6.3.9600 | |
Architecture = 64bit | |
# CPUs = 4 | |
Memory = 6298132480 | |
Node.js | |
Node.js Version = 8.9.1 | |
npm Version = 5.5.1 | |
Titanium CLI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var win = Ti.UI.createWindow({layout:'vertical'}); | |
var label = Ti.UI.createLabel({top:30,width:'90%',height:Ti.UI.SIZE}); | |
win.addEventListener('open',function(){ | |
Ti.Geolocation.requestLocationPermissions(Ti.Geolocation.AUTHORIZATION_ALWAYS, function(e){ apiInfo(JSON.stringify(e)); }); | |
}); | |
function apiInfo(msg) { | |
Titanium.UI.createAlertDialog({ | |
title: "info", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function onClick() { | |
Ti.API.info('@@@ Setting focus'); | |
alert($.Text1.getValue()); | |
} | |
$.Text1.value = "86.6"; | |
$.index.open(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Alloy> | |
<Window layout="vertical"> | |
<TextField top="50" id="Text1" onClick="onClick" width="80%">86.6</TextField> | |
</Window> | |
</Alloy> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var vidWin = Titanium.UI.createWindow({ | |
title : 'Video View Demo', | |
backgroundColor : '#fff' | |
}); | |
var videoPlayer = Titanium.Media.createVideoPlayer({ | |
top : 2, | |
autoplay : false, | |
backgroundColor : 'blue', | |
height : 600, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Require the module | |
var CloudPush = require('ti.cloudpush'); | |
var deviceToken = null; | |
// Initialize the module | |
CloudPush.retrieveDeviceToken({ | |
success: deviceTokenSuccess, | |
error: deviceTokenError | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ti.App.Cloud = require("ti.cloud"); | |
Ti.App.CloudPush = require('ti.cloudpush'); | |
Ti.App.CloudPush.enabled = true; | |
Ti.App.CloudPush.showTrayNotification = true; | |
Ti.App.CloudPush.showTrayNotificationsWhenFocused = true; | |
Ti.App.CloudPush.focusAppOnPush = false; | |
Ti.App.CloudPush.singleCallback = true; | |
Ti.App.CloudPush.addEventListener('callback', function(evt) { |
OlderNewer