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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:15:17+00:00 2026-05-23T13:15:17+00:00

This is how I start the Tab Activity Intent i = new Intent(walk.me.TAB); startActivityForResult(i,

  • 0

This is how I start the Tab Activity

  Intent i = new Intent("walk.me.TAB");
        startActivityForResult(i, STATIC_RESULT);

Note: STATIC_RESULT=-1 or RESULT_OK;.

This is how I finish the Tab activity

((Button)viewItem.findViewById(R.id.gotherefav)).setOnTouchListener(new OnTouchListener(){

    @Override
    public boolean onTouch(View v, MotionEvent event) {

        if(ime!=null)
        {

        b.putString("ime",ime.toString());
        b.putIntArray("koordinati&kategorija", coordAndCat );

        b.putBoolean("klik", true);

        FinishWithResult(b);
        }
        return false;
    }});



public void FinishWithResult(Bundle b)
{
    Intent i = getIntent();
    i.putExtras(b);
    setResult(Activity.RESULT_OK, i);
     Log.i("in FINISH", "settig Activity Result");  
    finish();   
}

And here is my OnActivityResult implementation:

@Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          Log.i("in OnActivityResult", "Activity Result");  
          Toast.makeText(getBaseContext(), "DOJDE", Toast.LENGTH_LONG).show();
        super.onActivityResult(requestCode, resultCode, data);

          Log.i("in OnActivityResult", "Activity Result");
          if (requestCode == STATIC_RESULT) {
                 if (resultCode == RESULT_OK) {

           Toast.makeText(getBaseContext(), "DOJDE BUNDLE", Toast.LENGTH_LONG).show();
           Bundle preferenciOdTab = data.getExtras();
           if(preferenciOdTab !=null && preferenciOdTab.getBoolean("klik", true))
                  {
                    mapView = (MapView)findViewById(R.id.map);
                     isFavorite=preferenciOdTab.getBoolean("klik");
                  drawFavorite(preferenciOdTab.getString("ime"),preferenciOdTab.getIntArray("koordinati&kategorija"));
                  }
                 }}

Why is onActivityResult never called and directly goes to OnResume() regardless of the documentation garantees that OAR will be called before OR? What I’m doing wrong? I dont have stated in manifest xml

singleInstance

or

singleTask

for the Main activity.

  • 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-23T13:15:18+00:00Added an answer on May 23, 2026 at 1:15 pm

    You say STATIC_RESULT is -1?

    The requestCode has to be a positive integer.

    startActivityForResult()

    Parameters

    intent The intent to start.

    requestCode If >= 0, this code will be returned in onActivityResult() when the activity exits.

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

Sidebar

Related Questions

A TabActivity start other activity when i click on a tab, How to send
I'm trying to install apk programmatically by this code: Intent intent = new Intent(Intent.ACTION_VIEW);
I have an error when i use intent to start activity when i choose
Mi main activity is a TabActivity that launches an intent TabGroup activity, this tabGroup
I use a batch to launch my java application like this start /min java
I found this via google: http://www.mvps.org/access/api/api0008.htm '******************** Code Start ************************** ' This code was
Right now we just use something like this stopWatch.Start(); try { method(); } finally
I've got in an ASP.NET application this process : Start a connection Start a
I mean: Consider a VMWare Windows 2003 image. If I 1 - start this
/* I start with this: */ <Report> <prop1>4</prop1> <prop2>2255</prop2> <prop3>true</prop3> <prop4>false</prop4> <prop5>true</prop5> </Report> /*

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.