question

saad-bin-iqbal avatar image
saad-bin-iqbal asked Jacob Abrams commented

Platform.isCloverFlex() not giving correct value.

My application runs on Clover Mini, Clover Station and Clover Mobile and we change our app layout considering Clover device type using Clover SDK methods(Platform.isCloverMini(), Platform.isCloverMobile() and so on ) . Now I'm gonna support my app to run on Clover Flex but Platform.isCloverFlex() methods not giving correct value so I'm not able to set the layout for Flex screen.
Clover Flex
1 comment
10 |2000

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

Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

I recommend not using com.clover.sdk.util.Platform class to control layout appearance. You should use standard Android APIs whenever possible. Please see the article https://developer.android.com/training/multiscreen...

0 Likes 0 ·

1 Answer

Jacob Abrams avatar image
Jacob Abrams answered Jacob Abrams commented
Please see my comment regarding layout control. With regards to why Platform.isCloverFlex() is not working it is still a good idea to try to root cause that problem as it should be working. Can you run the following command on your flex:

adb shell getprop | grep model
Also can you tell us which version of clover-android-sdk you are using, check your build.gradle files to see. If you are using release 152.9 or older it likely won't detect your device correctly and you should upgrade to a more recent version.
2 comments
10 |2000

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

saad-bin-iqbal avatar image saad-bin-iqbal commented ·

Thanks for your response.

Actually Platform.isCloverFlex() is working on real clover Flex device but not on Genymotion Emulator even I've set up emulator following clover developer setup recommendations.

0 Likes 0 ·
Jacob Abrams avatar image Jacob Abrams ♦♦ commented ·

I see, yes the com.clover.sdk.util.Platform methods will not work on emulators.

0 Likes 0 ·

Welcome to the
Clover Developer Community