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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:28:06+00:00 2026-05-27T05:28:06+00:00

Intent i= new Intent( SetTest.this, SetTest.this);// compile error there i.putExtra(question_number, questionNumber++); startActivity(i); I want

  • 0
Intent i= new Intent( SetTest.this, SetTest.this);// compile error there
i.putExtra("question_number", questionNumber++);
startActivity(i);

I want to post the data to the same activity.. . Here is my intent filter in the mainfest file:

      <activity android:name="SetTest">
         <intent-filter android:label="@string/setQuestion">
                 <action android:name="android.intent.action.VIEW" />
                 <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>

I dont understand why do I get the compile error?!?

I get compile error, with this too:

 Context context=getApplicationContext();

Intent i= new Intent(context, SetTest.this);

  • 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-27T05:28:06+00:00Added an answer on May 27, 2026 at 5:28 am

    AS the other answers say :

    Intent i= new Intent( SetTest.this, SetTest.Class);
    i.putExtra("question_number", questionNumber++);
    startActivity(i);
    finish();
    

    As you’re loading the same activity, you might want finish your current activity to avoid problem in your navigation tree

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

Sidebar

Related Questions

Intent intent = new Intent(this,Name.class); intent.putExtra(key, et.getText().toString()); startActivity(intent); Intent intent = getIntent(); String str
For example Intent intent = new Intent(this, SecondActivity.class); eclipse error: The method setClass(Context, Class)
Intent intent = new Intent(this,AnotherClass.class); intent.putExtra(Name, foo); setResult(RESULT_OK, null); super.onActivityResult(requestCode, resultCode, data); switch (requestCode)
Calling: Intent i = new Intent(Timer.this,TimerService.class); i.putExtra(ms, ms); startService(i); code: public class TimerService extends
I want to start a new Intent dynamically. Therefore setClassName seems the best choice.
I try this code PackageManager pm = getPackageManager(); List activities = pm.queryIntentActivities( new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH),
I am getting the following error: The constructor Intent(new View.OnClickListener(){}, Class<DrinksTwitter>) is undefined In
I have the following code in one activity: in= new Intent(ThisActivity.this,AnotherActivity.class); imgarr = new
This class has information that I want to send with an intent to another
I'm using intents to launch Google Navigation: Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(google.navigation:q= +

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.