Android widget not showing up on the list after developed

后端 未结 8 720
渐次进展
渐次进展 2021-01-01 12:41

I\'m upgrading my app with widget. It\'s not the first widget I\'ve done. I was always encountering weird issues, but the widget was shwoing up on the list eventually.

相关标签:
8条回答
  • 2021-01-01 13:19

    In my case, the issue was in the intent-filter within the receiver.

    Wrong:

    <intent-filter>
        <action android:name="APPWIDGET_UPDATE" />
    </intent-filter>
    

    Correct:

    <intent-filter>
        <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
    </intent-filter>
    
    0 讨论(0)
  • 2021-01-01 13:20

    This kind of issue can happen with 2 scenarios. Both are answered above and this is a complete answer and I have faced both the scenarios and resolved both of them.

    Scenario1

    If the application specifies android:installLocation="preferExternal" parameter in manifest, App will be installed in external memory and it will not show in the widget list. Also if you have made your phone to install all the apps on sd card, this will also happen.

    solution

    Go to Settings->Apps->YourApp Then "move to phone". This will move the app to your phone memory and now you can see the widget in your widget list

    Scenario2

    If the above fix did not solve your issue, then you may have a device with android 4.X.X version.

    Then you have to set at least following parameters in widget_info.xml file

    solution2

    android:minHeight="XXXdp" android:minWidth="XXXdp"

    0 讨论(0)
提交回复
热议问题