4. A white label product is a product or
service produced by one company
(the producer) that other companies
(the marketers) rebrand to make it
appear as if they had made it.
- WIKIPEDIA
5.
6. Provides your brand with a refined product.
Outsourcing the development to a trusted thirty-party company.
Saving time and money.
20. MAIN FLAVOUR
• default product
• used only for demo purposes
• contains shared code
• uses default set of resources
• can be customised by configuration file
21. FLAVOURS
• each flavour is an application
• holds product specific resources
• contains only product specific code
• should be as minimal as possible
22. ADVANTAGES
Easy to maintain and develop.
Easy to configure.
Resource and code sharing between main flavour and product flavour.
40. public interface AppConfig {
boolean isSocialLoginEnabled();
List<MenuItem> getLoggedInUserNavigationMenu();
}
41. public class WhiteConfiguration implements AppConfig {
private static final List<MenuItem> LOGGED_IN_USER_NAVIGATION_MENU = Collections.unmodifiableList(Arrays.asList(
new MenuItem(R.drawable.ic_gamepad, R.string.home),
new MenuItem(R.drawable.ic_settings, R.string.settings),
new MenuItem(R.drawable.ic_settings, R.string.info)
));
@Override
public boolean isSocialLoginEnabled() {
return !BuildConfig.DEBUG || BuildConfig.APPLICATION_ID.endsWith(STAGING_APP_ID);
}
@Override
public List<MenuItem> getLoggedInUserNavigationMenu() {
return LOGGED_IN_USER_NAVIGATION_MENU;
}
}
42. DESCRIPTIVE METHODS
Method names should be descriptive and should not contain product names.
public interface AppConfig {
boolean isWhite();
boolean isBlue();
}
46. @Module
public class ProvidersModule {
@Provides
public ImageLoader provideImageLoader(ImageLoaderType type) {
switch(type){
case GLIDE:
return new GlideImageLoader();
default:
return new PicassoImageLoader();
}
}
provided with
configuration file
47. Include external dependencies only for specific product types.
whiteCompile 'com.github.bumptech.glide:glide:3.6.1'
blueCompile 'com.github.bumptech.glide:glide:3.5.0’