Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9043493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:44:39+00:00 2026-06-16T10:44:39+00:00

I have two activities, Activity A has a button Load image which should let

  • 0

I have two activities, Activity A has a button “Load image” which should let the user select an image, but I want to process the chosen image on an other activity B.

I think this is a common scenario, how should I handle the activity flow??

This is what I came so far(which I don’t like)

Activity A–> Gallery –> Activity A –> Activity B

Activity A’s onActivityResult() only gets the URI and starts Activity B, so It kind of a waste to recreate the activity just to execute 5 lines and be destroyed (insn’t it?). I would like something cleaner or more direct. This is just an example, anything is welcome:

Activity A--> Gallery --> Activity B

EDIT

What about this?

 Activity A--> Activity B--> Gallery--> Activity B

Is it a better approach or is it the same thing? I mean, will i gain something (performance, cleanness).

EDIT 2

As @Gaurav said, a workaround option would be to use 2 layouts instead of 2 activities thus no need to directly deal with my problem. I must say this should do for me as activity A is very thin. But for the sake of knowledge, i will welcome a “direct” answer to my question.

EDIT 3

Finally, having both layouts in the same activity didn’t work (though it was a very attractive solution). My Activity B is based on libgdx (opengl), and i’m getting some nasty deadlocks when onDrawFrame is not called. So to avoid future untraceable bugs of this kind, I’ll separate my activities. I’m going for Edit-1 solution, any comments would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:44:40+00:00Added an answer on June 16, 2026 at 10:44 am

    I think there is no other way than to call Activity B in the onActivityResult of A.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application which has two Activities, let's call them A and B.
I have two activities or screens. The second activity has an AlertDialogBox with radiobuttons
I have an Android application that contains two Activities . Activity A has a
I have two activities. One activity has the main game and the other activity
I have two activities A and B . Activity A has a form and
I have two activities in an android application, each has a button that goes
I'm writing an application which will have two Activities, when the user presses the
I have two Activities, both have an inner class SurfaceView, which has an inner
I have two activities. In first I come to the second activity from first
This is my situation. I have two activities: ONE and TWO. In TWO activity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.