Skip to content

Instantly share code, notes, and snippets.

@nomaad
nomaad / API.js
Created November 1, 2012 12:41
Titanium Mobile - Android Not Responding problem
/**
* This is the main object and single global variable for the app. Glues the app together.
* Included by app.js
*/
var api = {};
(function() {
/**
* The UI namespace for all UI components.
@nomaad
nomaad / gist:3283201
Created August 7, 2012 08:28
Titanium Audio Streaming crashes app on 3G connection(Android)
// load sound from remote url
Ti.API.log(item.value.value1); // While the crash occurs, this contains 'http://stadtfestradio.argovia.ch/live'
var streamer = Ti.Media.createAudioPlayer({url:item.value.value1, bufferSize: 4096});
var isPlaying = false;
var container = Ti.UI.createView(api.combine($$.ContentChildView, {top:topMargin}));
parent.add(container);
var stack = Ti.UI.createView({
left: 65,
layout: 'vertical',
width:Ti.UI.SIZE,