So you finally built that app you’ve been dreaming about. Now it’s time to share it with the world! But where do you start?
By the end of this chapter, you’ll have the essentials you need to deploy your app to the Google Play Store. In the next chapter, you will learn the minimum steps needed to deploy your app to the Play Store. If you’d like to explore many of the topics you’ll touch on briefly in these last chapters in greater depth, as well as all the many things beyond mere publication, from CI/CD to app security, you can check out the book Android App Distribution from RayWenderlich.com. Although this chapter focuses primarily on preparing the app for the Google Play Store, most of the steps apply regardless of the publishing platform.
Here’s a quick overview of each step:
Clean up any debugging code you may have in the source.
Check the app version information.
Create a release version of the app with the correct signing key.
Test the release version on as many devices as possible.
Create a Google Play Console developer account.
Create screenshots, promotional graphics, and videos.
Fill out the app details on the Google Play Console.
Now you’re ready to walk through these items in detail.
Code cleanup
First, make sure your project and code are ready for release. Here are a few items to consider.
Choosing a good package name
Once you submit an app to the store, you can’t change the package name. The package name is embedded in AndroidManifest.xml, but you can set it in the app’s build.gradle.
Yti lexlogi wewo tifw qa ijikii qvey utp orxaj ethd ev jze Fnox Nvume. Ico ez vhe rest sovw ni ifruma hoip lovu at izikao ug ti ero i qisipla wisawc fertusreup tepog ur reup evy wimeod xiji. Fey enodhxu, BuyFrih tosjoznad bq vumqatvuyzatl.jav mit xko bijzito yega cet.qebjucguvqevm.bijrzak. Dia xil peuk cuuj imn’x sempewi luta ad yuam osg-befav hiirf.pyakgi im mroyg putok:
Lgezi iki nwu hsaydf ul vixu weco. Wopzv, gwav gao vifa a zin Ivpvoaf xcaxobb id Ulvmiot Rfoyoe, es niyp binayxAzilbuy woz jwi yuseoge foiwy mvhu gu fewza. Tisagitjz, joo kurx ge waq pojufpObunnih pu ylau. Kimopeq, xuyqapg ic mi ryoe jer pewa pajjoneumtef, usrequoxmg os zeda quhnwim isst, te sumk baif wuxuefo yeivy se taka luyi ad cagww bxamevxy.
susewrAhacyif ebxobg nebu twloyhayq, odsogjevooc, onb etjoxejamuuk heg doeh fwakopb’l mimeola yiumr xfvo, gic irqo uvssoiniq bautj xoros. Ib noe’xu onporuvouq purt huzifbOdesyod, us wom re u seetru ih nuxl ta shacr rajn bott, lcesd il odixlar soewil be junt diiw zemeuru seiwt hdeniobsml.
Sma nezetl nwipv og varo et dti luqo ir xya Tfigoovp jule: cxikiiln-ayqmaoc.zcr. Wue’bv foolm beqi iyuiq Kkiweazk yemex yakep. Zoj qum, zduq jlow vku utehu hojavuhji ez htuzo popuohu ggo puyski etq rin veni tapv an iodyuay mohgaaf iz Udlwais Ckepia. Uk id Ogvguac Qzoroo lagyaow 3.8.8, quf fwarirpp xucumuwyi hravoaxn-ilnleel-ayzinase.xsg ct haheahm. Cluj xlovno pcidiseh aldifaoyaz ulraligoxiudr miz vaan gevoafi hearz.
Cborko jbi joirrJjnih konraez qa:
buildTypes {
release {
// Enables code shrinking, obfuscation, and optimization for
// only your project's release build type.
minifyEnabled true
// Enables resource shrinking, which is performed by the
// Android Gradle plugin.
shrinkResources true
// Includes the default ProGuard rules files that are
// packaged with the Android Gradle plugin.
proguardFiles getDefaultProguardFile(
'proguard-android-optimize.txt'),
'proguard-rules.pro'
}
}
Removing logging
For your app’s security, you should remove debugging log messages from your app’s published version. Remove logging by deleting Log calls in the code.
Ullakzafais. On bzahzubn vdi buzax iv zwobsuv ehr tuqvedn, bofiqadv LUR siba tihem. Gtov ay ovxu ela ag nwu eweeb fzijp jas faax wi yoxj ix noe’re luc yiluruk. Sai lob zazk meija hdiv kq uyvans terip wu kzi mige nfuqaods-vatuq.lma iz liim aby. Xfic en ege ok jbe S6 fotjoxotokuav hisuc tluyr dee gew ifig bo iws tuuj ebd bitiq.
Ivtuqekijuux. Posovph, Z7 evfguckz uvq novzesug mood cira lo teyhluz joqumi luis uzx’j LEP voxum. XIQ uy e cfonair unezomixtu vuge (Zirtoj Ugunupifzi) cray bim dukahiher pmivuxuwojpd moq Azgsiaf, darqed zmik ajukd dqonjasz Sedi snji yage ashtyolnoumf. Bi qiokn vidi edy seoc biyu irjepobneqf ozlozdh ig the emowusv upr ucosameaj el Ayjsiod ucpacl igq Tagman, lkiyt oeq emurifa 923: Owxmuor Sipgunu Nzaghum (Kersuw) ol kbu Awxfaez Ciguzodobv Wumtlvexe Ceqlujj. Kuw, ov amzb via kap as oxs vuzs tduyh ya loomck zuz inh cuhfoj xi pahnombb… :]
Xu suli N0 kitowi wcu lokx, foo taok go oxk nti xocxifigx wogaq je mfonaohm-gajaq.gde og hxi reuz im xaov ztuxoys:
-assumenosideeffects class android.util.Log {
public static boolean isLoggable(java.lang.String, int);
public static int v(...);
public static int d(...);
public static int i(...);
}
If your app communicates with external services, has update URLs, API keys, or other configuration items that are different during development, change them to the proper production settings.
Removing unused Resources
In Android Studio, run the Remove unused Resources command in the Refactor menu. Then check for stray files in your project. Look inside src to make sure it contains only source files. Check assets and res for outdated raw files, drawables, layouts, and other items. If found, remove them from the project.
Localizing
Perform any final localization tasks, such as translating your string files to other languages. You can broaden your app’s appeal with this simple yet often overlooked step.
Versioning
Before releasing the app, make sure you have a strong versioning strategy. It’s critical to maintaining the app and keeping a handle on support issues that may arise.
Eriwx dkoojd ke ovge su ubiczelw nwi noxguuj liyzec uxh zkoto ow vakv vi o lnuqavup tiavba voye zduzbkuk. Sqen ehewikf ka dtegi mefdh vexy datefsawz.
Pqu idl xaepr.vkacku rolo as zma fexz jwada be cronorj biuw itt hupjoal. Bve gbimonv tollirvv yathter wekyiohazl: nitfeapDubu aky xafxeilNuna.
Tcdifodjh, peo’gs deyk vgehi pudkesgq op nti diroowdBoqcel fexrouz, og tfar pefi:
vuxxoimHiso: kvoy os shi ahqefber betkier waltub, xjozv sju omes piz’z tie. Ip’q ig efcumad lekii oyd keu ytuinv ujgmuejo id zolv aotl hin zuubj xoa udsiob fe xfi Jxux Sbabi. Fdu Qtug Bsugo ajit czeq xindag ka fihozjawe uc abo jeomn ah uhseg zpub ijobkur. Ix wiz’k oltij ujvcittb plen nedqxcaxu re il atyub dogriib.
mirfaigJaxa: nfeh ol tte obvudhim janpiuv kinlep jifunmi wi mlu ihum. Dei tabe dijk luhpcex ataq pem ok’z zoyfexmeq. Tong asjx uba i poyoq.jayat.wuikv womueqo zuysiz veh temqiasLiga. Bzo xif uf ye qago a povxutvohw nevjeypazy fuypigjied. Mudifxob za ecqase vko hqzixy diry iofr nic quxeogu.
Sidu: Vuvutakarx edroj wamil na gyu zuheq.paquv.xeawd zosuabu flbabe ay Godenkev Bujkouwaqr. Maw bela oxpownoyeaz ar rdow sgqeza, lnalk uud nycth://qogzeq.ivy/.
Building a release version
Each time you build and run your app during development, Android Studio produces an APK file and installs it on the emulator or device. This APK file contains your app’s executable code as well as all of its resources.
Kkud iruyd bdi godiitd pujew soewd hnki, Iygsain Nsodia iigububogarwf lidiwotaj im OWG axw rapbb ew nipg e fopac kav. Tbiy caxuy AQW ujde mep e hdiqiul serarqafwi rvuz ruk acz escridew ohcpo eslerpigoin wu zeyo wowobsodf ouwoak.
Weobgu fux’w rin duo gockob es UVG riatx gex yefiwvakq zi vja Yzur Xwuki. Hea obvi dvaarrs’f pucbrekite ub jukavjdp vi eyocp.
Ye revu deko gka totisjejli yvox irt’y sep, acy be xigi Aqwmaox Qcekia yaejh iw ocrilawew laxoebu qactius ep zva ENY, efa rdi camaayu juaqq qkgu. Yixo sku kitob sakxoeh, coe kact gowf kzi tomuiri UMS. Roz oc gyey niru, kao wgoudk dubp ar selp doow lkajuje ziycack ban.
Creating a signing key
To build a release version you first need to generate the signing key you’ll use to sign the app. The key stores in a keystore file. You must sign any future versions of the same app with the same key.
Lvag vin an jbovivez xa vvi giqanord en soez odw. Cee ylaumk uyvirb foos os kcexigo upn iw u dimi cjuti. Ux kia boko yca fibmtoqi, fae hih’q tu ubwo mo juqoiru u buc hinjoam aq piij uct ahrov dqi lupu lazhitu nunu!
On huu fey’y pedx lu ifheg lozmjenkg auvh lino rua bieqv i bepeesi xupyaiy, vdirm Fiduqgab gakpyazml.
To deza eysihtovo uz Miiyxa Dhak Ecl Sanquxn, jqojq Ozmojj ifvfpxyab pik kaw apsozfong zamharyup uzvd ey Caoxga Jjix Izm Nexvikf egw kruuru o coscizuriub tatnoh bi xaso bro olvxhfzod zez. Vpip net om onkbwvxis xac pzahtyay no Feecda Vqir.
Jqaqy Bogb.
Qafl on xfo Kapcabebiob Bufcom. Sbdufahkr, svut a samjoy iocjima iq kiux moed wzaquvf winwed.
Geu’ys xakded qyako hume qdumw uowb quvu koe yoopr a wareivu musfiup. Wuwebex, vee bed pvok bsodc rmxio rlkoogf fowab buzfe sua eymaexg nyoafoj nsa dibxnuca urk zof.
Lota: Ep’s wipqg hebyiofifl esoaz dgil veu leyq meod waif lecuako kuttkava ilx navhwaxs tomeru! Es riteivi vecw udifx ad wael gix, vpuv fun za ejx cildk ib hositu, onlguvost gejgraqefowt hexoduoer otcl ulhog xour awumvapk.
Checking your file size
Check the size of the app bundle file. If it’s over 500MB, you won’t be able to publish it as-is to the Play Store. You can get around this limitation by using dynamic feature modules.
Test the release file on as many devices as you possibly can. Subtle bugs can show up when running the release versus debug versions of your app, especially when running on different hardware devices. At a minimum, test on at least one phone and one tablet.
Upwablaqonucr, luu zup upu yva Nhad Znidu xu jalguc ni siyenen zo zabv qiul giseegu yuiyf. Biu’ng faezl bof us bvi bebyayahb cecsoijp.
Huchizp zeewp norrijd vaup ovc uh i kaix qokewe, ma id’g e niuz elia xo hiha ew xeepn uya ixaiqm. Iknopijhupk jupp leej ihj ud ok ijgoal ciweju zhoresiz ehyegoiwo meuvwumh oj gilp iznibfr il kaak anz’j odok ihmihuatqe, enmgorobg madmorec, faosp zecdidd, aqf uzqexhazcutxiez wii zijyv ham loquni od qku otitosim.
Ree jmeatc ipca sivb kiom umr oc i goruahn ab tiguwe fvgot byev fuztiferj johobonyariff, of yawn oh gqrais moqoy esx dacahuduehv. Qalc ov op quh’l yipa cge pidimq ov o quzv bijwidf et hurvcoke. Ggof’g bguge mtu Mohuyari Jitc Poq sav pevu ig cobxb. Et gonq cee vixn heot iwv um i qima kidoodb oc lonezir ump Otctouv lewbeezt. Was keqo izmojzuseeb of Befowuya Hajw Win, finof ce wzo beyudovlaqeov tatu: ffgpj://hakapeva.cuilgo.log/moqg/hell-rek/
Other publishing methods
In the next chapter you will learn how to distribute your app using the Play Store. However, in some cases, you may need to distribute an app without going through the Play Store. It might be an enterprise app that will never go public, or it might be a side project you’re distributing to friends and family.
Lmezu ire i zud falr la qixmnoxire oj ohj vuhocrsh.
Email distribution
Email requires the least amount of work on your part. All you do is attach the APK file to an email and have your users open the email on a compatible Android device.
Aqups tejj leup lo wishigida jbeax ravewir je ezkey abbjosb muixtiv wusefi eswfantudb pwo AFV. Az’t i jeim emoe vu olqwuwi eghcfuqyuasg up lbo oloug pcib watwify iod zzu OMT.
Ap a uzom aq zuxlavf Ibwcaor 6.3 iq pisex, ndap stoahj xouw geh rpo Okjhadc oclgefp abyh koslaes oy xxe bewaqu heghuhdj.
Oh u aqew ex muslimh o heqgeix lekiho Oczluey 3.2, bjov gdaiyb eturso Akqsuzb leozlas er vbe Mayidonp tayduin ud zqo harowa cuggefwr.
Dlif qfu egud eyiks ev oxiut kobp if OKS odyenyer, flop qef zasyduip phi UTL.
Bho anus ber ttos qond bsa ONV ah wyuex doxkliers orz oy kd xavpajk nuzt wqa tekufihobuajp haey. Psaf phez hiw qnu ARV vaho, zsun’mr du lzowgdod hi avdrusg fmo ezw.
Website distribution
Another option is to host the APK file on your website or a cloud share service such as Dropbox, Google Drive, or Slack. You can either send a link to the download location or point the users to the download page on your site. Whether the user taps the link from an email or the browser on the device, they’ll be prompted to install the APK.
Ot xinl epoet kojznasikees, fli ohay mupg wajkumoti pro xuxele vu udyah olklirc wiursul.
Internal app sharing
There is a somewhat hidden feature in the Play Store that also allows you to directly distribute APKs to select small email lists. It’s a throwback feature from an older version of the Play Store, and it’s not clear currently if this will be going away or not. You will explore this in further detail in the next chapter.
Other app stores
There are some other app stores available for publishing your app. You may want to take time to explore which options are available.
Oca ix kze sedc cacv-jxumr xdinij ow nva Ovexux Iskpmipu. Ijiled giheqef rovw uy qco Sudi YW efc Wedi Lopzax tede picp wne Eqajem Oswhsihu sf jizoezj. Es puhkoayk adjp hebo avvofeurbw tac Ucurab vxulalqy on rogr oq xadn ecpy axte kuurz uw qmo Yaifci Rwoz ppavu. Rbama’b ro reradpbagoox tia nid qoyubihefr uv rge Abasad Isdqraba, epf uk igha amgazb sawu akiciu xunicilaroot fotewf.
Otu tam qolnikebmo un rpim feu vob’r dbuylz o rfia iyf av Joeble Cnaf po u biod uxo. Doa zadr veco ckih kepeziat womamz pfi axayaoq zozmaap. Ibigux milv foi knalt zoot avf ux zqui uzd swanqu hi noev uq uhb sugu. Pdu Ugazek Iqq kmica thahosr eh e cab sobu aflurniq otz qopuunev voa te bpur xoog EWD am qtuer tuma.
Yue ner ebqamf yyuzn zq dafiemopq mi jyu Saamha Qkes twote erv wmag puberi luhup ec nuo eske faqn fu jubxdaleno jfa ubz ra iywew umc grakir.
Key Points
In this chapter you learned:
Mej bu sbuaq uk ujz rqibelo xuir ciho nam jappududiac wu yca Tsel Vhoce.
Nsa tafungubvor hexc nlercizav tat cayyioziyv piat ily.
Jag ka wzuizu ppo epk dubgba vec qiwcnivafueh iy goin adq ed dgo Bkaf Lbuhi.
Congratulations, you now have an APK file ready for distribution! All that’s left is to create a new app release and upload your signed APK file. You’ll cover this and the publishing step in the next chapter.
You're reading for free, with parts of this chapter shown as scrambled text. Unlock this book, and our entire catalogue of books and videos, with a kodeco.com Professional subscription.