In Android development, we have Parcelable interface. Since I wish to build Data Models that will run on multiple apps and services (not just Android), I would like to add two jar libs that will share some of the code across multiple implementations: 1. The first A is coupled with Android SDK 2. The second B is not coupled with Android SDK
The B package will contain Data Models (POCO objects), for example. Since B has no reference to Android SDK, and I would like my POCO objects to implement Parcelable, then I think it would be nice to inherit from all POCO objects and implement the Parcel objects only in package A.
The same goes for methods and utilities that are only available in Android, and have other implementations in Java.
Is that the right approach for developing multiple apps and services that might share code?