Titanium Appcelerator and Zipfile module

I was working on an Titanium Appcelerator project yesterday where I needed to download a zip file to a mobile device, then extract its contents. After doing a little research, I found the Titanium Zipfile module out on Github. Ultimately, this is exactly what I needed, but there were some stumbling blocks along the way so I thought I’d document them (and the solutions) here.

First off, the latest Zipfile module (as of this writing) is version 0.1.21. This version is not available as a binary download from the Github repository. Fortunately, this post led me to a download for it.

I found this nice piece of code Dan Tamas posted in an answer to a question about downloading image files. I promptly copied that off to a FileManager.js file to ‘require’ into the app.

As I started testing, it wasn’t working and I didn’t know whether the file wasn’t getting downloaded or wasn’t getting extracted. By default, my simulator run configuration was setup for INFO. Turning to DEBUG revealed that it wasn’t able to locate the zip file. After checking that paths were being set correctly, I found this note at the Github project’s issues tab that applies to the 1.8x SDK codestream.

Replacing the following example code from the documentation:

  1. zipfile.extract(  
  2.   Ti.Filesystem.applicationDataDirectory+‘/Archive.zip’,  
  3.   Ti.Filesystem.applicationDataDirectory);

with this:

  1. var appDir = Ti.Network.decodeURIComponent(  
  2.   Ti.Filesystem.applicationDataDirectory).replace(  
  3.   ‘file://localhost’, );  
  4. zipfile.extract(appDir+‘Archive.zip’, appDir);

did in fact solve the issue and everything works great from there.

Mobile CRM for Notes: An iPhone client for contact management

If there’s one application that proliferated like wild-fire in the Lotus Notes community over the years, it was CRM (contact relationship management).   Whether internally written, or bought from a packaged vendor, there were hundreds implemented around the world.

While mobile devices have been great at providing a localized set of contacts, it hasn’t been practical to store/sync full CRM datasets that might be hundreds of thousands of records.  In the traditional sense of a client-server solution, it makes sense to have a Mobile CRM device provide an intuitive interface to this data, while maintaining it in the back-end system (whether Notes or something else).

Company ListRecently, my company has developed an iPhone Mobile CRM interface for company and contact information.  This client will be available for free in the App Store soon. What makes the client particularly useful is that when a profile is filled out, it can work against any number of Notes-based CRMs.  The client connects to an intermediate API application running on the Notes server that knows how to get data from the host CRM and provide it to the Mobile CRM client.

I’ll be writing more about this in the coming weeks with diagrams of how the infrastructure works.  In the meantime, we’ve got a couple of clients who are beta testing against their own CRMs.  I’m excited about this project as it really gave us a chance to work through the full spectrum of an Appcelerator Titanium project for client server communications to the Mobile CrM and we’ll be able to make this available on the Android platform as well.

Stay tuned, and of course, if you’re a potential customer, we’d love to hear from you at WorkFlow Studios, or go to my Contact page.