Skip to content

Instantly share code, notes, and snippets.

View egomez99's full-sized avatar

Eduardo Gomez egomez99

  • Automation Testing
  • Guadalajara, Mexico.
  • 01:55 (UTC -06:00)
View GitHub Profile
@egomez99
egomez99 / app.js
Created August 28, 2015 17:39
Android Notification Icon
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
navBarHidden : true
});
showAndroidNotification("Notification","App icon");
win1.open();
var win = Ti.UI.createWindow({
layout : 'vertical'
});
var view = Ti.UI.createView({
top : 0,
height : 50,
});
var webview = Ti.UI.createWebView({
top : 5,
@egomez99
egomez99 / ti info
Created July 20, 2014 01:03
Administrator CMD session
C:\Windows\system32>ti info
Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.3.0.G
A
Copyright (c) 2012-2014, Appcelerator, Inc. All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
-
C:\Users\josedejesus\AppData\Roaming\npm\node_modules\titanium\node_modules\long
john\dist\longjohn.js:185
Titanium Command-Line Interface, CLI version 3.3.0, Titanium SDK version 3.3.0.GA
Copyright (c) 2012-2014, Appcelerator, Inc. All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
[DEBUG] : Detecting plugins in C:\Users\josedejesus\Downloads\Documents\Appcelerator_Studio_Workspace\AlloTestTabs\plugins
[INFO] : Found Titanium plugin id=ti.alloy version=1.0
[INFO] : Deploy type: development
[DEBUG] : Detected plugin: ti.alloy @ C:\Users\josedejesus\Downloads\Documents\Appcelerator_Studio_Workspace\AlloTestTabs\plugins\ti.alloy
[DEBUG] : Detecting plugins in C:\Users\josedejesus\AppData\Roaming\Titanium\plugins
[INFO] : Building for target: emulator
[INFO] : Building for emulator: TEST
@egomez99
egomez99 / app.js
Created April 21, 2014 17:43
Google APIs V3 and Google Maps V2 (TiModule 2.1.4)
var v2 = 'http://maps.googleapis.com/maps/geo?output=json&q=';
var v3 = 'https://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=';
var xhr = Titanium.Network.createHTTPClient();
var query = 'Sydney Australia'; // or whatever you want to forward geocode
xhr.open('GET', v3 + query);
xhr.onload = function() {
var json = JSON.parse(this.responseText);
Ti.API.info(json);
};
@egomez99
egomez99 / app.js
Created September 3, 2013 01:31
Database PRAGMA commmand
var object = require('database').win();
object.open();
@egomez99
egomez99 / app.js
Last active December 20, 2015 20:19
Android Activity tracker
function create() {
Ti.API.info(" ### STATE: CREATE");
}
function destroy() {
Ti.API.info(" ### STATE: DESTROY");
}
function newintent() {
Ti.API.info(" ### STATE: NEW INTENT");
@egomez99
egomez99 / app.js
Created August 6, 2013 22:43
Get WIFI SSID (network name) from Android module
// open a single window
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var label = Ti.UI.createLabel();
win.add(label);
win.open();
// TODO: write your module tests here
var wifissid = require('org.appcelerator.wifissid');
@egomez99
egomez99 / app.js
Created June 28, 2013 23:19
iOS createDocumentViewer
var win = Titanium.UI.createWindow({
title : 'Window',
backgroundColor : '#fff',
className : 'navBarColor',
translucent : false
});
var scrollingView = Ti.UI.createScrollView({
top : 0,
left : 0,
@egomez99
egomez99 / app.js
Created June 27, 2013 22:35
Start an activity and download a remote image
var win = Ti.UI.createWindow({
layout : 'vertical',
backgroundColor : "#b5aea5"
});
//attempt to start an activity while Image is downloading
var intent = Ti.Android.createIntent({
action : Ti.Android.ACTION_CALL,
data : 'tel:0133' + 31361035
});