I'm new to android app development and I'm trying to send the SoapObject which is in MainActivity to the 2nd Activity using intents, by trying to put the soapObject in a Bundle. I'm getting an error:
unable to cast SoapObject to Bundle
Is there any possible way to send the SoapObject to the 2nd Activity?
You can't cast SoapObject to Bundle becouse it do not inherits from Bundle. As far as i know You cant send it like that becouse SoapObject dont implements Parcelable interface.
Here is a discussion about the problem: How to pass an object from one activity to another on Android and You may try to use solution with static class members (https://stackoverflow.com/a/7454611/4114960) but myself i think it's NOT very good idea. You may experience problems coused by overlooking sth related to Activities lifecycles.
Why don't You parse answer from SoapObject to String, or List etc. and pass it safe with putString, putStringArrayList etc.?