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
//"THE BEER-WARE LICENSE": As long as you retain this notice you can do whatever you want with this stuff. | |
//If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Jamie Buckley | |
var screenWidth = Ti.Platform.displayCaps.platformWidth; | |
var screenHeight = Ti.Platform.displayCaps.platformHeight; | |
var win = Ti.UI.createWindow({ | |
fullscreen: true, | |
width: screenWidth, | |
height: screenHeight, |
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
//"THE BEER-WARE LICENSE": As long as you retain this notice you can do whatever you want with this stuff. | |
//If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Jamie Buckley | |
var win = Ti.UI.createWindow({ | |
backgroundColor: 'black', | |
fullscreen: true, | |
width: Ti.Platform.displayCaps.platformWidth, | |
height: Ti.Platform.displayCaps.platformHeight | |
}); |
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
This gist is only for Android. | |
If you would like launch native apps | |
on iPhone, iPad, you can find information about it in Appcelerator Docs: | |
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.canOpenURL-method.html | |
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.openURL-method.html | |
More info about iOS URL Schemes: http://handleopenurl.com/ |
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
This gist is only for Android. | |
If you would like launch native apps | |
on iPhone, iPad, you can find information about it in Appcelerator Docs: | |
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.canOpenURL-method.html | |
-https://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Platform.openURL-method.html | |
More info about iOS URL Schemes: http://handleopenurl.com/ |
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
qrScanButton.addEventListener("click", function(e) { | |
var intent = Ti.Android.createIntent({ | |
action: "com.google.zxing.client.android.SCAN" | |
}); | |
intent.putExtra("SCAN_MODE", "QR_SCAN_MODE"); | |
var activity = Ti.Android.currentActivity; | |
activity.startActivityForResult(intent, function(e) { | |
if (e.resultCode == Ti.Android.RESULT_OK) { | |
var contents = e.intent.getStringExtra("SCAN_RESULT"); | |
var format = e.intent.getStringExtra("SCAN_RESULT_FORMAT"); |
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 activity = Ti.Android.currentActivity; | |
var win = Ti.UI.currentWindow; | |
activity.addEventListener("create", function(e) { | |
var button = Ti.UI.createButton({title: "Hello world"}); | |
button.addEventListener("click", function(e) { | |
activity.finish(); | |
}); | |
win.add(button); | |
}); |
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
// This is an example of use. | |
// Here we use the new Bearer Token thats make it possible to get tweets without user login | |
// More info on Bearer here: https://dev.twitter.com/docs/auth/application-only-auth | |
// Full Codebird API is here: https://github.com/mynetx/codebird-js | |
var Codebird = require("codebird"); | |
var cb = new Codebird(); | |
cb.setConsumerKey('CONSUMER_KEY', 'CONSUMER_SECRET_KEY'); | |
var bearerToken = Ti.App.Properties.getString('TwitterBearerToken', null); |
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
// | |
// blog.clearlyionnovative.com | |
// twitter: @aaronksaunders | |
// | |
// Model file for integration Appcelerator Titanium Alloy with Wordpress JSON Plugin | |
// | |
exports.definition = { | |
config : { | |
"columns" : {}, |
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 PassCode(_params){ | |
_params = _params || {}; | |
// @PARAMS:{ | |
// boxSize: (Number) size of the passcode character boxes | |
// backgroundColor: (String) background color of the mainview | |
// backgroundImage: (String) background image of the mainview | |
// panicColor: (String) background color of the view when panic() is called - when wrong password | |
// titleText: (String) the text of the title view, above the pass code boxes by default, | |
// mainView: (Object) params for the main view that hold the passcode boxes |