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

enter image description here

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
  • sharecompat used execute() start task... blocked until first task completed

the solutions either to:

  • use executeonexecutor() yourself, or
  • use plain thread, particularly if not need onpostexecute() or onprogressupdate() pieces of asynctask

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -