deploying with an external app

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

deploying with an external app

Post by AriSilva »

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: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: deploying with an external app

Post by josh »

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: 591
Joined: July 22nd, 2016, 3:55 pm

Re: deploying with an external app

Post by AriSilva »

Well, that was my guess also.
Thanks
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: deploying with an external app

Post by josh »

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: 591
Joined: July 22nd, 2016, 3:55 pm

Re: deploying with an external app

Post by AriSilva »

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: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: deploying with an external app

Post by josh »

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: 591
Joined: July 22nd, 2016, 3:55 pm

Re: deploying with an external app

Post by AriSilva »

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: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: deploying with an external app

Post by josh »

Just save the version number as the setting.
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Re: deploying with an external app

Post by AriSilva »

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: 85
Joined: September 3rd, 2019, 5:57 am

Re: deploying with an external app

Post by etuser »

Dear Ari,

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

Many thanks,
Post Reply