Matheus,
--
Carlos Eduardo Simões Pelegrin
-- Testou em outros dispositivos?
eu usava esse código para gerar atalho:
public void createShortcut(){
Intent shortcut = new Intent(
"com.android.launcher.action.INSTALL_SHORTCUT");
// Shortcut name
shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME, getResources().getString(R.string.app_name));
shortcut.putExtra("duplicate", false); // Just create once
// Setup activity shoud be shortcut object
ComponentName component = new ComponentName(getPackageName(), getClass().getName());
shortcut.putExtra(Intent.EXTRA_SHORTCUT_INTENT, new Intent(
Intent.ACTION_MAIN).setComponent(component));
// Set shortcut icon
ShortcutIconResource iconResource = Intent.ShortcutIconResource .fromContext(context,R.drawable.ic_launcher);
shortcut.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconResource);
context.sendBroadcast(shortcut);
}
Na maioria das vezes funcionava... na maioria, porque tinha celulares que criava 2, 3, 4, 5 ícones hahahahha
Avisa se ajudei.
Att.
--
Carlos Eduardo Simões Pelegrin
Em 14 de agosto de 2015 09:37, Maicon Strey <mstrey@gmail.com> escreveu:
O google play só faz o qur o usuario pede. So vai adicionar o ícone se o usuário ativamente selecionou essa opção nas configurações. Se for isso mesmo, basta desativar novamente essa opção nas configurações.
--On Fri, Aug 14, 2015, 09:12 Matheus Henrique da Silva <matheustargaryen@gmail.com> wrote:Não, apenas uma activity tem intent filter que é a main.--
Fiz uma pesquisa rápida e estou desconfiado que o Google Play (burramente) adiciona automaticamente um atalho na home, e não há nenhum mecanismo para identificar quando um desenvolvedor também faz isso, o que acarreta o lançamento de 2 atalhos, um do meu onCreate() e outro automatico do Google Play...
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.






0 comentários:
Postar um comentário