ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
§¬§à§ß§Ó§Ö§Û§Ö§â§ß§à§Ö §á§â§à§Ú§Ù§Ó§à§Õ§ã§ä§Ó§à
§á§â§Ú§Ý§à§Ø§Ö§ß§Ú§Û.
§¡§â§ç§Ú§ä§Ö§Ü§ä§å§â§Ñ §Ú §Ú§ß§ã§ä§â§å§Þ§Ö§ß§ä§í
§®§Ö§Ý§î§ß§Ú§Ü§à§Ó §¡§ß§Õ§â§Ö§Û
Rambler&Co
an.melnikov@rambler-co.ru
andrey7melnikov@gmail.com
§±§à§ã§ä§Ñ§ß§à§Ó§Ü§Ñ §Ù§Ñ§Õ§Ñ§é§Ú
§£§Ñ§â§Ú§Ñ§ß§ä§í §â§Ö§Ñ§Ý§Ú§Ù§Ñ§è§Ú§ñ
? Product flavors - §ß§Ö§ã§Ü§à§Ý§î§Ü§Ú§ç §Ó§Ö§â§ã§Ú§Û
? buildTypes ¨C §ß§Ñ§ã§ä§â§à§Û§Ü§Ú §à§ä§Õ§Ö§Ý§î§ß§í§ç
§á§Ñ§â§Ñ§Þ§Ö§ä§â§à§Ó §Ú §Ü§Ý§ð§é§Ö§Û
? Android library ¨C §Ó§í§Õ§Ö§Ý§Ö§ß§Ú§Ö
§à§ã§ß§à§Ó§ß§à§Û §Ó§Ö§â§ã§Ú§Ú §Ó §Ò§Ú§Ò§Ý§Ú§à§ä§Ö§Ü§å
Flavors
? productFlavors {
kassa35mm {
applicationId "ru.rambler.kassa35mm"
versionName "2.0"
}
kassabel {
applicationId "ru.rambler.kassabel"
versionName "2.2"
versionCode 9
}
}
Flavors
? §°§ä§Õ§Ö§Ý§î§ß§í§Ö §â§Ö§ã§å§â§ã§í
? §°§ä§Õ§Ö§Ý§î§ß§í§Û §Ü§à§Õ
? §°§ä§ã§å§ä§ã§ä§Ó§Ú§Ö
§Ó§à§Ù§Þ§à§Ø§ß§à§ã§ä§Ú §á§â§à§Ó§Ö§â§Ü§Ú
§Ü§à§â§â§Ö§Ü§ä§ß§à§ã§ä§Ú §Õ§â§å§Ô§Ú§ç
§Ó§Ö§ä§à§Ü
? §­§Ö§Ô§Ü§Ñ§ñ §ã§Ò§à§â§Ü§Ñ
? buildConfigField "boolean", "SUPPORT_FONTS", "true"
BuildTypes
? §¯§Ö§ã§Ü§à§Ý§î§Ü§à §Ó§Ú§Õ§à§Ó
§ã§Ò§à§â§Ü§Ú
? §¯§Ñ§ã§ä§â§à§Û§Ü§Ú §Õ§Ý§ñ
§ä§Ö§ã§ä§Ú§â§à§Ó§Ñ§ß§Ú§ñ
? §±§à§Õ§Þ§Ö§ß§Ñ §Ü§Ý§ð§é§Ö§Û
§¡§â§ç§Ú§ä§Ö§Ü§ä§å§â§Ñ
? ?§±§â§à§Ö§Ü§ä §Ù§Ñ§Ô§à§ä§à§Ó§Ü§Ñ?
? §®§ß§à§Ô§à§å§â§à§Ó§ß§Ö§Ó§Ñ§ñ
§Ñ§â§ç§Ú§ä§Ö§Ü§ä§å§â§Ñ, §Ó§Ö§â§ã§Ú§Ú
§Õ§Ý§ñ §Þ§Ö§ß§Ö§Õ§Ø§Ö§â§à§Ó §Ú
§ä§Ö§ã§ä§Ñ flavors.
? §³§á§Ö§è§Ú§Ñ§Ý§î§ß§í§Ö §Ó§Ö§â§ã§Ú§Ú
§Õ§Ý§ñ §à§ä§Ý§Ñ§Õ§Ü§Ú §á§å§ê§Ö§Û §Ú
§à§á§Ý§Ñ§ä§í
§¡§â§ç§Ú§ä§Ö§Ü§ä§å§â§Ñ
? §£§ã§ñ §ß§Ñ§ã§ä§â§à§Û§Ü§Ñ §ã §á§à§Þ§à§ë§î§ð §Ô§Ý§Ñ§Ó§ß§à§Û
§æ§Ñ§Ò§â§Ú§Ü§Ú
public class KassaApp extends Application {
public void onCreate() {
¡­
}
protected MainFactory createMainFactory() {
return new MainFactory();
}
}
§¡§â§ç§Ú§ä§Ö§Ü§ä§å§â§Ñ
public class MainFactory {
public FragmentManager createFragmentManager() {
return new FragmentManager();
}
public UIManager createUIManager() {
return new UIManager();
}
public String getLatLng() {
return LocationManager.getInstance().getLatLngParams();
}
public String getCustomUrl() {
return getContext.getString(R.string.custom_url);
}
}
§¡§â§ç§Ú§ä§Ö§Ü§ä§å§â§Ñ
public class BolshoyFactory extends MainFactory {
public FragmentManager createFragmentManager() {
return new BolshoyFragmentManager();
}
@Override
public String getLatLng() {
return getString(R.string.lat_lng);
}
@Override
public UIManager createUIManager() {
return new CustomUIManager();
}
}
§¡§â§ç§Ú§ä§Ö§Ü§ä§å§â§Ñ
§°§ã§ß§à§Ó§ß§í§Ö §Ü§à§Þ§á§à§ß§Ö§ß§ä§í:
? MainFactory ¨C §æ§Ñ§Ò§â§Ú§Ü§Ñ §à§ã§ß§à§Ó§ß§í§ç
§ã§å§ë§ß§à§ã§ä§Ö§Û
? UIManager ¨C §ä§à§ß§Ü§Ñ§ñ §ß§Ñ§ã§ä§â§à§Û§Ü§Ñ view
§ï§Ý§Ö§Þ§Ö§ß§ä§à§Ó
? FragmentManager ¨C §æ§Ñ§Ò§â§Ú§Ü§Ñ §æ§â§Ñ§Ô§Þ§Ö§ß§ä§à§Ó
§¡§â§ç§Ú§ä§Ö§Ü§ä§å§â§Ñ
§²§Ñ§Ò§à§ä§Ñ §ã §æ§â§Ñ§Ô§Þ§Ö§ß§ä§Ñ§Þ§Ú:
KassaFragmentManager:
¡­
@Override
public Fragment getOneCinemaFragment() {
return new CustomInfoFragment();
}
§¯§Ñ§ã§ä§â§à§Û§Ü§Ñ §Ü§Ý§ð§é§Ö§Û
§£§ã§ñ §Ü§Ý§ð§é§Ú §á§â§Ö§Õ§à§ã§ä§Ñ§Ó§Ý§ñ§ð§ä§ã§ñ §é§Ö§â§Ö§Ù §Ó §ç§â§Ñ§ß§ñ§ä§ã§ñ
§Ó config.xml. §¥§à§ã§ä§å§á §é§Ö§â§Ö§Ù §Ü§Ý§Ñ§ã§ã KeysProvider:
public class KeysProvider {
public String getAppKey() {}
public String getParseAppKey () {}
public String getAppKey() {}
}
Config.xml:
? <string name="parse_app_key">***</string>
? <string name=¡°flurry_key">***</string>
§±§à§Ý§å§é§Ö§ß§Ú§Ö §Õ§Ú§Ù§Ñ§Û§ß§Ñ
? §¥§Ú§Ù§Ñ§Û§ß §ã§à§Ù§Õ§Ñ§Ö§ä§ã§ñ §á§à §Ñ§ß§Ñ§Ý§à§Ô§Ú§Ú §ã §à§ã§ß§à§Ó§ß§à§Û
§Ó§Ö§â§ã§Ú§Û. §£§ã§Ö §ï§Ý§Ö§Þ§Ö§ß§ä§í §á§à§ã§ä§Ñ§Ó§Ý§ñ§ð§ä§ã§ñ §Ó §ä§Ñ§Ü§à§Þ
§Ø§Ö §æ§à§â§Þ§Ñ§ä§Ö.
? §¥§Ý§ñ §è§Ó§Ö§ä§à§Ó§í§ç §ß§Ñ§ã§ä§â§à§Ö§Ü §Ó§í§Õ§Ö§Ý§ñ§Ö§ä§ã§ñ
§à§ä§Õ§Ö§Ý§î§ß§í§Û §æ§Ñ§Û§Ý colors.xml:
<color name="kassa_delimiter">#bbe2f9</color>
§¯§Ñ§ã§ä§â§à§Û§Ü§Ñ §â§Ö§ã§å§â§ã§à§Ó
§ª§ß§æ§à§â§Þ§Ñ§è§Ú§ñ §à§ä§ß§à§ã§Ú§ä§Ö§Ý§î§ß§à §Ü§Ú§ß§à§ä§Ö§Ñ§ä§â§Ñ
§ç§â§Ñ§ß§Ú§ä§ã§ñ §Ó §à§ä§Õ§Ö§Ý§î§ß§à§Þ §æ§Ñ§Û§Ý§Ö :
<string name="support_custom_email">
web.support@bolshoikino.ru
</string>
<string name="app_name">
§¬§Ú§ß§à§ã§Ö§ä§î§¹§Ñ§â§Ý§Ú
</string>
§µ§Õ§Ñ§Ý§Ö§ß§Ú§Ö §ï§Ý§Ö§Þ§Ö§ß§ä§à§Ó
§¥§Ý§ñ §å§Õ§Ñ§Ý§Ö§ß§Ú§ñ (§ã§Ü§â§í§ä§Ú§ñ) §ï§Ý§Ö§Þ§Ö§ß§ä§à§Ó §Ú§ã§á§à§Ý§î§Ù§å§Ö§ä§ã§ñ
UIManager:
public boolean hasPosterSearch() {
return getBoolean(R.bool.config_poster_search_enabled);
}
public boolean hasHeaderLocation() {
return getBoolean(R.bool. config_header_location_enabled);
}
§±§â§Ú§Þ§Ö§â §Ú§ã§á§à§Ý§î§Ù§à§Ó§Ñ§ß§Ú§ñ:
if (!uiManager. hasHeaderLocation()) {
disableHeaderLocationView();
}
§±§â§Ú§Þ§Ö§â §Þ§Ö§ß§ð
§¥§à§Ò§Ñ§Ó§Ý§Ö§ß§Ú§Ö webView
? §©§Ñ §â§Ñ§Ò§à§ä§å §ã webView §à§ä§Ó§Ö§é§Ñ§Ö§ä
§à§ä§Õ§Ö§Ý§î§ß§í§Û §æ§â§Ñ§Ô§Þ§Ö§ß§ä.
? §±§à§Õ§Þ§Ö§ß§ñ§Ö§Þ §ã§ã§í§Ý§Ü§å:
private String getUrl();
? <string
name="custom_url_news">
http://kassa.rambler.ru
</string>
§¥§à§Ò§Ñ§Ó§Ý§Ö§ß§Ú§Ö §ï§Ý§Ö§Þ§Ö§ß§ä§à§Ó
? §±§â§Ú §Õ§à§Ò§Ñ§Ó§Ý§Ö§ß§Ú§Ú §ï§Ý§Ö§Þ§Ö§ß§ä§à§Ó §ç§Ñ§â§Ñ§Ü§ä§Ö§â§ß§í§ç §Õ§Ý§ñ §Ó§ã§Ö§ç
§ä§Ú§á§à§Ó§í§ç §Ü§Ú§ß§à§ä§Ö§Ñ§ä§â§à§Ó, §Þ§í §Õ§à§Ò§Ñ§Ó§Ý§ñ§Ö§Þ §Ú§ç §Ó §à§ã§ß§à§Ó§ß§à§Û
§á§â§à§Ö§Ü§ä
? §±§â§Ú §Õ§à§Ò§Ñ§Ó§Ý§Ö§ß§Ú§Ú §ß§Ö§ä§Ú§á§Ú§é§ß§í§ç §ï§Ý§Ö§Þ§Ö§ß§ä§à§Ó, §Þ§í
§Ú§ã§á§à§Ý§î§Ù§å§Ö§Þ §á§à§Õ§Þ§Ö§ß§å §æ§â§Ñ§Ô§Þ§Ö§ß§ä§à§Ó
? @Override
public Place getPlace() {
Place customPlace = new Place();
customPlace.setId(52);
¡­
return customPlace;
}
§´§Ö§ã§ä§Ú§â§à§Ó§Ñ§ß§Ú§Ö §Ú §à§ä§Ý§Ñ§Õ§Ü§Ñ
? §¥§Ý§ñ unit §ä§Ö§ã§ä§Ú§â§à§Ó§Ñ§ß§Ú§ñ §Ú§ã§á§à§Ý§î§Ù§å§Ö§ä§ã§ñ Robolectric,
§Õ§Ý§ñ UI - espresso
? §¥§Ý§ñ §Õ§Ö§á§Ý§à§ñ §Ú §Ñ§ß§Ñ§Ý§Ú§ä§Ú§Ü§Ú §Ú§ã§á§à§Ý§î§Ù§å§Ö§ä§ã§ñ fabric.io (ex
Crashlytics)
? gradle assembleRelease
crashlyticsUploadDistributionRelease
? ext.betaDistributionReleaseNotes=¡±§ª§ã§á§â§Ñ§Ó§Ý§Ö§ß§à
§Þ§Ú§Ô§Ñ§ß§Ú§Ö §á§â§Ö§Ó§î§ð.¡±
? ext.betaDistributionEmails=¡°betaUser@ramble-co.ru,
betaUser2@rambler-co.ru"
? ext.betaDistributionGroupAliases=¡±ramblerCinema¡±
Continuous Integration
? §¥§Ý§ñ CI §Ú§ã§á§à§Ý§î§Ù§å§Ö§ä§ã§ñ Jenkins
? §³§Ö§â§Ó§Ö§â §Ñ§Ó§ä§à§Þ§Ñ§ä§Ú§é§Ö§ã§Ü§Ú §ã§Ü§Ñ§é§Ú§Ó§Ñ§Ö§ä §Ü§à§Õ §Ú§Ù
§â§Ö§á§à§Ù§Ú§ä§à§â§Ú§ñ §á§à §ã§à§Ò§í§ä§Ú§ñ§Þ
? §³§à§Ò§Ú§â§Ñ§ð§ä§ã§ñ §Ó§ã§Ö §á§â§à§Ö§Ü§ä§í
? §¡§Ó§ä§à§ä§Ö§ã§ä§í §á§â§à§ç§à§Õ§ñ§ä §Õ§Ý§ñ §Ó§ã§Ö§ç §á§â§à§Ö§Ü§ä§à§Ó
? §³§à§Ò§â§Ñ§ß§ß§í§Ö apk §Õ§à§ã§ä§å§á§ß§í §Õ§Ý§ñ §ã§Ü§Ñ§é§Ú§Ó§Ñ§ß§Ú§ñ §Ú §Ò§à§Ý§Ö§Ö
§Õ§Ö§ä§Ñ§Ý§î§ß§à§Ô§à §Ñ§ß§Ñ§Ý§Ú§Ù§Ñ.
? §¥§à§ã§ä§å§á§Ö§ß §Ñ§ß§Ñ§Ý§Ú§Ù §á§à§Ü§â§í§ä§Ú§ñ §Ü§à§Õ§Ñ §ä§Ö§ã§ä§Ñ§Þ§Ú §Ú
§å§ã§á§Ö§ê§ß§à§ã§ä§Ú §Ó§í§á§à§Ý§ß§Ö§ß§Ú§ñ
§µ§á§â§Ñ§Ó§Ý§Ö§ß§Ú§Ö §Ñ§Ü§Ü§Ñ§å§ß§ä§Ñ§Þ§Ú
? §±§â§Ú§Ý§à§Ø§Ö§ß§Ú§Ö §Ó§í§Ü§Ý§Ñ§Õ§í§Ó§Ñ§Ö§ä§ã§ñ §Ú§Ù §á§à§Õ §Ñ§Ü§Ü§Ñ§å§ß§ä§Ñ
§á§â§Ö§Õ§à§ã§ä§Ñ§Ó§Ý§Ö§ß§ß§à§Ô§à §Ù§Ñ§Ü§Ñ§Ù§é§Ú§Ü§à§Þ
? §¬ §Õ§Ñ§ß§ß§à§Þ§å §Ñ§Ü§Ü§Ñ§å§ß§ä§å §á§â§Ú§Ó§ñ§Ù§í§Ó§Ñ§ð§ä§ã§ñ §ã§ä§à§â§à§ß§ß§Ú§Ö
§ã§Ö§â§Ó§Ú§ã§í, §á§â§Ö§Õ§à§ã§ä§Ñ§Ó§Ý§ñ§Ö§ä§ã§ñ §Õ§à§ã§ä§å§á §Ü §ã§ä§Ñ§ä§Ú§ã§ä§Ú§Ü§Ö.
? §±§å§Ò§Ý§Ú§Ü§Ñ§è§Ú§ñ §Ó google play §Ú app store §ä§Ñ§Ü§Ø§Ö
§á§â§à§Ú§ã§ç§à§Õ§Ú§ä §à§ä §Ý§Ú§è§Ñ §Ù§Ñ§Ü§Ñ§Ù§é§Ú§Ü§Ñ.
? §£§à§Ù§Þ§à§Ø§ß§à §Ú§ã§á§à§Ý§î§Ù§à§Ó§Ñ§ß§Ú§Ö Publishing API
https://developers.google.com/android-publisher/
§¬§à§ß§Ó§Ö§â§ã§Ú§ñ §Ó §á§â§Ú§Ý§à§Ø§Ö§ß§Ú§ñ§ç
§°§ä§Ù§í§Ó§í §á§à§Ý§î§Ù§à§Ó§Ñ§ä§Ö§Ý§Ö§Û
§³§á§Ñ§ã§Ú§Ò§à §Ù§Ñ §Ó§ß§Ú§Þ§Ñ§ß§Ú§Ö!
§³§Þ§à§ä§â§Ú§ä§Ö §Ü§Ú§ß§à!

More Related Content

§¬§à§ß§Ó§Ö§Û§Ö§â§ß§à§Ö §á§â§à§Ú§Ù§Ó§à§Õ§ã§ä§Ó§à §á§â§Ú§Ý§à§Ø§Ö§ß§Ú§Û