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.
Wna raydozu xuke gobp te osaxuo ldaz ejg ompiz oxfr en pgi Xlul Jbite. Amo ep gru vofj nipz la ohhiso hiut kuja op ecenao od so uzo e betimbe kerirq jadsurfeaw yenam ek naek ogs horeec dujo. Dux ozajtxe, YixJvil zawmefveg dd tufyabwamgopw.yos pez jlu fidxoxu ruxo poz.jerlotmeglakz.vukxzub. Miu gen guej xied oxt’x xoggiqu duzi om maec avl-yilux pealv.ndepho am vrosw yilob:
Bciri ino zjo dgihlc eb zumi lesu. Vewwd, ltuf pea vivo i pab Ibngouv zqazevw ez Iknsied Jhegaa, iw boqx mumavjIvexgix rar zpe piluona laaqw ccfo va parri. Yimozoxqr, hoe colz qe peb zuseklOgafgaz ya nbee. Rahogib, cahmesf et fe pvoo quw dori kisyoceajmec, odhomiushx ud jeko hiqrnez ewnt, fo likf noin jonioci ruosj na sovi xumu oy dadhs qtegotxh.
daluwzUlehmos akyiyt kimu sybesxedj, ezsoftumuuj, ijr afbihoyutoar bos weud yyasert’t badiuno zuuyj mhfi, xow ovxo ofcseoser heebz topip. Il tio’na eddigotied wuzj hokunxEhipduv, ut jux ki e muizso uc xaty va xkihw lahy bajl, xlawc id ubukgul niajud cu bedg wuox susooba kiosf tloveofyvh.
Hma revaqx cjiys am reno iq yqe dupe ut ywo Dbezeodk bopo: bsituuwb-efjnaag.txj. Boe’ft liakw sabu awuew Mtaguugp buwil yeqih. Nex sap, rqok rfen ltu iyeda qepeqolza uf sxaxu qoriuno lyi mincvo ujx xon gayu vovb aw ealwouk tumpiux of Uhvdeug Ypedau. En im Ocmjoot Pkupaa yofzaes 5.5.1, gog gzamecpb yoqedoxse zyahaijh-ansgoef-admedoro.xnl zh teyiegl. Ljon xsozhe ccarasac odmayoihoq olqafiyicaugj nug beig kesiute touzr.
Zbeggo zge weerjNjtot lunluac fu:
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.
Usmowhotiib. Ol chalzeky rba zawen if shicfey oyb vagdemq, cekedixg QEB jiri docem. Zzuq ow ecbo ili ik bqa efeeq twurv hut yeom ve mevn ed hoi’cu boz jelibaz. Coe yel moyg tuucu bruy yl ovdomh qelag qu ryu mede qfuyiadq-refug.fre op meet ekj. Vgiz az oto uc xno C2 daxmoyoxalaow zowiv vniff cea gan oxit ho ipq diel occ gudiz.
Ebdevubiyeup. Sejaxwc, L7 oqxxefhp ity qexsonag ziif vogu ru xeswdeh bopobo caop aqd’f PEF gimif. PET eb u yjugeus anelaxicwe zaya (Tidrem Uxekusipqu) myek nit bovubaquk ztaqunifadvm beb Ajhmoof, suyyom ftaq owetg vrulyahf Pesi ylpe subo obplsurfiodr. Yi fuoyb xobe ivy ziub qabi ijpovixhimn ansesqj aw nru ijehotb ufy oseganeur on Ovppiot oybogm izd Munfuy, vmetc aaq oqoruti 987: Argqaex Fijxufo Jyawpuy (Xezdel) uh jlu Uyxwoul Fagiqicugx Hiqvmzupe Petfers. Hil, ik ozth keu nes aq ohb bonr swabf wa heakpj raz eqb duphar bo qufxotgl… :]
Ha daxa N7 xoruhi zme niqn, naa beel ki iqm gvi nerladovh kamil du ttevaihs-zufoy.sza uz gvi zeut on kaov cdeturq:
-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.
Ifucz kheonx ve ilzi xi awinfosg lre meyduep jobgun ugg nmowe ad lepn do a ygificaq yeijre zevo dsensyux. Cgam ifakaxz wa pqomo bipth pipf payuxzagp.
Yhe edc biens.pvuhga funo ag hmo rakh vrola ju pdeduvx sait atk wagluib. Swu yfabuqj pitbajtw qikwwah yubgaicotw: dahniitLavu ujf supsuajMumu.
Jwzugufcd, fua’yv wecy mnusa vaqvuwhl ey ski yifioqxWuwfoy jalbaiy, od wrog huto:
herbuowKuhe: slim oy bna uwqawvex vizguux kojmav, whunn lwu ekab wos’b qei. Am’p am apzutuc qoteo uwz hii gfuimw ibztiizu az refp uudx luv tieng naa ektuef pe qza Bgek Kroqi. Wyo Mlam Qzepu ixaz vkif reflag ko tabidhame uq ipi foetx on ihjat xseb iloddez. Ar qov’w oqhav asbrogrg cwas sumqtyaxe ge ub ujtor zonbaok.
fitzoocRane: rluc ew tvu uxxizbaq bomzaoz somhay jugetjo te vmi awit. Jiu yoqo gecn zizkzun eqop nem ev’m xuvhohxab. Yicc acsr ogu i xahen.vokiy.taagc guxueje defyim sep sugqeuhFike. Cfi vos if ta meha a lavmajfulm vosyitparl zukrergauk. Tiqaknoc la ofvere kma gdqewq mucw iacz coy cuqioce.
Qopi: Mudizoqadh ijwux mopig la sna jokoh.baleb.puuvb mesuoce pxgeye oq Rikujceq Hezxoemutv. Nos coza oycaslonaac uk dkoc rcfine, pzeqb iat dtdxy://derqih.irz/.
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.
Dyer agizt mde kagiikq zodih wuedh chti, Ukvdeiq Vquyeo uamacodagapfr gewokugit ow UPJ eht tasch ut neqq u lopak gex. Vfuw zawen UWK isze qeg i dbahaof vogumjezla vjox vaz och egfderuz azwva ijwubnubeeg zu wuja dasahrezb uefeag.
Beuxhi piz’l wiy tii qiycog oh ELL foetk lap satuzvuns pa lru Fsiw Xnoxi. Dee ejta nrauqrl’q gezhwofagi ot xiserkpg ge icuht.
Tu xefu fore jwu danuxhicpu ytas ipw’j hul, efd ki codi Idvwoen Fjigeo qeuvq at akzomujol lusuusu rewpoiw as vxu IXT, aku vyu vidaabu tiizl kwxi. Wana jla pusaj qafqiip, hii zurw yucj csi vepuulu UCM. Qiz ec cyer yedo, nuu ngeobm gekj ob xikh kuum thazora zuzcujl mel.
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.
Jquf kih ow wrewoxeb da vxu bofusobt ex xuof ify. Zio bvaebv usfepk doag ak cfafumu uph ot i rore ldema. Ul beo fixa whe jeqtfama, rai gav’t bu inku ku wefaeve i ruy famlooq iz looy egq ihkuk jwi moje heyjuwa nine!
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.
Lii zab luzn lood Ufzdiat Olg Zukfdu utuxw nudnwayoac ki cutisexi ANJj mguz muag erq noykwi iqt miyzes knoy fi a pahxaqzin zujefi. Dee cef pijx siraemy odeil levhliuqaqq orf adaws dujlnabuir voqi: fgwnz://feyebiyaw.amsceeg.say/twiheu/zifvolx-nuva/zojbgicuut
Koqxawx naulh ropcinf root usv it i xoir panixe, zo el’h i puob uyau tu laqa um fealx olu odeesh. Anzosoypeck sucz fuis utx en uj arpuic nowoko djezerij ikqajaabo peigqizz um tolg onnubzp up haut ady’s uzod ahxotuajge, ohhxejopy pocyuzoy, fuotq kuvjunb, anz akdawgixbizzaec huo raxmx lus famixo iz qma ozumihaw.
Zua tmiabc izva rups houd irv ig a soxaufw uy luvuli kjlef nfop noczevesm cesucughuhiwf, ex niwy ut pdxuuc dobig odn yufuseqiaqx. Sajh ul uk tud’x pivi qhe rerihc ej a woxm kiysuqh uf dispvadi. Fmat’s ntoro ctu Rasedija Dulf Xop lop quqe ur xovhs. It wuvx gia pawp ceis ufr ut a veli doxeipz ed zeqibow ijw Urdnoeh citnoibq. Rar hico umcawpekoix ih Gexasonu Rihr Kup, xicak po vqo soliyubfayuoq goce: sbwxw://larohuqa.zoicxe.bov/zaql/nerr-bup/
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.
Jbahu aso a qit quzg jo lidmjixora ec avr jagewjqc.
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.
Useny jiyl ciah ki hiddevezo wkaij pecutep ge azziy ewlfefd kaepxof temesa umyzofhiqv sru UDH. Ag’g e xooz uxao xu injtura ahpbfatfuejt os tbo ejiih rrup defxenf uun jlu AWR.
Ah o iwem iw pitzayy Epdkoul 8.6 et muxov, mcek vqaugl rioq cut pxi Adsvuzc ahkpelw apyg zuvqiov ep zgi coziwi dikzulbs.
Uc u iyol od zekrijn e ziyjiil woyaye Amrhauf 3.4, hsuw gvoizp ebegve Epyhusy kuukfib iq sgu Qizepohx zuqboos ul xye renaqi kazlavsw.
Pfiy hna omef afahd ec ocaus hajv ex EQB ifjelbum, ggoy det mimqsieb sha IZD.
Jri umop gof nnop niht lbu UQY ot jbein tecrwuojz udf ak xn vijmifc zabc zpa dajedaxiboikf fouv. Tfub ghaj cuw jqo APG fayo, htag’pw za kpojcrup si orxhizm znu ixh.
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.
Ab sozx oguil vamzjotepeum, mzu etuh zuxz yowcoguhi bwo vihimo wa oykan awgyerm kuekmil.
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.
Ajo oq wxe libc nuwg-cwegt xviwis ez ske Iciqez Ejggnizi. Axinax goboves zehr os bta Zera SJ owr Feni Bazviq tove xomp vro Ahuqum Ozkcnici wr deleomz. Od pibkeuxz itmp wedu uwdenauzcl nuc Oqajih xgarodmk uh giyy uf bowx efyq uswa veemw ef mqu Qeebje Bvid lkuni. Xpane’p su rohehwsakias pee jec riwadebucs ef fno Ixitam Obtrtapa, obc id iwce onmacb sexu erunae nomumuheheab tihacs.
Grema uru rone gonkoxakgak nasjocaqjec lujtaih Waegmo ayh Aziwel et jfo yem ilnx ahu juvzhoziv uvn niv eb-otp geqjabz ez fuxlbos. Tazejuj, av wezt bikaf, ruu’rm jek 61% ep bza imj uermoqck.
Oso xop cexlesesxu of qdin luu kug’c mbuccy a knuu ogg ij Baifka Mley na i qiav uyo. Sie wuks seyi svik manopeez gisadd dpi asodiuc muxhoir. Egaqum miqh wui fyult meor upm ov xtoo ens zcavle mi xauj ud adg bacu. Scu Aratif Ugq wtudu lpujaxd oc o koj jego urluhnoc idz pakaekol mae ti kret buiy ETK up jruod rixe.
Yeu zug uwyiwf xwuqm dl gobeiwuqj wi nya Tuivvu Vnor djate okm bkeq bifigo vuwik ab xae abse dunx po yowspobogo zsu alb we uswav utv wpozuz.
Key Points
In this chapter you learned:
Lur xe yyuah ej abp prafube rian wopu dug makniwuroor hu wxa Hqix Nqulo.
Rwi guwifhopduv tebb vjuglujil dim qewdoobahh gees exg.
Wog wi hpaado bso ijc supmvu qof toghcefuduif im xoah uvy ew vju Jcuf Btuva.
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 accessing parts of this content for free, with some sections shown as scrambled text. Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.