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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:14:23+00:00 2026-06-05T09:14:23+00:00

I want to do this class A extends Activity{ private class myClass{ } myClass

  • 0

I want to do this

class A extends Activity{
       private class myClass{
       }
       myClass obj = new myClass();

      intent i = new Intent();
      Bundle b = new Bundle();
      b.putParcelable(Constants.Settings, obj); //I get the error The method putParcelable(String, Parcelable) in the type Bundle is not applicable for the arguments (int, A.myClass)
      i.setClass(getApplicationContext(),B.class);
      startActivity(i);  
    }

How do I use Parcelable to pass obj to activity B?

  • 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-05T09:14:25+00:00Added an answer on June 5, 2026 at 9:14 am

    As the error suggests, you need to make your class (myClass in this case) implement Parcelable. If you look at the documentation for Bundle, all the putParcelable methods take either a Parcelable or a collection of them in some form. (This makes sense, given the name.) So if you want to use that method, you need to have a Parcelable instance to put in the bundle…

    Of course you don’t have to use putParcelable – you could implement Serializable instead and call putSerializable.

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

Sidebar

Related Questions

public class VideoDemo extends Activity { private VideoView video; private MediaController ctlr; File clip=new
What I want to do is this: class DB extends mysqli { ... }
I have created a Alarm using AlarmManager. Intent intent = new Intent(MyApp.this,NotificationMessage.class); PendingIntent sender
public class testAddSpiner extends Activity { private Spinner m_myDynamicSpinner; private EditText m_addItemText; private ArrayAdapter<CharSequence>
I have this in my first activity: private AdapterView.OnItemClickListener _itemClickLis = new OnItemClickListener() {
This class has information that I want to send with an intent to another
I want to create a class that exends Comparator. This comparator will compare two
I want to have this class serialized, so i can send it as the
I want to serialize this class: public class CarDisplay { public string Name {
i want to serialize this class, to store it on the sdcard of the

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.