uri - Disappearing Intent data -
so have uri in main activity set send intent using [intent_name].setdata(urivar); , time need extract uri in new activity using getintent().getdata() uri becomes null. pass uri's under several circumstances in app , reason 1 object ends null;
setting uri intent
//add gallery intent mediascanintent = new intent(intent.action_media_scanner_scan_file); mediascanintent.setdata(mmediauri); sendbroadcast(mediascanintent); } //sends uri recipients page intent recipientsintent = new intent(this, recipientsactivity.class); log.i(tag, mmediauri+ ""); recipientsintent.setdata(mmediauri);
i run line , logs necessary data there
log.i(tag, recipientsintent.getdata() + ""); startactivity(recipientsintent);
by time here data's gone. logically there should nothing erasing data right? i'm pulling hair out trying understand.
protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); requestwindowfeature(window.feature_indeterminate_progress); setcontentview(r.layout.activity_recipients); mmediauri = getintent().getdata();
Comments
Post a Comment