Android Question what SDK Manager Libraries for fold-ables

Robert Valentino

Well-Known Member
Licensed User
Longtime User
Trying to do some coding for Fold-ables and need to include these libraries

B4X:
import androidx.window.layout.DisplayFeature;
import androidx.window.layout.FoldingFeature;
import androidx.window.layout.WindowInfoTracker;
import androidx.window.layout.WindowLayoutInfo;

But in SDK Manager there are a lot of "androidx.window." options.

Which ones would I need to include to use these features?
 

wes58

Active Member
Licensed User
Longtime User
Trying to do some coding for Fold-ables and need to include these libraries

B4X:
import androidx.window.layout.DisplayFeature;
import androidx.window.layout.FoldingFeature;
import androidx.window.layout.WindowInfoTracker;
import androidx.window.layout.WindowLayoutInfo;

But in SDK Manager there are a lot of "androidx.window." options.

Which ones would I need to include to use these features?
Have you tried google search on "androidx.window.layout.FoldingFeature"?
You will get to this page https://developer.android.com/reference/androidx/window/layout/FoldingFeature and this https://developer.android.com/jetpack/androidx/releases/window
The Jetpack WindowManager library enables application developers to support new device form factors and multi-window environments. The initial release targets foldable devices, but future versions will extend to more display types and window features.
 
Upvote 0

Robert Valentino

Well-Known Member
Licensed User
Longtime User
1753628992400.png


Using B4X SDK Manager I added these libraries

Then added this line to my project (thinking I needed to include the androidx.window:window library)
B4X:
#additionalJar                    : androidx.window:window:1.4.0

Based on this google search:
1753629218057.png


But gives me error
1753629127470.png


So something is not right
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
if you're going to use #additionaljar, you have to download the
jar/aar from maven and put it in your add'l libraries folder. just saying
"#additionaljar" isn't enough. if the packages are in the sdk,
you wouldn't need "#additionaljar". if you're going to use it,
the compiler looks to the additional libraries folder for it.
(or wherever you keep your libraries). i would have tried
that before resorting to the sdk.

i think we need some guidance from our leader re:foldables.
when i looked at the sdk, there were a number of other related
files beside the ones you show. in addition, when i looked at
androidx.window:window:1.4.0.aar, it already contained
classes which appear in the sdk listing.

(sidebar: it is possible to extract the classes from packages
you add via the sdk and put them in the add'l libraries folder as
if you had downloaded them from maven, but it's the kind of thing
erel would have to say was ok in a given circumstance. i did see
a post by him concerning a specific case a little while back. i'm not
saying it applies in this case.)
 
Upvote 0
Top