In your comment, you mentioned that you really want to determine which version of your application you are currently using. For this or similar purposes, my entire project with my application engine has a small Util class containing something like this:
public static final boolean DEBUG = (SystemProperty.environment.value() != SystemProperty.Environment.Value.Production);
public static final String APP_ID = SystemProperty.applicationId.get();
public static final String MAIL_DOMAIN = AppengineEnv.APP_ID + ".appspotmail.com";
, DEBUG . , , APP_ID, GAE, "myappid_beta", "myappid_alpha" ..
, , , , , - , Android. , , .
- . - , , , . :
class BusinessLogic {
public static void doAwesomeStuff(String version, ManyMoreParams){ ... }
}
@Api (
version = "beta",
...
)
class BetaEndpoints {
private static final String VERSION = "beta",
@ApiMethod( ... )
public void doStuff(){
BusinessLogic.doAwesomeStuff(VERSION, moreparams);
}
}
@Api (
version = "alpha",
...
)
class BetaEndpoints {
private static final String VERSION = "alpha",
@ApiMethod( ... )
public void doStuff(){
BusinessLogic.doAwesomeStuff(VERSION, moreparams);
}
}