Android menu issue

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
prabhustat
Posts: 72
Joined: March 17th, 2012, 10:46 am

Android menu issue

Post by prabhustat »

Hi,

Using the android menu I am not able to execute the SHG application, the error message i am getting

A 1010 Application error: protected field ID out of range - value is NOTAPPL

& fatal error in entry engine

W

function op_SHG();

string pffFilename = pathname(Application) + "../SHG/SHG.pff";
if setfile(pffFile,pffFilename,create) = 0 then
errmsg("Failed to open file %s", pffFilename);
endif;
filewrite(pffFile,"[Run Information]");
filewrite(pffFile,"Version=CSPro 7.0");
filewrite(pffFile,"AppType=Entry");

filewrite(pffFile,"[DataEntryInit]");
filewrite(pffFile,"StartMode=Add");
filewrite(pffFile,"Fullscreen=Yes");
filewrite(pffFile,"LOCK=VERFY,STATS");
filewrite(pffFile,"Interactive=Ask");
filewrite(pffFile,"");
filewrite(pffFile,"[Files]");
filewrite(pffFile,"Application=" + pathname(Application) + "../SHG/SHG.ent");
tempTextSHG=concat("Application=" + pathname(Application) + "../DATA/SHG/","SHG",edit("99999",EGP), edit("999",intvcode), ".DAT");
filewrite(pffFile,"InputData=%-128s",strip(tempTextSHG));
filewrite(pffFile,"");
filewrite(pffFile,"[Parameters]");
FileWrite(pffFile, concat("Parameter=",strip(cmid)));
close(pffFile);

execpff(pffFilename, stop);
end;

will you please give me idea to resolve

Thanks in advance,

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

Re: Android menu issue

Post by josh »

The field ID is set as protected on your form and you are not filling in a value for it so it is blank (notappl). CSEntry expects you to fill in all protected with valid values through logic since they can't be entered by the interviewer. Either make the field unprotected or add logic to fill in a valid value for it.
prabhustat
Posts: 72
Joined: March 17th, 2012, 10:46 am

Re: Android menu issue

Post by prabhustat »

Thanks Josh for the quick response, I am using the same menu for windows and android. I have revised some changes for Android menu the problem i am facing not able to set the file name for the SHG application, i have enclosed application for your reference menu syntax in (Entry folder) will you please give idea on issue.

Thanks in advance.

P
Attachments
SUML.zip
(457.76 KiB) Downloaded 388 times
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Android menu issue

Post by josh »

Change the line:

tempTextSHG=concat("Application=" + pathname(Application) + "../DATA/SHG/","SHG",edit("99999",EGP), edit("999",intvcode), ".DAT");

to

tempTextSHG=concat(pathname(Application) + "../DATA/SHG/","SHG",edit("99999",EGP), edit("999",intvcode), ".DAT");

You don't wan't "Application=" in the name of the data file.

Also please stop using alpha variables in logic and set attributes assisted. Use strings and set the capture type on the form instead.
prabhustat
Posts: 72
Joined: March 17th, 2012, 10:46 am

Re: Android menu issue

Post by prabhustat »

Thanks Josh, I will try it. Yes want the application name in the data file.

Thanks,

P
shafique arif
Posts: 68
Joined: August 25th, 2013, 1:21 am

Re: Android menu issue

Post by shafique arif »

Dear Josh

I have been struggling with use of Menu in csentry 7. I am using same or similar menu commands as were used for previous version 6 or 6.3 and it was working fine. But I am having issue with its use now. It works fine with Window and my smart phone (SAMSUNG GALAXY S4) but I is creating problems in my Tablet SAMSAUNG S2. Let me try to explain the issue: I use menu to run two questionnares: One School questionnaire and other Teacher questionnaire. When I run School questionnaire it work fine in tablet however when I select teacher questionnaire from menu, it crashes. And when I open csentry again, it shows 'Teacher' along with 'menu'. 'Teacher' is name of dic used for teacher questionnaire. Can you please help me in this regard.
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Android menu issue

Post by josh »

Next time please start a new topic as your question is different from the one originally asked.

My guess is that the file layout on the tablet where it is not working is different from what it is on the other devices you have tested.
shafique arif
Posts: 68
Joined: August 25th, 2013, 1:21 am

Re: Android menu issue

Post by shafique arif »

Dear Josh

Thanks for swift reply. I synced all files from the same folder from ftp server on both devices. Files should be the same. However, when I download csentry from play store on phone it shows ver7.1.0 (beta) dated Aug 7, 2017 where as on tablet it shows ver 7.0.2 Jun 29, 2017. Should I sent you my menu application?

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

Re: Android menu issue

Post by josh »

Sure. Send it to cspro@lists.census.gov. Please include detailed steps to reproduce the problem.
Post Reply