Archive for the ‘Android’ Category

Updating to Android r22 Tools

Thursday, May 23rd, 2013

Recently Google released an update (r22) to their Android developer tooling. This update has rearranged the directory structure of the tools and breaks the building of Android projects both from the CLI and inside Titanium Studio. Unless you need the updated functionality we recommend you hold off updating for now.

How do I know if I’ve run into this issue?

See TIMOB-13944. You’ll get a failure similar to “TypeError: argument of type ‘NoneType’ is not iterable”

How do I fix this problem?

There are a number of different ways to address the issue, depending on your goals:

If you want to use just the very latest version of the SDK, download the pre-release 3.1.1 build from http://builds.appcelerator.com.s3.amazonaws.com/index.html#3_1_X

If you need  to use prior versions of the SDK:

Please Review ListView Phase 2 specification

Wednesday, May 8th, 2013

Last month as part of our 3.1.0 release we introduced a new, faster version of TableView called ListView. As a refresher, it has several key features:

  • Data-oriented vs view-oriented architecture
  • A separate module. Does not replace the existing TableView so you can migrate on your schedule
  • Extremely performant

We’re now working on phase 2 of that implementation. Please review the specification and add your comments by EOD 5/15 (Next Wednesday).

Link: https://wiki.appcelerator.org/display/community/Titanium+ListView+Specification

Titanium SDK/Studio 3.1.0 Beta Now Available

Wednesday, April 3rd, 2013

We’re very excited about our newest release of Titanium—version 3.1.0. Today we release a beta of both SDK and Titanium Studio—the newest version of our Titanium platform. This release focuses on performance. Not only are we introducing the successor to TableView in ListView, we’ve made the whole iOS and Android platform faster.

How much faster?

  • Our new component, ListView, is multiple times faster than TableView
  • On iOS, we have an average 20% performance gain from 3.0.0 for the entire platform
  • On Android, we have an average 36% performance gain from 3.0.0 for the entire platform

In short, your apps should run better and faster under 3.1.0. Read on below, and for full information, please see the release notes.

Note: This is a beta release, and as such may contain regressions or other issues. Please do not use it in production, and keep backups of all important projects and data. We will follow with additional releases in the coming weeks. If you find an issue, please report it in JIRA with a reproducible test case.

How to Update

These are links to continuous integration builds. To install them, choose “Help Menu > Install Specific Titanium SDK…” from inside Titanium Studio.

To update Studio, please visit http://preview.appcelerator.com and follow the instructions to update to the RC stream, or to download a new install.

NPM Packages

Note: You may need to use ‘sudo’ before these terminal commands on OSX and Linux
npm install -g alloy@1.1.0-beta
npm install -g titanium-code-processor@1.0.0-beta
npm install -g titanium@3.1.0-beta
To revert back to stable versions:
npm remove -g titanium
npm install -g titanium
npm remove -g alloy
npm install -g alloy
npm remove -g titanium-code-processor
npm install -g titanium-code-processor

New Features in Titanium 3.1.0

The docs are all available at: http://docs.appcelerator.com/titanium/latest/

ListView

This release introduces ListView, a new Titanium proxy to replace the existing TableView. Both list view and table view present data to user as a vertically scrolling list of rows. However, list view uses a data-oriented approach versus table view’s view-oriented approach.

Alloy Updates

New collection binding functionality has been added. You can now also get Alloy content assist and debug Alloy applications inside Titanium Studio.

EventKit UI Framework

The iOS EventKit framework, allowing access to calendar events and reminders, is now available inside Titanium.

iOS6 Core Location AutoPause API

The iOS AutoPause API pauses the location updates when an application goes into the background. We’ve implemented access to this new API in Titanium.

iOS Retina simulator support

The iOS simulator now allows you to choose to launch in Retina mode on demand, rather than needing to switch the simulator manually.

A Slimmer Titanium Studio

