Pergunta

Q. Android Appwidget not showing in launcher immediately after installation:-

What I have already tried and does not work consistently

  1. Included stub Activity with MAIN and LAUNCHER intent filter
  2. Included this code in onCreate() of this stub activity

    sendBroadcast(new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_HOME));
    

What works consistently

  1. Reboot
  2. Change orientation of device with widget list opened. This causes a refresh of the widget list and shows the newly installed widget.

So is there something I am missing ? It creates poor perception when user installs widget and does not find the widget in the widget list. Generally leads to uninstall :(

Foi útil?

Solução

This is an open issue for some devices and OS versions (mainly ICS it seems). What are you running? It should be the same issue which is, hopefully, soon fixed. I think the best option for you would be to inform your customers about this bug and that it is out of your hands. You should then also provide an easy way to fix it! An informed customer is less likely to have false expectations and uninstall your widget.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top