Skip to content

Instantly share code, notes, and snippets.

View boydlee's full-sized avatar

Boydlee Pollentine boydlee

View GitHub Profile
@boydlee
boydlee / Gruntfile.js
Last active September 9, 2015 13:36 — forked from skypanther/Gruntfile.js
Grunt - build your Titanium app and upload to Installr
var _ = require('underscore')._;
module.exports = function(grunt) {
grunt.initConfig({
settings: {
appName: 'YourAppName',
ppUuid: 'uuid', /* Provisioning profile UUID */
distributionName: 'cert_name', /* Distr. certificate name */
keystoreLocation: '/Users/path/to/android.keystore', /* path to keystore */
storePassword: 'keystore_password', /* keystore password */
@boydlee
boydlee / ti.onesignal.js
Last active November 12, 2016 06:22
OneSignal library and basic example for push notifications using Appcelerator Titanium See https://gist.github.com/boydlee/2e5bbcf6c8795fd821d9e231841a776d for a basic usage example with tags. This code uses the GCM library "nl.vanvianen.android.gcm" which is on Github at https://github.com/morinel/gcmpush
var gcm;
var androidSettings = {
/* The Sender ID from Google Developers Console, see https://console.developers.google.com/project/XXXXXXXX/apiui/credential */
/* It's the same as your project id */
senderId: Alloy.CFG.gcm_project_id ? Alloy.CFG.gcm_project_id : "<your gcm project id --- xxxxxxxxxxxx>",
notificationSettings: {
//sound: 'mysound.mp3', /* Place sound file in platform/android/res/raw/mysound.mp3 */
smallIcon: 'trayicon.png', /* Place icon in platform/android/res/drawable/notification_icon.png */
largeIcon: 'appicon.png', /* Same */
@boydlee
boydlee / app.js
Created October 9, 2016 16:21
OneSignal library and basic example for push notifications using Appcelerator Titanium See https://gist.github.com/boydlee/fc6955cbd4a7ba1d302df2a4bc93bb06 for the ti.onesignal.js module
/*
OneSignal library and basic example for push notifications using Appcelerator Titanium
See https://gist.github.com/boydlee/fc6955cbd4a7ba1d302df2a4bc93bb06 for the ti.onesignal.js module
*/
var OneSignal = require('ti.onesignal');
OneSignal.register(function(response){
console.log(response);
if(response.success && response.id != "") {
//response.id your OneSignal installation id
OneSignal.updateTags(response.id, {"fav_color": "yellow", "my_tag": "abc123"});
http://10.161.17.146/login?auth=eyAidXNlcm5hbWUiOiAiYXN0YXVzIiwgInBhc3N3b3JkIjogIjkxRDUzNDY0LTdBQUItNDEwQS1BMDNELUE5OTVCMDhFOUQyRiJ9