This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| /* Window and View Styling */ | |
| '.container': { | |
| height: Ti.UI.FILL, | |
| width: Ti.UI.FILL, | |
| backgroundColor: 'white' | |
| } | |
| /* TabGroup styling */ | |
| '#tabGroup':{ |
This file contains hidden or 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 code was inspired by the work done by David Riccitelli | |
| * | |
| * Copyright 2011 Aaron K. Saunders, Clearly Innovative Inc | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * |