External Dictionary

Discussions about creating CAPI applications to run on Android devices
Mutanen Lau
Posts: 22
Joined: November 8th, 2016, 10:48 am

External Dictionary

Postby Mutanen Lau » November 15th, 2017, 4:56 pm

I developed CAPI with two external dictionaries for the lookup files. i tested the application on my laptop it works perfectly well but when i deployed on the android device it does not give the expected result. for example a combination of valid ID that display the related record on my laptop does not find the record using same ID on the android device. is there any additional settings/configurations that i need to do. these are the files i copied into the android device: .PEN, .PFF, and the two lookup files for the external dictionaries all in same directory.

Reagrds

josh
Posts: 1633
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: External Dictionary

Postby josh » November 15th, 2017, 6:16 pm

Make sure that the file layout on Windows and on Android are EXACTLY the same. If your external dictionaries are in a different folder from the pff file on Windows then they need to be in the same relative folder on Android.

Mutanen Lau
Posts: 22
Joined: November 8th, 2016, 10:48 am

Re: External Dictionary

Postby Mutanen Lau » November 16th, 2017, 4:42 am

I maintained the same directory structure for both computer and android device

josh
Posts: 1633
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: External Dictionary

Postby josh » November 16th, 2017, 6:53 am

Do you have the same version of CSPro on both PC and Windows? Also make sure you republished your PEN and file can copied to the device to ensure that it is latest version.

Mutanen Lau
Posts: 22
Joined: November 8th, 2016, 10:48 am

Re: External Dictionary

Postby Mutanen Lau » November 17th, 2017, 3:55 am

Thank you josh.
Actually the problem is from the data set. i converted the data to .csdb using ExcelToCspro tools, the data is in the form of 002 01 007 as the ID(with zero fill) but on the android when i entered the ID is displayed as 2 1 7 (without zero fill) so the two IDs aren't the same. i was able to correct it.

Regards

maldana
Posts: 4
Joined: January 22nd, 2018, 7:01 pm

Re: External Dictionary

Postby maldana » January 22nd, 2018, 8:01 pm

I have encountered exactly the same issue as Mutanen. My data entry application with lookupfile logic compiles and runs perfectly in Windows but fails to match records in the lookupfile in the CAPI application. I suspect it is a problem with the dataitems layout in the external datafile and the capi datafile not matching. I would like to get more details from Mutanen on how exactly he was able to resolve his similar issue. I am not using zerofill in any of the datafiles. I am using CSPro 7.

josh
Posts: 1633
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: External Dictionary

Postby josh » January 23rd, 2018, 6:19 am

Most likely cause is that you have not copied the data file to the correct location on the Android device. It needs to be in the same relative location that it was on Windows.

maldana
Posts: 4
Joined: January 22nd, 2018, 7:01 pm

Re: External Dictionary

Postby maldana » January 23rd, 2018, 1:07 pm

Hello Josh,
Thanks for your reply. Are you referring to the external (lookup) data file or to the input data file, or to both? I thought that the data files were embedded in the capi application similar to the data dictionaries when it is published. I only copied the .pen and .pff files over to android. Sorry I am just a beginner user of the android app. I am not using the same folders in windows and android so I will need to rename the folders to match and copy the data files to android as you have suggested. Thanks.

josh
Posts: 1633
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: External Dictionary

Postby josh » January 23rd, 2018, 1:17 pm

The pen file does not contain the data files. It only contains the application logic, dictionary and forms. The data files are stored separately - both the main data files and the external data files.

maldana
Posts: 4
Joined: January 22nd, 2018, 7:01 pm

Re: External Dictionary

Postby maldana » January 24th, 2018, 10:48 am

Good news as the lookup file search now runs in android. Bad news. A part of the logic fails in android which compiled and runs perfectly in windows. I am a bit lossed on how to resolve this error. Is it possible to send you my csentry application for you to check the logic code?


Return to “Android”