android - Image could not be loaded on twitter -
i'm trying share image through twitter worked fine facebook twitter image not loaded! dont know why here code:
enter code here public void share(string nameapp) { try { list<intent> targetedshareintents = new arraylist<intent>(); intent share = new intent(android.content.intent.action_send); share.settype("image/jpg"); list<resolveinfo> resinfo = getpackagemanager().queryintentactivities(share, 0); if (!resinfo.isempty()) { (resolveinfo info : resinfo) { intent targetedshare = new intent(android.content.intent.action_send); targetedshare.settype("image/jpg"); // put here mime type if (info.activityinfo.packagename.tolowercase().contains(nameapp) || info.activityinfo.name.tolowercase().contains(nameapp)) { targetedshare.putextra(intent.extra_subject, "sample photo"); targetedshare.putextra(intent.extra_text,"this photo created me"); classglobal.selectedpagerurls = new string[classglobal.selectedalbum.album_thumbnail_images.size()]; //this path worked fine facebook sdk in twitter fine except image not loaded uri screenshoturi = uri.parse(classglobal.selectedpagerurls[currentitem]=classglobal.selectedalbum.album_thumbnail_images.get(currentitem).thumbnail_url); targetedshare.putextra(intent.extra_stream,screenshoturi); targetedshare.setpackage(info.activityinfo.packagename); targetedshareintents.add(targetedshare); } } intent chooserintent = intent.createchooser(targetedshareintents.remove(0), "select app share"); chooserintent.putextra(intent.extra_initial_intents, targetedshareintents.toarray(new parcelable[]{})); startactivity(chooserintent); } } catch(exception e) { log.v("vm","exception while sending image on" + nameapp + " "+ e.getmessage()); } }
any appreciated thank you
it seems bug on twitter app. same error when trying share image gallery twitter on nexus 4 android 4.3. weirdly enough, worked on 4.2.2 before ota upgraded today.
Comments
Post a Comment