Android Question Use androidx aar with JavaObject?

agraham

Expert
Licensed User
Longtime User
I want to play with an androidx component, androidx.window
I've installed it using SDK Manager and it is there in
extras\b4a_remote\androidx\window\1.0.0-alpha09\window-1.0.0-alpha09.aar
and referenced in extras\b4a_remote\installed-components.txt as
androidx.window\:window=1.0.0-alpha09

Owing to my utter ignorance of all things androidx I can't work out if it is possible to reference it using JavaObject. I would like to start with something simple like
B4X:
    Dim jo As JavaObject
    Dim t, b, l, r As Int
    t = 10
    b = 0
    l = 0
    r = 100
    jo.InitializeNewInstance("androidx.window.Bounds", Array As Object(l,t,r,b))
    Log(jo.RunMethod("getTop", Null))
But at runtime I get
java.lang.ClassNotFoundException: androidx$window$Bounds
and I can't work out how to reference it or if I need to do something to include it in the apk. What stupidity am I suffering from?
 

DonManfred

Expert
Licensed User
Longtime User
Did you reference it with #additionaljar?
Tried
#additionaljar: androidx.window:window
?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top