Skip to content

Instantly share code, notes, and snippets.

[INFO] Launching Android emulator...one moment
[DEBUG] From: C:\android-sdk\tools\emulator.exe
[DEBUG] SDCard: C:\Documents and Settings\bill\.titanium\android2.sdcard
[DEBUG] AVD ID: 11
[DEBUG] AVD Skin: HVGA
[DEBUG] SDK: C:\android-sdk
[INFO] Creating shared 64M SD card for use in Android emulator(s)
[DEBUG] C:\android-sdk\tools\mksdcard.exe 64M C:\Documents and Settings\bill\.titanium\android2.sdcard
[DEBUG] C:\android-sdk\tools\emulator.exe -avd titanium_11_HVGA -port 5560 -sdcard C:\Documents and Settings\bill\.titanium\android2.sdcard -logcat '*:d *' -no-boot-anim
[INFO] Building Test121 for Android ... one moment
[INFO] Launching Android emulator...one moment
[DEBUG] From: C:\android-sdk\tools\emulator.exe
[DEBUG] SDCard: C:\Documents and Settings\bill\.titanium\android2.sdcard
[DEBUG] AVD ID: 11
[DEBUG] AVD Skin: HVGA
[DEBUG] SDK: C:\android-sdk
[DEBUG] C:\android-sdk\tools\emulator.exe -avd titanium_11_HVGA -port 5560 -sdcard C:\Documents and Settings\bill\.titanium\android2.sdcard -logcat '*:d *' -no-boot-anim
[TRACE] # I/vold ( 27): Android Volume Daemon version 2.0
[TRACE] I/DEBUG ( 28): debuggerd: Dec 18 2009 16:42:51
[TRACE] I/vold ( 27): New MMC card 'SU02G' (serial 1012966) added @ /devices/platform/goldfish_mmc.0/mmc_host/mmc0/mmc0:e118
# This emulates what happens in Titanium's android support "run.py"
# script
import subprocess
p = subprocess.Popen(args=['adb', '-e', 'devices'],
stderr=subprocess.PIPE,
stdout=subprocess.PIPE)
# If the adb daemon is NOT already running,
# (i.e., if you run 'adb kill-server' without
import os,subprocess,types,sys
def run(args,ignore_error=False,debug=True, ignore_output=False):
if debug:
print "[DEBUG] %s"%(" ".join(args))
sys.stdout.flush()
if ignore_output:
subprocess.Popen(args, stderr=subprocess.PIPE, stdout=subprocess.PIPE).wait()
return None
(so,se) = subprocess.Popen(args, stderr=subprocess.PIPE, stdout=subprocess.PIPE).communicate()
if platform.system() == 'Windows':
run.run([self.sdk.get_adb(), "start-server"], True, ignore_output=True)
@billdawson
billdawson / gist:375136
Created April 22, 2010 12:06
Java and I
Java and I
==========
22 April 2010
My only Java code running in production is a relatively small,
single-purpose servlet developed a few months ago. Professionally
speaking, my background is MS dev tools (I'm an MCSD.) As a
hobbyist, I've followed Java since picking up the first edition of
Eckel's "Thinking in Java" back in the day. I run Eclipse Galileo
@billdawson
billdawson / gist:378439
Created April 25, 2010 14:30
Suggestion for adding to top of Getting Started with Titanium Mobile
<h2>Pre-Requisites</h2>
<h3>For iPhone/iPad App Development</h3>
<p>Get the latest iPhone SDK from Apple's <a href="http://developer.apple.com/iphone">iPhone
Dev Center</a>. The standard SDK download will include XCode and all the other development
tools that we require. Note: You need at least iPhone SDK 3.2 if you want to develop for
both the iPhone and the iPad. </p>
<h3>For Android App Development</h3>
var win = Ti.UI.currentWindow;
var view = Titanium.UI.createView({
backgroundColor:'red',
width:200,
height:200,
top: 0,
left: 0
});
protected boolean keyChar(char arg0, int arg1, int arg2)
{
int key = (int) arg0;
boolean suppress = false;
if (key == Keypad.KEY_ENTER) {
if (proxy.hasDynamicValue("suppressReturn")) {
suppress = TiConvert.toBoolean(proxy.getDynamicValue("suppressReturn"));
}
}
if (suppress) {
@billdawson
billdawson / all_ti_contacts.js
Created September 15, 2010 20:53
Show data for all contacts (Titanium)
function dosubs(person, property, labels) {
if (!(person[property])) {
return;
}
var pset = person[property];
for (var i = 0; i < labels.length; i++) {
var label = labels[i];
if (!(pset[label])) {
continue;
}