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
<?php | |
// Put your device token here (without spaces): | |
$deviceToken = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
// Put your private key's passphrase here: | |
$passphrase = 'xxxxxxx'; | |
// Put your alert message here: | |
$message = 'A push notification has been sent!'; |
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 win = Titanium.UI.createWindow({ | |
backgroundColor : 'red', | |
}); | |
// get refernce to the current window | |
var queslabel = Titanium.UI.createLabel({ | |
text : 'Question', | |
height : 50, | |
color : '#000000', | |
font : { |
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
/* | |
Copyright 2011-2013 Abdulla Abdurakhmanov | |
Original sources are available at https://code.google.com/p/x2js/ | |
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 | |
http://www.apache.org/licenses/LICENSE-2.0 |
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
fs.exists('data/ipg150303.xml', function (exists) { | |
console.log("exists" + exists); | |
if (exists) { | |
console.log("exists" + exists); | |
fs.readFile('data/ipg150303.xml', 'utf8', function (err, data) { | |
if (err) { | |
return console.log(err); | |
} | |
data = data.split('<?xml version="1.0" encoding="UTF-8"?>'); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE us-patent-grant SYSTEM "us-patent-grant-v45-2014-04-03.dtd" [ ]> | |
<us-patent-grant lang="EN" dtd-version="v4.5 2014-04-03" file="USD0723366-20150303.XML" status="PRODUCTION" id="us-patent-grant" country="US" date-produced="20150217" date-publ="20150303"> | |
<us-bibliographic-data-grant> | |
<publication-reference> | |
<document-id> | |
<country>US</country> | |
<doc-number>D0723366</doc-number> | |
<kind>S1</kind> | |
<date>20150303</date> |
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 win = Titanium.UI.createWindow({ | |
title : 'Audio Test', | |
backgroundColor : '#fff', | |
//layout : 'vertical' | |
}); | |
var url = encodeURIComponent("https://itunes.apple.com/us/app/smartuaq/id1063110068?ls=1&mt=8").replace(/'/g,"%27").replace(/"/g,"%22"); | |
var whatsappUrl = 'whatsapp://send?text=' + url; |
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 TiTouchId = require("ti.touchid"); | |
var win = Ti.UI.createWindow(); | |
var btn = Ti.UI.createButton({ | |
title : 'authenticate' | |
}); | |
win.add(btn); | |
var retry = 0; | |
btn.addEventListener('click', function() { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<style name="Light" parent="Theme.AppCompat.Light"/> | |
<style name="Dark" parent="Theme.AppCompat"/> | |
<style name="Theme.CustomActionBar" parent="@style/Theme.AppCompat.Light"> | |
<!-- Specify an Action Bar style to use --> | |
</style> | |
</resources> |