Quick Example of registering a scheme in TiApp.xml, implementing the code in app.js / alloy.js
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 | |
// Server file | |
class PushNotifications { | |
// (Android)API access key from Google API's Console. | |
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI'; | |
// (iOS) Private key's passphrase. | |
private static $passphrase = 'joashp'; | |
// (Windows Phone 8) The name of our push channel. | |
private static $channelName = "joashp"; |
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 | |
// Provide the Host Information. | |
//$tHost = 'gateway.sandbox.push.apple.com'; | |
$tHost = 'gateway.push.apple.com'; | |
$tPort = 2195; |
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
// gcm.js | |
/** | |
* Librería gcm - CommonJS - Alloy | |
* @author Andrés Castaño Cuervo | |
* @version 1.1.1 | |
* Copyright Evomedia | |
* www.evoluciondigital.com.co | |
*/ | |
// Inclusión del módulo. |
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
Read the blog at http://fokkezb.nl/2013/08/26/url-schemes-for-ios-and-android-1/
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> |
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
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; |