cuongtd

    cuongtd

    1 year ago
    is it possible to create app widget in jetpack compose project now?
    Adam Powell

    Adam Powell

    1 year ago
    "possible" in that you can write your own
    Applier
    and primitives that use
    ComposeNode
    to assemble a
    RemoteViews
    for the appwidget system using only public API from compose-runtime, yes, but there's quite a bit of work there
    cuongtd

    cuongtd

    1 year ago
    @Adam Powell okay, thank you, it sounds not a solution for beginner like me
    Adam Powell

    Adam Powell

    1 year ago
    If you'd like a weekend hack project for fun and to learn how compose works internally, and you already have a good grasp of RemoteViews, it's more approachable than you might think. If you're on a time budget, maybe not 🙂
    The compose team did a hack week project of exactly this about a year and a half ago but targeting notifications rather than appwidgets; it works but there are plenty of edge cases and API design questions to consider around it. It's definitely jumping into the deep end of the pool
    cuongtd

    cuongtd

    1 year ago
    @Adam Powell I have a lot of spare time now, but I don’t have much knowledge of xml, activity. I just made some basic apps with jetpack compose