onactivityresult

onActivityResult() is not called when startActivityResult() is called from Child Fragment in ViewPager

坚强是说给别人听的谎言 提交于 2020-01-06 08:27:07
问题 I have read through the related posts. In every quaestion I see that onActivityResult() of activity gets called at least..the problem is how to carry the result to the fragments or nested fragments. But issue I am facing is different. I am implementing Settings page that will have tabs with TabLayout from new Design Support library. In my app I have a single Activity which holds other Fragments...so I added a SettingsTabFragment which has ViewPager and a FragmentPagerAdapter to it.This

onActivityResult NOT called in MainActivity from previous Activity

我是研究僧i 提交于 2020-01-06 06:39:07
问题 I know this is a basic question and I have seen multiple answers on it in stackoverflow but I seem to be stuck still. The onActivityResult is just not being called. Here is my code: 1> In MainActivity I have onActivityResult public class MainActivity extends AppCompatActivity implements MasterListFragment.OnImageClickListener { @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); Log.v(LOG

onActivityResult NOT called in MainActivity from previous Activity

久未见 提交于 2020-01-06 06:36:32
问题 I know this is a basic question and I have seen multiple answers on it in stackoverflow but I seem to be stuck still. The onActivityResult is just not being called. Here is my code: 1> In MainActivity I have onActivityResult public class MainActivity extends AppCompatActivity implements MasterListFragment.OnImageClickListener { @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); Log.v(LOG

Cannot control Progressbar visibility from onActivityResult in Fragment

試著忘記壹切 提交于 2020-01-05 04:40:36
问题 I have a Fragment which contains a Progressbar. I retrieve it in onCreateView() method where setVisibility() works fine. Now, when I try to set visibility of the same progressbar (declared in fragment at class level) inside onActivityResult() nothing happens. Here is the code. @Override public void onActivityResult(int requestCode, int resultCode, Intent data){ if(requestCode == REQUEST_CODE_PROFILE_VIDEO_PATH){ if(resultCode == Activity.RESULT_OK) { String profileVideoPath = data.getExtras()

How to get data onActivityResult from external App Activity using seResult or startActivityForResult

放肆的年华 提交于 2020-01-04 07:01:29
问题 I have two application separately.Client and Seller App. I want to pay money for client app and get response to seller app. Anyway,i have deep linking concept enabled in seller app. Client App : It has three Activity Page inside client app.getting details(first activity page) and show confirmation(second activity) and payment is third Activity. Note:Open Client App using Seller App, fill all details and payment from client app and send response to Seller App. for this client side i have set

ZXING intent request code (identifying my intent)

╄→尐↘猪︶ㄣ 提交于 2020-01-03 17:13:57
问题 In my Android APP, whenever I need to call many different ActivitiesForResult from the same Activity, I do it like this: public void firstMethod() { int requestCode = 1; Intent intent = new Intent(SomeCode1.class); startActivityForResult(intent,requestCode); } public void secondMethod() { int requestCode = 2; Intent intent = new Intent(SomeCode2.class); startActivityForResult(intent,requestCode); } And to know which intent it came from, I recognize them like this: public void onActivityResult

ImageView will not load via setImageURI when ran on Samsung Galaxy S4 Only

跟風遠走 提交于 2020-01-02 08:59:09
问题 I've had a specific issue when running some basic code on a Samsung Galaxy S4 (model: GT-I9500). I was implementing a image picker via the camera or gallery, and could not for the life of me figure out why the ImageView was blank when calling - imageView.setImageURI(uri); It wasn't until I ran the exact same code in the emulator (and then a Nexus 5) that I found that this was a Samsung S4 issue. Full sample project can be found on Github & ready to run Code I used was taken from this SO post:

Wrong requestCode returned onActivityResult from another Activity

ぐ巨炮叔叔 提交于 2020-01-01 07:30:06
问题 I have an Activity that calls another Activity , that calls some other Activities . I send to the last Activity to get a result, and then i send back the result to the fist Activity . The flow is somthing like A -> B -> C -> D -> C -> B -> A With the flow from A to D is made of startActivityForResult and the flow from D to A is made of onActivityResult . From D to B the requestCode is always the same (the one I decided), but from B to A it suddenly change from my value to a random value (in

OnActivityResult not getting called in Fragment where intent pass from adapter class

眉间皱痕 提交于 2019-12-29 02:11:06
问题 So in my adapter class, I would like to allow user to capture image fun dispatchTakePictureIntent() { try { val captureIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE); (context as Activity).startActivityForResult(captureIntent, 1) } catch (e: ActivityNotFoundException) { e.printStackTrace() } } fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent) { Log.d("MyAdapter", "onActivityResult") } I want the onActivityResult in a fragment class get called, but it doesn't. override

Ucrop onActivityMethod not working

泪湿孤枕 提交于 2019-12-25 08:28:12
问题 I used below code from ucrop library and crop window is showing up. Uri destinationUri = Uri.fromFile(new File(myContext.getCacheDir(), "IMG_" + System.currentTimeMillis())); UCrop.of(sourceUri, destinationUri) .withMaxResultSize(maxWidth, maxHeight) .start(myContext); but, control is not going inside onActivityResult method. If/Else both not working. @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == RESULT_OK && requestCode == UCrop