Skip to content

Instantly share code, notes, and snippets.

View addieljuarez's full-sized avatar

Addiel addieljuarez

View GitHub Profile
var addrUrl = "http://maps.googleapis.com/maps/api/geocode/json?sensor=true&latlng="+e.coords.latitude+","+e.coords.longitude;
var addrReq = Titanium.Network.createHTTPClient();
addrReq.open("GET",addrUrl);
addrReq.send(null);
addrReq.onload = function()
{
var Cloud = require('ti.cloud');
var currentSessionMode = Ti.Media.audioSessionCategory;
Ti.Media.audioSessionCategory = Ti.Media.AUDIO_SESSION_CATEGORY_PLAY_AND_RECORD;
var record = false;
var file;
var idSound;
/***
* Appcelerator Titanium example of custom confirm dialog for TableView's delete events.
* Asks to confirm/cancel a delete operation. On cancel restores the deleted row in
* its former position in the table data.
*
* @Copyleft 2013 Patrick De Marta
* @License GNU GPL
*/
-----------------------------------------------------------------------------------------
--
-- main.lua
--
-----------------------------------------------------------------------------------------
-- Your code here
local physics = require('physics')
physics.start()
@addieljuarez
addieljuarez / index.html
Created November 1, 2014 01:36
fireEvent desde un html local
<!DOCTYPE html>
<html>
<header>
</header>
<body>
<div style="position: relative; top: 50px;">
<input type="text" id="inputWeb"/>
<button id="botonWeb">
click
@addieljuarez
addieljuarez / index.js
Created October 30, 2014 01:36
ejemplo FireEvent and EventListener
$.index.open();
$.botonNuevaVentana.addEventListener('click', function(e){
var ventana2 = Alloy.createController('ventana2').getView();
ventana2.open();
});
@addieljuarez
addieljuarez / mapaiOS8.js
Created October 3, 2014 21:55
mapaiOS8'js
$.index.open();
var MapModule = require('ti.map');
Ti.Geolocation.addEventListener('authorization', function(e) {
Ti.API.info('authorization event:' + JSON.stringify(e));
});
@addieljuarez
addieljuarez / primerSesion.js
Created September 27, 2014 23:17
sesion 27 septiembre
var ventana = Titanium.UI.createWindow({
backgroundColor:'green',
top:10,
left:10,
right:10,
bottom:10,
borderRadius:15,
borderColor:'#fff',
borderWidth:3,
@addieljuarez
addieljuarez / index.html
Created September 27, 2014 23:14
index curso
<!DOCTYPE html>
<html>
<body>
<h1>10 +</h1>
<input id="input" />
<button id="boton">click</button>
<script>
var fijo = 10;
function inicio (data){
var seg = data;
function cronometro(){
if(seg!=0){
Titanium.API .info(seg);
seg--;
var m = seg/60;
var s = seg % 60;