Problemas Csentry 7.6.2 y android 11

Discussions about creating CAPI applications to run on Android devices
Forum rules
New release: CSPro 8.0
Post Reply
jodapecol
Posts: 9
Joined: August 25th, 2017, 9:56 am

Problemas Csentry 7.6.2 y android 11

Post by jodapecol »

Good Cspro Team.
We are using Csentry 7.6.2 with android 11 (samsung), and the option to call third-party applications is not working
using: "ExecSystem" or "SystemApp Object".

What we are implementing is calling the maps.me application from our Csentry application.

Due to this inconvenience during the past week we began to test the Csentry 7.6.2 in all versions of android in the office android 4.4, 5, 6, 7.1.1, 7.1.2, 8, 9 and 10; everything works very well.

And we realize that the problem is only occurring with version 11 of android.
Any suggestions to fix, or does it have something to do with android 11 security restrictions.

We need help to solve this problem.
From already thank you very much.
Pd: Excuse me, I use the google translator to write to you in English.
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Problemas Csentry 7.6.2 y android 11

Post by Gregory Martin »

Thanks for reporting this problem. This indeed is an issue due to a change that Google made for Android 11. You can read about it here:

https://medium.com/androiddevelopers/pa ... 857f221cd9

We fixed the issue, at least temporarily, and updated the version of CSEntry in Google Play yesterday. If you get the update and SystemApp still does not work, please let us know.
karina
Posts: 2
Joined: September 20th, 2021, 4:58 am

Re: Problemas Csentry 7.6.2 y android 11

Post by karina »

Hello CsPro Team,

May I also inquire about a similar problem we encountered with the use of cs entry in android 11 tablets? We developed an enumerator's application that creates a pff file for our csentry CAPI app. Creating these files inside the CSentry folder worked just fine with android 10 and lower version. But with android 11, this is no longer possible. Our application can no longer read files inside cs entry folder as well. We tried the solution you provided for this issue but it's not working for us.

Is there a way we can get around this issue? Is there a folder to which our app could create a file to, and to which csentry app could also read from?

Thank you in advance for your help.

Best,
Karen
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Problemas Csentry 7.6.2 y android 11

Post by Gregory Martin »

Unfortunately these security restrictions make it much harder to share data between applications. However, if the only thing you need to do is launch a PFF, then take a look at this:

https://github.com/CSProDevelopment/CSE ... lback-demo

You can launch CSEntry with the name of your PFF. The problem is that the PFF must already exist in the csentry directory since you cannot write to that directory. That means that you can't modify the PFF file directly, but you'll see in that example that you can set attributes from your application:
To pass additional parameters that will get added to the PFF, add them as extras. For example, to set the operator ID and the case key:

intent.putExtra("OperatorID", "John Doe");
intent.putExtra("Key", "01050669557");
You can use the base PFF and then override any options you need to by setting/overriding them via the Intent extras.
karina
Posts: 2
Joined: September 20th, 2021, 4:58 am

Re: Problemas Csentry 7.6.2 y android 11

Post by karina »

Dear Sherell and Gregory,

Thank you so much for the prompt reply to my inquiry. We will try to re-download the CsPro from the play store to ensure that we had the latest version, and try the sample you provided. Will provide you with feedback soon.

Best,
Karen
ywidyatama
Posts: 1
Joined: November 25th, 2021, 5:36 pm

Re: Problemas Csentry 7.6.2 y android 11

Post by ywidyatama »

Hello CsPro Team,

Our team currently have similar issues, where calling SystemApp in Android 11, the system behaves differently than Android 6. There is no error but the external activity doesn't get activated at all. We downloaded the app ini 8th Nov 2021, so I think it should be the latest version (the Google Play page shows last update in 14th Sep 2021).
The issue is seems that we are unable to get result from resolveActivity since Android 11 security changes. Android documentation states that we should still be able to startActivity regardless of package visibility changes (see https://developer.android.com/training/ ... /use-cases and https://medium.com/androiddevelopers/pa ... 857f221cd9 ), but it seems CSEntry doing resolveActivity before calling the startActivity, while resolveActivity get affected by the package visibility changes. I read that some people fixed this issue by doing this :
changing
if (intent.resolveActivity(packageManager) != null)
startActivity(intent);
into
try {
startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(getContext(), getString(R.string.error), Toast.LENGTH_SHORT).show();
}

Thus, removing the need of doing resolveActivity.
ref : https://stackoverflow.com/a/65823629/539286)

Or, as an alternative, if google still permit us to do this, add queries tag to the manifest :
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
</intent>
</queries>
ref : https://stackoverflow.com/a/66526046/539286

Could someone check these out ? Thank you..
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Problemas Csentry 7.6.2 y android 11

Post by sherrell »

Sorry for the delay, but Thursday Nov 25th is a big holiday in the States (Thanksgiving), and most people take off the Friday after as well.

There are numerous issues that have arisen with the introduction of Android 11 (and likely more, with Android 12!). This is a compatibility issue that will be corrected for our 7.7 release (there is a beta release out now, but this does NOT have the update in it).

Thanks for your patience.

Sherrell
Post Reply