Using An Enum Contained In A Cloud Endpoint Model On A Android Client
I'm trying to implement an enum in a entity called CargoWrapper. In my android app I'm constructing a CargoWrapper object to send to an endpoint method, and then calling my CargoW
Solution 1:
The easiest way is to create additional module and include it in other modules.
build.gradle
for common
module
apply plugin: 'java'
dependencies {
...
}
Define your enum
in this module. You can choose whatever package you want.
Now include the common
module in both Android app and backend modules.
build.gradle
for other modules:
dependencies {
...
compile project(':common')
}
This way you have only one enum
definition (instead of two, in different modules, which have to be manually updated when either of them is changed).
Post a Comment for "Using An Enum Contained In A Cloud Endpoint Model On A Android Client"