java - Sending string to Activity and then to a Fragment of Activity -
i having trouble simple app. app starts in mainactivity can press camera icon. opens implicit intent taking photo. when photo taken, activity displayimageactivity opened. activity consists of 2 fragments: 1 holds imageview displaying photo , 1 holds textviews displays information photo (filename, size, location etc.). use viewpager having horizontal swipe capabilities. now problem. should note not consistent problem. app crashes, works fine. problem lies in getting image path onactivityresult in mainactivity 2 fragments can image , info. here onactivityresult method: @override protected void onactivityresult(int requestcode, int resultcode, intent data) { super.onactivityresult(requestcode, resultcode, data); if (requestcode == 42 && resultcode == result_ok) { log.d(tag, "mainactivity onactivityresult method called."); intent intentshowpicture = new intent(this, displayimageactivity.class); intentshowpicture.putextra(picture_