android - intentChooser returns odd requestCode -



android - intentChooser returns odd requestCode -

i trying grab response share chooser sends email attachment know when delete file sdcard.

the intentchooser called fragment

intent intent = new intent(intent.action_send); intent.settype("message/rfc822"); intent.putextra(intent.extra_email, new string[]{"email"}); intent.putextra(intent.extra_subject, "subject"); intent.putextra(intent.extra_text, "body"); uri uri = uri.fromfile(file); intent.putextra(intent.extra_stream, uri); startactivityforresult(intent.createchooser(intent, "send..."), consts.share_intent);

where share_intent public static final int share_intent = 2;

then in activity holds fragment, seek grab response via

@override public void onactivityresult(int requestcode, int resultcode, intent data) { if (requestcode == consts.share_intent) { if (resultcode == result_ok) { //do } if (resultcode == result_canceled) toast.maketext(this, "share cancelled", toast.length_short).show(); } }

then open share chooser , cancel touching outside it, not grab 4 requestcode, odd number 144563.

anyone gets ideas why happening?

as stated in reply http://stackoverflow.com/a/6147919/437039, accidentally deleted phone call super.onactivityresult(requestcode, resultcode, data).

anyone similar issue, check reply linked here.

android onactivityresult

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -