question

Dan avatar image
Dan asked David Marginian commented

App switches blocked when starting Intent error

Hello,

Is there any detail on this:

android.app.Instrumentation.checkStartActivityResultInstrumentation.java, line 1796
java.lang.IllegalStateException: App switches blocked when starting Intent{ my intent }


We are trialling a native Android app and have quite a few instances of it. The app launches an activity during a payment broadcast. I would love to know what prevents "app switches" and if there was anything we could do to mitigate it? There is only one other question on this which is unanswered.

Clover Android SDKIntents
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
David Marginian avatar image
David Marginian answered David Marginian commented

At a high level app switches are a mechanism in our OS that allows an application to prevent other applications from coming into the foreground (over top of it). So, for example, if the Secure Payment application is running (payment flow is active) and it blocks app switches then you will not be able to launch your activity until the Secure Payments application is no longer running. The bottom-line is that you are doing something that we don't allow. It is a bit unclear to me why this issue wasn't caught during testing.

6 comments
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Thanks David I followed up to this with an email with more detail. I didn't realize when I posted this but semi-integrated environments are the issue here, in fact the app in question is fine on a stand alone or tethered Mini, but it looks like app switches is more restrictive when connected to a 3rd party POS

0 Likes 0 ·
Can you explain your semi-integrated environment a bit more? Is it a remote integration or a native integration?
1 Like 1 ·
Dan avatar image Dan David Marginian ♦♦ ·
It's a little difficult to explain because I've only got 2nd hand info but I believe we're looking at an "EPos Now" point of sale connected via USB to a Mini for card payments. I suppose I'm trying to ascertain whether it's even technically possible to open an app in that situation (post card payment) and how it might be done, before we source one of these POSs
0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community