deploying with an external app

Discussions about creating CAPI applications to run on Android devices
AriSilva
Posts: 457
Joined: July 22nd, 2016, 3:55 pm

deploying with an external app

Post by AriSilva » November 22nd, 2020, 5:00 pm

I have an application (.apk) that I call with an execsystem from inside csentry, thus, I put the .apk in the deploy, and it goes right to the tablet.
But I need to install this apk by hand in the tablet.
Is there a way to install it automatically?
Best
Ari

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

Re: deploying with an external app

Post by josh » November 22nd, 2020, 7:33 pm

I can't think of a way to do that from CSEntry. My guess is that Android would not you install an app without getting explicit permission from the user, otherwise that would be a pretty big security hole.

AriSilva
Posts: 457
Joined: July 22nd, 2016, 3:55 pm

Re: deploying with an external app

Post by AriSilva » November 23rd, 2020, 6:57 am

Well, that was my guess also.
Thanks
Best
Ari

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

Re: deploying with an external app

Post by josh » November 23rd, 2020, 8:09 am

You could try using

Code: Select all

execsystem("view:<full path to apk>")
. I have not tested it, but in theory it will launch the app installer. It will prompt the user if they want to install the apk file, so it will not be fully automatic but at least you won't have to browse to the file.

AriSilva
Posts: 457
Joined: July 22nd, 2016, 3:55 pm

Re: deploying with an external app

Post by AriSilva » November 23rd, 2020, 1:04 pm

OK, I´ll try it.
But then comes a second question, derived from the previous one:
If the execsystem(.apk) works, it it possible to integrate it into the downloading of the csentry application? (I do not know how, but...)
That is, when creating the deploy, it would have a feature to execute something after being installed in the tablets.
Or, I was thinking about executing it in he menu-control program, not every time, but only if a certain file existed in the directory.
This file would be deleted after the first execution, so, in fact, the installation process would be executed one (or every time a new version was downloaded to the tablets).
What do you think?
Best
Ari

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

Re: deploying with an external app

Post by josh » November 23rd, 2020, 3:44 pm

There is no way of running it as part of the deploy but I think your idea of launching it the first time the menu program is run should work. I would probably use loadsetting/savesetting rather than making it based on a file but either would work. That is assuming that the execsystem idea works.

AriSilva
Posts: 457
Joined: July 22nd, 2016, 3:55 pm

Re: deploying with an external app

Post by AriSilva » November 23rd, 2020, 4:16 pm

ok, I´ll give it a try and keep you posted.
I´m not sure the load/save setting scheme would work if I have to update the version installed.
The very first time is easy, but as soon as the setting is done, one way or the other, how do I unflag it in order to reinstall the app?
Best
Ari

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

Re: deploying with an external app

Post by josh » November 23rd, 2020, 5:34 pm

Just save the version number as the setting.

AriSilva
Posts: 457
Joined: July 22nd, 2016, 3:55 pm

Re: deploying with an external app

Post by AriSilva » November 26th, 2020, 4:33 pm

Yeah,
That would work in the real running, but not at the test phase, unless I create a new version every time I update it, which would be a pain.
Nevertheless, that you for the tip on running the installation of the apk, it is working perfectly, and saves us a lot of trouble trying to remember the interviewers that they have to reinstall the app.
Best
Ari

etuser
Posts: 27
Joined: September 3rd, 2019, 5:57 am

Re: deploying with an external app

Post by etuser » November 30th, 2020, 12:43 am

Dear Ari,

Can you share the batch program the work the .apk trick.

Many thanks,

Post Reply