How can I get to know if there's enough space left for a widget to be pinned on current launcher?

81 views
Skip to first unread message

李嘉琪

unread,
Sep 30, 2020, 11:50:14 AM9/30/20
to android-platform
Apps had been allowed to request to pin an app widget on the current launcher since API level 26. As developers, this gave us a chance to make such request in our own Apps. However, the document says "When a request is denied by the user, the caller app will NOT get any response." Sometimes when there isn't enough room for a widget on the current launcher, the caller app will NOT get any response either.
How to differentiate between these two scenarios? Is there any callback function I can use? Is there any way I can get how much space left on the current launcher?
Reply all
Reply to author
Forward
0 new messages