Submitted by JJSlote on 2009/11/22 22:45
Greetings Folks

Sooner or later, most of us are going to want to download some of our IQ data to mobile devices.

I actually have a semi-acceptable first solution underway for my unit.  But the solution will require improvement for everyday use.  Regardless of unit or chosen app, everyone is going to bump up against similar issues; it would be worthwhile to pool our expertise and refine our toolkits, so that others don't have to start from scratch.
 
My device is pretty laughable as today's phones go. It's an LG 600G on Tracfone (USA). If you're a light phone user and understand Tracfone math, it's easy to see why this option is compelling. The phone cost $40 to buy with no contract or commitment; service is roughly $4/month plus six cents a minute, or two cents an SMS message. Compare with an iPhone: $199, two year commitment, and $75/month for the lowest-cost plan.

Of course the LG is no smartphone. It has a mere 4mb of storage: yep, one twentieth of one percent of an iPhone's. It doesn't multitask or web-browse. But it is quite advanced for a Tracfone, with Bluetooth and email MMS file transfer, a camera, and the ability to run some J2ME Java apps. I haven't found an Outlook sync; you can individually drag and drop contacts, events and notes, but they'll be severely truncated. And the phone can't natively read text files. It displays jpg images, plays certain audio, and runs apps, hit or miss.

One app I did get running was an ebook reader called Tinybook, a free download from GetJar.com. Tinybook doesn't read from the phone's file system; instead, your reading material is essentially compiled into the app.

A J2ME consists of two files that can be transferred from PC to phone: a .JAR, which is a renamed .ZIP with code and data; and a .JAD, which is a renamed .TXT with information that allows the app to be recognized, including the file length of the .JAR.

Tinybook will recognize up to nine .TXT files zipped into the .JAR. Of course I'd like some of those files to come from IQ data. Let's say all items with WIKITag:{Contacts} into one book; all items with WIKITag:{Specifications} into another. My compiler is MS Visual Foxpro 9, a legacy product.

Here's a kludgy way to accomplish the transfer, the best I know right now.  I'd set up a grid corresponding to the desired query. From the grid, I'd run an export to HTM and invoke a display. In Internet Explorer, I'd "select all" and copy (Ctrl-A Ctrl-C). Now I've got a bunch of plain text on the clipboard. I'd run a VFP routine to write the cliptext to a file, zip the file into the .JAR, determine the new file length, filter that into the .JAD, do some renames, and maybe run automated FTP routines to move the app to the phone via Bluetooth. Not complicated stuff: file, directory and string operations. (But notice that IE and VFP have quietly helped parse any HTML and Unicode in the IQ data.)

My questions to the group:

1) Is there an obvious better way to accomplish the export using present IQ capabilities?
2) Is there a parsing, filtering and scripting language that would be best for sharing solutions on the IQ forum? An informal standard, something anybody can download and learn, as opposed to Visual Foxpro. Python? Windows Powershell? IQ's internal VBScript?
3) How close could we get to a routine that executes a process like this on one click? Even semi-automated, the steps are tedious if you're creating several "books" and updating regularly. Note an external script would probably require IQ to extract and export via command-line parms.

Thanks for all your thoughts. I think they'll be of value to all who create their own IQ-to-phone exports in the months ahead.

Jerome


Comments

If I had to do this, I'd go looking in the direction of Excel or better still, Access.
 
For Access:
  • In a new database
  • Create a new module and write the code to read records from the linked table and save to the required files such as:
    • Function Testit()
          Dim r As Recordset, db As Database
          Set db = DBEngine.OpenDatabase("YourFullFilePath")
          Set r = db.OpenRecordset("YourGridName")
          Debug.Print r.RecordCount
      End Function
      n.b. In the Access VB Editor, make sure you add a reference to DAO (Tools>>References)
  • Either create a form to run your code or create an autoexec macro to do it. It will run automatically when you open the Access file
  • Access can save directly to FTP address
In various project, I've done all of these steps, so could help if need be.
 
The same can be done with Excel, but it is IMO definitely more complicated.
 
BTW, the same could be done with internat IQ vbscript. If I don't propose it, is that getting a complicated VBScript working can be more difficult (you need to create ADORecordset, create FileSystemObject, etc)
 
[edit] For a semi-automated way, use Excel:
  • Create an ODBC connection
  • Link data in Excel
  • Then you're on your own to generate the files
[/edit]

Armando

2009/11/23 00:48

In reply to by Pierre_Admin

So what should you be able to read with your phone, exactly ? The access DB ?
 

Pierre_Admin

2009/11/23 01:01

In reply to by Armando

Is this question for me or Jerome ?

Armando

2009/11/23 01:41

In reply to by Pierre_Admin

[quote=Pierre_Admin]
Is this question for me or Jerome ?
[/quote]
 
Sorry... The question was for you.
I'm just not sure how to apply/test your explanation.
Seems interesting aand would like to try. :)

JJSlote

2009/11/23 09:00

In reply to by Pierre_Admin

Pierre, thanks for the guidance and sample code, a bit over my head as yet. A working ODBC connection to IQ is one of my objectives in the year ahead. But as IQ users share their scripts, I think there's an advantage to building on methods that require only IQ, the connected device, and internet-available tools. Windows PowerShell is beginning to look ideal. I'll post a script when I have one, probably after Thanksgiving weekend (US). 
 
Jerome
 

Sadly, I don't know much about technical stuff   but Palm's new OS is supposed to be very simple to work with as it is web oriented. Currently I have Google calendar sync w Palm Pre which works great. I also add errands, todo, etc to transport to Palm. i would assume this could also lead to android connection. Of course, does not address major transfer of data from IQ to phone but it could be a an easy bridge to tackle. Of course, those who run Win Mobile phones, i would think outlook connection would work somehow.  Don't know about Rimm
 
--
Jan Rifkinson
Ridgefield CT USA
HP Blackbird Vista Ultimate SP-2