executing an apk on android 13

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

executing an apk on android 13

Post by AriSilva »

Hi folks,
Again, me and my "diferences" with the new android.
The following command was executing pretty well in the old androids.
ret = execsystem("app:com.softjads.jorge.meurecordatorio");
But now, with the new one, it does not execute.
I´ve tried it with two tablets I have, an old one with android 5.5 and the new one with android 13.
The new one does not call the app.
Is there another way to call another applications?
Best
Ari
Best
Ari
AriSilva
Posts: 589
Joined: July 22nd, 2016, 3:55 pm

Re: executing an apk on android 13

Post by AriSilva »

Thanks for your answer, but I´m not sure I understood it, when you mention "package name" and "explicit intent".
Could you give me an example of an explicit intent?
I´ve made a short program calling several apps, including the ones in the CsPro help. Almost all of them work but for the first one calling GMail, as in
ret = execsystem("app:com.google.android.gm"); // open Gmail
I even tried calling csentry ("app:gov.census.cspro.csentry") and it did not work.
And the applications I need to call start with the prefix "app:".
Is there a problem using this prefix?
I really need an answer for that since I´m going to the field with a survey ASAP (I am already late for that).
Best
Ari
Best
Ari
Gregory Martin
Posts: 1762
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: executing an apk on android 13

Post by Gregory Martin »

Versions of CSEntry that are put into Google Play are no longer able to query for other applications, which is what we need to do to launch, say, com.softjads.jorge.meurecordatorio. This is a change Google made in 2022. We tried to get an exception to this, as we don't know what people will want to launch from CSEntry, but Google turned us down. The workaround is that you have to use a version of CSEntry that supports this querying. We have these versions here: https://www.csprousers.org/apk/

Unfortunately, installing that means that you have to sideload CSEntry and can't install it (and get automatic updates) directly from Google Play.

If you are creating your own application and can set up an Android deep link, it will be possible in CSPro 8.0 to open the application using the deep link, even from the version of CSEntry that is in Google Play. See more about deep links here: https://developer.android.com/training/ ... ep-linking

See attached for two help documents, from the pending 8.0, related to this.
Attachments
android-helps.zip
(6.06 KiB) Downloaded 1125 times
AriSilva
Posts: 589
Joined: July 22nd, 2016, 3:55 pm

Re: executing an apk on android 13

Post by AriSilva »

Thanks very much, Greg,
I really appreciate that.
I will try this old version, and see what happens when 8.0 is available.
Best
Ari
Best
Ari
AriSilva
Posts: 589
Joined: July 22nd, 2016, 3:55 pm

Re: executing an apk on android 13

Post by AriSilva »

Apparently it worked, using the old 7.7.3 version.
In any case, I´ll be doing more extensive tests and see what will going to happen.
Thanks again
Best
Ari
Best
Ari
AriSilva
Posts: 589
Joined: July 22nd, 2016, 3:55 pm

Re: executing an apk on android 13

Post by AriSilva »

Continuing the "saga":
Now, the problem seems to be that I cannot delete a file in the Download folder.
I´ve tried all combinations of pathname(Downloads) + ...
Nothings works. The
ret = filedelete(...);
always returns DEFAULT.
Is there a way to overcome that?
Best
Ari
AriSilva
Posts: 589
Joined: July 22nd, 2016, 3:55 pm

Re: executing an apk on android 13

Post by AriSilva »

By the way, I´m using this version 7.7.3 that you´ve made available for me in the previous messages.
Best
Ari
Gregory Martin
Posts: 1762
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: executing an apk on android 13

Post by Gregory Martin »

Files in the Downloads directory that aren't created by CSEntry won't be able to be deleted, as Android keeps track of who "owns" the file. I'm assuming that you're trying to delete a file that the other application created?

Files that CSEntry creates itself in that directory can probably be deleted, but I haven't tested that.
AriSilva
Posts: 589
Joined: July 22nd, 2016, 3:55 pm

Re: executing an apk on android 13

Post by AriSilva »

Yeah, the file we are trying to delete were created by the third party we are calling from our csentry application, and we have to delete it to start from scratch every time we call them. We could also ask them to delete the file before starting to write on them, this is a possibility we did not try, because even if we would be able to call them and execute its application, after they finished it (it is an app that records the food the children are taking, by type, period, brand, measures, etc), finally we could not read the file created by them, and import it into our questionnaire, as we have done in the past.
So, to make things short, our next try (plan C) is to use the memory card to interchange data. I´ve made a small csentry program to test that, and it is possible to write, read, and delete files there, but we still need to ask them to change the interchanging place from download to memory card (our Checkpoint Charlie).
I´ll keep you posted.
Thank you again
Best
Ari
Post Reply