I'm new in android and I have a question.
I want to have just one instance of a class in my whole android program so that it's attributes won't change during the program, but I also want to call it's methods in all my activities.
With some search I realized that I can pass my object via implementing class as Serializable or Parcelable. I did this but I got following error:
java.lang.RuntimeException: Parcelable encountered IOException writing serializable object
java.io.NotSerializableException: microsoft.aspnet.signalr.client.hubs.HubConnection
as you see one of my class attributes is HubConnection which is in microsoft package and i can't make it Serializable.
What can I do to pass the object of SignalR class to another activities? And what are my options?
public class SignalR implements Serializable {
    private HubConnection connection;
    private HubProxy proxy;
    //some methods
}
 
     
     
    