Implements Serializable

Hello all,

My SDK: Backendless SDK v1.0 for Android, released 02.28.2013

Please, make BackendlessUser and other like BackendlessUser classes implements Serializable.

It’s very importan feature, because We will be able to putting Backendless object in new activity.
See http://developer.android.com/reference/android/content/Intent.html

Methods:
Intent putExtra(String name, Serializable value)
Intent putExtra(String name, Parcelable[] value)

Hello Mark! Thanks for answer, it’s really good method. But I think that
sometimes serialization has meaning. I think it’s can to expand
developers capability.
Maybe it’s not so important now… But… Thanks anyway :slight_smile:

In order to support both Java and Android, we can make it Serializable. But in this case we will need to serialize a hashmap (wich is an inner storage unit for the BackendlessUser).

We can handle this in other way. The problem with serialization is needed mostly for android applications. Android API provides a Parcelable interface, which handles the serizalition in a better way. So we can add a getter and a constructor to the BackendlessUser class, which will work with Parcelable.
From the other hand, the current user can be reached from the UserService. We cannot guarantee, that it won’t be cleaned by android GC. And it is up to the developer to check, if the currents user is null, and redirect the user to the login screen.

Does it really need to implement Serializable? You can always get the currently logged in user using the following API: http://backendless.com/documentation/users/android/android_get_current_user.htm

Mark