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

  • Home
  • SEARCH
  • 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 6251127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:33:20+00:00 2026-05-24T13:33:20+00:00

i created a little tabActivity application and like to run zxing and display the

  • 0

i created a little tabActivity application and like to run zxing and display the result without changing the tab using an ActivityGroup.
Everything works fine without the ActivityGroup.

And here’s some code of the my ScanActivity. If i “enable” the activityGroup i’ll never run into the onActivityResult…:

  class ScanButtonClickListener implements OnClickListener {
        @Override
        public void onClick(View v) {
            IntentIntegrator.initiateScan(BarcodeActivity.this);
        }
    }  

    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
           IntentResult scanResult = 
                IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
           Log.v("barcode", scanResult.getContents().toString());
   }

Here are parts of the manifest:

activity android:name=".barcode.BarcodeActivity"
 android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
 android:screenOrientation="portrait">
</activity>     
<activity android:name=".tabGroups.BarcodeTabGroupActivity"></activity> 

and the TabGroupActivity, which only launches the barcodeActivity for now:

public class BarcodeTabGroupActivity extends TabGroupActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        startChildActivity("BarcodeActivity", new Intent(this, BarcodeActivity.class));
    }
}

And a filtered log:

08-04 15:59:02.093: DEBUG/DecodeHandler(4477): Found barcode in 1 ms
08-04 15:59:02.144: DEBUG/CaptureActivityHandler(4477): Got decode succeeded message

08-04 15:59:03.792: DEBUG/CaptureActivityHandler(4477): Got return scan result message
android::CameraHardwareSec::stopPreview() : preview not running, doing nothing
08-04 15:59:03.941: INFO/WindowManager(109): Setting rotation to 0, animFlags=1
08-04 15:59:03.957: INFO/ActivityManager(109): Config changed: { scale=1.0
imsi=0/0 loc=en_US touch=3 keys=1/1/2 nav=1/1 orien=1 layout=34
uiMode=17 seq=72}

I think it must be something with the ActivityManager.. as soon as zxing ends, it returns showing the button and no result.

Any tips? thanks in advanced!!

  • 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-24T13:33:20+00:00Added an answer on May 24, 2026 at 1:33 pm

    Ok, i managed to solve this problem on my own.
    For everyone who’s interested in my solution, here it is:

    Instead of initiate the scan on the child activity “BarcodeActivity”, i refered it to the parent activity:

    class ScanButtonClickListener implements OnClickListener {
        @Override
        public void onClick(View v) {
                //get the parent activity
            TabGroupActivity parentActivity = (TabGroupActivity) getParent();
            IntentIntegrator.initiateScan(parentActivity);
        }
    }  
    

    And now it’s possible to access the result via onActivityResult within the parent BarcodeTabGroupActivity:

      @Override
      public void onActivityResult(int requestCode, int resultCode, Intent intent) {
        IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
        Log.v("barcode_tabgroup", scanResult.getContents().toString());
      }
    

    Within this onActivityResult i’m now able to start my next childActivity to process the scan results… don’t know if that’s good practice, but it works.

    I thought i have to finish the other child activity using

    BarcodeActivity childActivity = (BarcodeActivity) getCurrentActivity();
    childActivity.finish();
    

    but then it shoots down everything..

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

Sidebar

Related Questions

I recently started using JQuery and created a little slider to display logos of
I created a little web spider in Python which I'm using to collect URLs.
Hi I have created a little application to move some files around and put
I've just created a little app that programmatically compiles code using the C# Compiler,
I recently created a little Perl application that utilizes a few non-core modules that
I created a little Swing Application. Now I gave it to a friend to
I'm having problem with my application on iPhone 3GS. I've created a little game,
I need a little help.I'm using a ViewFlipper to change views in TabActivity but
I've created a little test line chart using D3, but since I am quite
I've created a little wpf test application which renders some random rectangles every 30

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.