2

today I tested some app I'm developing with Berlin Upd. 2 on a Sony Z4 tablet with Android 7.

If I press the right Android navigation button a bit longer the device splits the screen 2 two areas and thus shows two apps simultaneously. Seems to be a feature of Android 7+.

Unfortunately my app doesn't like this and is being terminated or terminates itself.

I didn't find any setting on this Sony device to disable the split screen button function. I found some Android Manifest setting here:

How can I disable multiwindow mode for an Activity in Android N+

But every time I try to add this to the manifest template either for the entire app or for the activity (FMX apps only have one activity) and press F9 to test it on a device (in this case a Nexus 4 to ensure the setting doesn't have negative effects on older versions) I get a "pa client exited with code 1" failure. When I remove the line from the manifest template and press F9 everything works as it did before.

Any hints/advice?

I already searched for an app to disable the feature on the Z4, but we only found one for Galaxy S7 which had no effect on the Z4.

Community
  • 1
  • 1
Markus
  • 129
  • 1
  • 12
  • It seems like the responsible thing for you to do is to fix your program so it doesn't crash when your customers try to use legitimate features of their phones. – Rob Kennedy Mar 02 '17 at 22:04
  • I find your comment not too appropriate: a) mid to long term the app should support this, yes. But if something is to be demoed at a fixed date soon there might not be enough time to research the root cause and implement a fix. b) Read this one please: https://quality.embarcadero.com/browse/RSP-17001 It looks like FMX applications are not multi window compatible at all currently. A fix might be hard to do for an ordinary FMX developer – Markus Mar 04 '17 at 10:00

1 Answers1

4

The solution is (and the Android documentation doesn't clearly state this requirement for somebody not using Google's preferred language/toolset) to download SDK 24 and Build Tools 24.x in SDK manager. In Delphi Tools/SDK one needs to point to the android-24 folder instead of the android-22 one and then adding this attribute to the node no longer leads to build problems in Delphi and the app cannot be crashed by somebody trying to enter split screen mode.

Markus
  • 129
  • 1
  • 12