android - Intent.Action_Send and ShareCompat.IntentBuilder dialog is missing app icons -
i have following code starts intent send email message
@override public void onpostexecute(file outfile) { progressdialogrequesticons d1 = (progressdialogrequesticons) fm.findfragmentbytag("dialog_f2"); d1.dialogdismiss(); intent intent = new intent(intent.action_send); intent.settype("text/plain"); uri uri = uri.fromfile(outfile); intent.putextra(intent.extra_stream, uri); intent.putextra(intent.extra_email, new string[] { getstring(r.string.app_email) }); intent.putextra(intent.extra_subject, "icon support for" + " " + this.getresources().getstring(r.string.app_name)); intent.putextra(intent.extra_text, "i using " + build.device + " android version " + build.version.release); this.startactivity(intent.createchooser(intent, "send email..")); } however when dialog pops choose app send shows no icons liket this

so tried method follows still have same issue.
public void startemailintentwithpackage(file icon_request){ try{ sharecompat.intentbuilder.from(this) .settype("application/zip") .addstream(uri.parse("file://" + icon_request.getabsolutepath())) .addemailto(getstring(r.string.app_email)) .setsubject("icon support for" + " " + this.getresources().getstring(r.string.app_name)) .settext("i using " + build.device + " android version " + build.version.release) .setchoosertitle("send email..") .startchooser(); } catch (exception ignored) { } }
one of annoyances asynctask move serialized execution default, started in earnest in api level 13. gets worse when libraries use asynctask internally... , not use executeonexecutor() opt thread pool.
my guess that:
- you used
execute()start task sharecompatusedexecute()start task... blocked until first task completed
the solutions either to:
- use
executeonexecutor()yourself, or - use plain
thread, particularly if not needonpostexecute()oronprogressupdate()pieces ofasynctask
Comments
Post a Comment