We’ve been working on making Titanium Studio as lean as possible. One step we’ve taken is to break the server-side language plugins (PHP, Ruby and Python) into separate optional installs. If you need them, just follow the links at http://preview.appcelerator.com to add them back in.

New Platforms

BlackBerry

Our BlackBerry support will go into beta at the same time as 3.1.0 ships. Studio now supports creating projects as well as running them on simulator and device.

Tizen

Our newest platform, Tizen, is now a full member of the Titanium family. Use Tizen from inside Studio 3.1.0. Create projects and run on emulator and device.

New Modules

Facebook V3 (Android and iOS)

Our Facebook module is now updated to be compatible with the latest V3 version of the Facebook API. Download the updated beta module here: Android and iOS.

Google Maps V2 (Android)

As mentioned previously, we’ve updated our Android maps module to support Google Maps V2. Download the latest beta here.

Newsstand (iOS)

Publish a magazine or periodical! We’ve developed a new module for interfacing with Apple’s Newsstand service. Download the beta module here.

NFC (Android)

You can now read NFC (Near-Field Communication) tags from inside Titanium applications. Download the beta module here.

Correcting a Bug in the Latest Google NDK r8e

Friday, March 29th, 2013

In our continuing effort to inform you of ecosystem issues as we encounter them, the latest NDK toolchain update from Google contains a bug. This causes an issue when building the Titanium Mobile SDK from source. The fix is trivial, and is only necessary if you’ve updated to NDK version r8e, released March 21st, 2013 and are building Titanium Mobile using SCons.

To perform the fix, edit the file build/core/build-binary.mk under the Android NDK directory, replacing line 49:

$(cleantarget): PRIVATE_CLEAN_FILES := ($(my)OBJS)

With this:

$(cleantarget): PRIVATE_CLEAN_FILES := $($(my)OBJS)

The following output from “scons android” (when building titatitanium_mobile) is a symptom of the problem:
     [exec] rm -f src/native/../../generated/*
     [exec] rm -rf src/native/../../obj/*
     [exec] Clean: kroll-v8 [armeabi]
     [exec] rm -rf (TARGET_OBJS)
     [exec] /bin/sh: -c: line 0: syntax error near unexpected token `(‘
     [exec] /bin/sh: -c: line 0: `rm -rf (TARGET_OBJS)’
     [exec] make: *** [clean-kroll-v8-armeabi] Error 2

 

More information can be found here:

https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/3wIbb-h3nDU

There is a second issue that only affects Max OS X developers using the 64-bit NDK (i.e. the download with the file name android-ndk-r8e-darwin-x86_64.tar.bz2). The fix is trivial and requires you to make the following one-line changes to these two files:

${ANDROID_NDK}/ndk-build: Replace line 158:

file -L “$SHELL” | grep -q “x86[_-]64″

with this:

file -L “$SHELL” | grep -q “[xX]86[_-]64″

${ANDROID_NDK}/build/core/init.mk: Replace line 229:

ifneq (,$(shell file -L $(SHELL) | grep ‘x86[_-]64′))

with this:

ifneq (,$(shell file -L $(SHELL) | grep ‘[xX]86[_-]64′))

As a note, you should be using the 64-bit NDK if your system supports it, since you will get 30% faster builds. The 64-bit tools utilize host resources better (faster, handle larger programs, etc) and they should function identically to their 32-bit counterparts, i.e. 64-bit toolchains still generate 32-bit binaries for Android.

This issue will be fixed by Google in the next release of the NDK. We will update this post with any new information we receive.

Please hold off updating to Node.js v0.10 just yet

Monday, March 11th, 2013

Node.js is an important foundational tool of our development stack. Version 0.10 of Node.js, released today, incorporates breaking changes that affect our command-line tooling and thus prevent Titanium developers from building and deploying applications. We are investigating these changes and are tracking fixes to them as part of TIMOB-13025. As a result, we caution you not to update to this latest version of Node.js until we have been able to make the appropriate fixes, likely as part of SDK 3.1.0. We will update this ticket with additional information or workarounds, so please follow along there.