Hi, I'm having some issue when running your sample code AppWidget on Redmi device. The AppWidgetPinnedReceiver is not work on every Redmi device. After add widget to home screen, there is no Toast shown up (when it should have a Toast with message "Widget pinned. Go to homescreen.". I think the problem is successCallback (at MainActivity, private fun AppWidgetProviderInfo.pin(context: Context)) is not call after requestPinAppWidget is run and pinned successfully.
Hi, I'm having some issue when running your sample code AppWidget on Redmi device. The
AppWidgetPinnedReceiver
is not work on every Redmi device. After add widget to home screen, there is no Toast shown up (when it should have a Toast with message"Widget pinned. Go to homescreen."
. I think the problem issuccessCallback
(atMainActivity
,private fun AppWidgetProviderInfo.pin(context: Context)
) is not call afterrequestPinAppWidget
is run and pinned successfully.