Getting Started with the Java SDK
Create the AppFlags Client
To use AppFlags in your Java application, create an instance of AppFlagsClient
as shown below:
import io.appflags.sdk.AppFlagsClient;
public class MyClass {
private AppFlagsClient appFlagsClient;
public MyClass() {
appFlagsClient = new AppFlagsClient("APPFLAGS_SDK_KEY");
}
}
Client initialization
Creating the AppFlagsClient
will take around 100ms as it downloads your feature flag configuration from the AppFlags edge servers. Once created, AppFlagsClient
is initialized and will be able to locally evaluate feature flags.
Realtime updates
The client will listen for updates and immediately update your feature flag configuration when you make any changes to your feature flags in the AppFlags dashboard.