Titanium MobileでAndroidからTweetする方法

February 21st, 2011




There are a fair number of issues with Titanium and Android, but I was able to get it working on 1.5.1. I can post a diff later, but essentially this is what I found:

  1. Titanium.Network doesn’t seem to work in synchronous mode in Android, had to modify the adapter to use callbacks instead of returns.
  2. The number to string conversion for timestamps in client.send() went into float format, so Twitter couldn’t recognize the timestamp. Put in a .toFixed(0) before it was sent.
  3. webView.html does not get populated on Android, so used the work-around posted here: http://developer.appcelerator.com/question/102231/android-sees-tiuiwebviewhtml-as-undefined
  4. Had trouble getting the source that was fetched with the work-around to parse in the XML utility, so I used a regex instead.
  5. Also noticed that the regex on Android+Titanium doesn’t seem to populate captures if there’s more than one capture defined.


Leave a Reply