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 6367735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:35:13+00:00 2026-05-25T00:35:13+00:00

I have an application, call App1. In my App1 I invoke Camera application. intent

  • 0

I have an application, call “App1”. In my App1 I invoke Camera application.

intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.android.camera","com.android.camera.Camera"));
startActivity(intent);

After that, I use FileObserver to listen whether user take a photo. When this happens I call

Context ctx = App1.this.getApplicationContext();
Intent j = new Intent(ctx, App1.class);
j.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
j.putExtra("type", 1);
startActivity(j);

It works, I mean it gets my application to front how I leave it, however I need to pass an integer, which is called “type”. I think, my application will call “onResume()” but how can I get that extra integer. This type of passing didn’t do anything in my application.

There’s Bundle savedInstanceState in onCreate method, but there is no such a thing in onResume method. So, I need your help to solve this problem. Thanks in advance.

  • 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-05-25T00:35:13+00:00Added an answer on May 25, 2026 at 12:35 am

    You need to override Activity.onNewIntent() method.

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        setIntent(intent);
    }
    

    After onNewIntent() is called, the normal onResume() lifecycle will follow. Alternatively, you can write your code in onNewIntent() itself.

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

Sidebar

Related Questions

I have an application, call it App1. It is mostly C#. I'm writing a
I have a Silverlight application in which I would like to call a WCF
I have an API call in my application where I am checking the time
I have coded some JavaScript to perform an ajax call in an asp.net application.
I'm working on an application where users have to make a call and type
I have 2 application: app1.exe & app2.exe. app1.exe is elevated and will launch app2.exe.
I have an application that I want to coerce a date value (call it
I have an application that needs to check whether there is an ongoing call
I have an application that sends messages to an external web service. I build
I have an application which really should be installed, but does work fine when

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.