Using custom type across projects/packages

thedesolatesoul

Expert
Licensed User
Longtime User
In many places I save my custom types directly to files using RAF
B4X:
   F.WriteObject(DropPipes,False,0)
This is usually a list of custom type objects (all the same type).

However, these seem to be project/package name dependent.

For e.g. it contains the following text(though its not a text file):
B4X:
com.maximussoft.cloudpipes.dpservice$_pipetypew

And trying to open it from another package/app gives a ClassCastException. The other app uses the same service/ type definition, only the package name is different.

I guess the long way is to save all the primitives my self, whilewalking through the type, I was hoping there was a shorter way.
Also, I am not completely sure about the wisdom to use the packagename in the type definition when saving the object. Is that necessary?

Thanks.
 
Top