AndroidX icon indicating copy to clipboard operation
AndroidX copied to clipboard

androidx.wear.protolayout:protolayout missing -material.

Open DevronB opened this issue 9 months ago • 21 comments

Android framework version

net8.0-android

Affected platform version

34

Description

Wear.Tiles.Material has been deprecated and replaced with androidx.wear.protolayout:protolayout-material, but this package in not bound. Can we please get androidx.wear.protolayout:protolayout-material added.

thank you

Steps to Reproduce

no package

Did you find any workaround?

no

Relevant log output


DevronB avatar Apr 05 '25 23:04 DevronB

Thanks for the feedback.

Most likely after nugets with net10.0 are published.

moljac avatar Apr 07 '25 12:04 moljac

you mean like end of year?

DevronB avatar Apr 07 '25 22:04 DevronB

you mean like end of year?

Nope. Why would it be end of the year? Releasing nuget packages has nothing to do with .NET release cycle.

moljac avatar Apr 10 '25 07:04 moljac

Ok, I misunderstand. What's the rough timing then? I'm trying work out if I should persist with the deprecated methods or wait. Cheers

DevronB avatar Apr 10 '25 07:04 DevronB

We alredy have nugets that have/carry both net8.0 (current) and net10.0 payloads (dlls), but need few more internal tests (MAUI) before releasing them into the wild.

So, it is matter of days or weeks (max, worst case)

moljac avatar Apr 10 '25 07:04 moljac

@moljac, any progress? ta

DevronB avatar May 30 '25 13:05 DevronB

@moljac, any progress? ta

I am sorry, but no. Some unplanned events occured.

There is PR - WIP:

https://github.com/dotnet/android-libraries/pull/1123

I am in process of returning hardware, getting new hardware, updating my CV and redume and searching for job.

I will do some updates over the summer and I might squeeze this in, but no promises.

moljac avatar May 30 '25 18:05 moljac

oh, sorry to hear that! Where does this leave the bindings, are you the only one?

What is the support model with these, is there no official MS support for these?

DevronB avatar Jun 01 '25 23:06 DevronB

oh, sorry to hear that! Where does this leave the bindings, are you the only one?

No. Team was reduced from 7 to 2.

What is the support model with these, is there no official MS support for these?

I know I will help our team members as community, but cannot guarantee cadence as it used to be. Regarding support - I have no idea. You will have to ask decision makers and they do not hang around.

moljac avatar Jun 02 '25 09:06 moljac

I guess AI is going to do all the work now 😒

DevronB avatar Jun 02 '25 12:06 DevronB

If you want a new package for androidx.wear.protolayout:protolayout-material, one way to fast track this work is to send a pull request for the feature.

Even if it doesn't build or isn't complete. A pull request would help us a lot towards a new package! Simply starting the work, and saying: I got this far, here is the error.

In regards to "support", most support policies are around security vulnerabilities, etc. These packages are certainly still maintained in that regard. Thanks!

jonathanpeppers avatar Jun 02 '25 13:06 jonathanpeppers

@jonathanpeppers , thanks for the feedback! I was thinking it might be time to roll the sleeves up :-) now to get my head around these bindings, is there some sort of guide/best practice on addressing binidng issues?

DevronB avatar Jun 02 '25 22:06 DevronB

These are the best docs we have at the moment:

  • https://learn.microsoft.com/en-us/dotnet/maui/migration/android-binding-projects
  • https://github.com/dotnet/android-libraries/blob/main/BUILDING.md

In general, this repo controls a lot of the binding process with this file:

https://github.com/dotnet/android-libraries/blob/2bc0d31cab1fb35507ead8ee3a6997377f975bb2/config.json#L11-L17

This .json file tells the build to look up a maven artifact, and it automatically generates a C# binding project.

This is would be different if you were making your own binding. They did it this way, so they could easily create 100s of NuGet packages.

jonathanpeppers avatar Jun 03 '25 01:06 jonathanpeppers

https://github.com/dotnet/android-libraries/pull/1172

@jonathanpeppers @moljac

DevronB avatar Jun 13 '25 02:06 DevronB

@moljac @jonathanpeppers @jpobst

Is there an official way, helper, example, recomendation on working with IContinuation?

Ideally this would become:

Task<string> GetGrantedPermissionAsync()
Image

DevronB avatar Jul 09 '25 03:07 DevronB

For now, you could consider adding Additions/YourClass.cs and add a partial class declaration.

You could probably use TaskCompletionSource to convert IContinuation to Task<T>.

There isn't any automatic feature that does this.

jonathanpeppers avatar Jul 09 '25 13:07 jonathanpeppers

@jonathanpeppers , thanks. Is this the first time this is required? i.e. There's no existing Addtions.cs to get an example from? I'm wondering if this is an edge case, or if this is something that will become normal over time, could it be addressed in the binding genetator?

DevronB avatar Jul 09 '25 22:07 DevronB

There are examples, such as:

  • source/org.jetbrains.kotlinx/kotlinx-serialization-core-jvm/Additions/KotlinX.Serialization.Builtins.InstantComponentSerializer.cs
  • https://github.com/dotnet/android-libraries/commit/ce00052ffd78f514f952513c533532c1a550d3d0

The folder is discovered automatically by convention.

You could file an issue here with a design proposal for bindings:

  • https://github.com/dotnet/java-interop/issues

jonathanpeppers avatar Jul 10 '25 20:07 jonathanpeppers

@jonathanpeppers, thank you for your responses. Another question please, maybe I move this to quesitons but...

how do I do this in config.json? I have this binding working in a local binding project but having trouble porting a PR here.

I tried "dependencyOnly": true, but it seemed to still want to generate binding?

Image

DevronB avatar Jul 12 '25 07:07 DevronB

What is the error you are getting?

"dependencyOnly": true will still generate a C# project & NuGet package that includes the .aar, but it should be using Bind="false".

That means you get the Java/Kotlin code and just can't call the APIs from C#.

jonathanpeppers avatar Jul 14 '25 14:07 jonathanpeppers

Ahh okay,i didnt think the c# bindings were generated if bind=false in my local project, and I seemed to getting different/more binding errors using config.json. I'll have another crack now you've clarified.

DevronB avatar Jul 15 '25 07:07 DevronB