0

I wanted to add a widget for a targeted app which is present in the device from my app to home screen programmatically.

Tried some things but not working

  • Do you have to pin the other app from your app in the widget? – Tippu Fisal Sheriff Nov 23 '22 at 10:58
  • I need to pin another app's widget from my app to homescreen @TippuFisalSheriff – Gauri Chaudhary Nov 23 '22 at 11:29
  • Can you give more clarity, You need to pin other apps or have to ping other app widget's data. – Tippu Fisal Sheriff Nov 23 '22 at 11:36
  • As different apps have some widgets defined for eg. in chrome we have : QuickActionSearchWidget. So is there a way to pin this widget from my app to homescreen. @TippuFisalSheriff – Gauri Chaudhary Nov 23 '22 at 12:12
  • Adding more for clarity : Is it possible to add another app's widget to homescreen from my app programmatically. @TippuFisalSheriff – Gauri Chaudhary Nov 25 '22 at 07:05
  • I think is not possible, do you have any approach to receive mobile apps widgets data ? – Tippu Fisal Sheriff Nov 25 '22 at 09:27
  • Yes we can get all the widgets which are installed on device by : appWidgetManager.installedProviders @TippuFisalSheriff – Gauri Chaudhary Nov 25 '22 at 11:36
  • Okay, can attach the document here, that you referred to get the details – Tippu Fisal Sheriff Nov 25 '22 at 12:19
  • I have referred these steps : [link](https://stackoverflow.com/questions/26847824/android-adding-widgets-to-app-programmatically-warning-message) but with this I am able to set the widgets on my app, not on Home screen. For Home screen we need to call requestPinAppWidget which is supported in Android O and above. With this requestPinAppWidget method I am able to set my app's widgets to home screen. But I want to set other app's widgets to home screen. Think I am missing here something – Gauri Chaudhary Nov 25 '22 at 13:03
  • Check with issue tracker, https://issuetracker.google.com/issues?q=requestPinAppWidget – Tippu Fisal Sheriff Nov 26 '22 at 14:15

0 Answers0