Wow, you made it, i’m sure it was worth it?
In this final lesson we’re going to finish up our apps super basic functionality, show you an easy way to create custom launcher icons and show you how to create an APK so you can eventually submit your app!
Obviously our dirty button still isn’t working. We’ll need to do two things, you should give it a try on your own, but I’ll understand if you can’t take your eyes off of all this.
We’ll need a dirty pickup line and a listener on dirty button. The pickup line I like to use is “Are you sitting on the F5 key, cause your ass is so refreshing.” If you have a good one post it in the comments, maybe it will work on me, maybe. Lets set that to dirty Line, then we can just make a new listener on dirty line, we’ve done that twice already, so even with me in front of you, you can handle it. It’s the same as the clean listener, except we’ll pass in the dirty line.
Ok awesome, with that last piece we can emulate and see our app working. Our functionality is pretty basic, but it’s still probably worth 2 million right? Go buy that shit!
Next launcher icons. Having sexy launcher icons is super important. Here is the one we made for this app. To make a launcher icon create a 512 square PNG image in your favorite graphics program, it can be transparent if you want. Then go to google and search for Android asset studio. This app is bomb.com and free, click launcher icons and you’ll see an interface to create all the sizes you need for different screen resolutions. Creating them manually? Ain’t nobody got time for that. If we upload our ping it will generate all the correct sizes and we can download the zip. Notice that these file names need to stay the same so Android can find them. Drag all of these into your resources folder to overwrite the mipmap files currently there. If you hold down alt on mac you can drag them directly into Android studio.
Or if you right click on a mip map directory you can reveal the source folder and then overwrite with the new icons there. Damn, our app is so hot right now with these new icons!
But how do we actually release this bad boy? First go down to build variants by hovering over the bottom left square icon and set it to release. This will tell android studio to create a release ready app. To do that go to build and then generate signed APK. APK is an Android application package that holds all our app code and what you’ll need to put your app in the play store.
Go to Build, and generate signed APK. Click next on the first screen, then create new, for keystore path. Choose where you want to store it on your computer, preferably somewhere you’ll remember. Then put in a password. Alias can be anything you want, along with the same or different password. Validity just determines how long the key will be active. Put it as high as you want. You’ll need to fill out one field in the certificate area. Then a password and alias that google will ask for when you want to update your app, don’t lose it. All this is doing is creating an encrypted key to verify your identity. When you done with all that click next, the next screen will be another next, then ok. Now we choose where to put our APK, put it whereever, but remember where. Now we can go and grab the apk, you can run that on your phone if you’ve unlocked developer mode, or follow googles directions to upload it to the play store.
And that’s it, can you believe we’re done? I know you’re going to miss me, this was a super basic intro to android. Go and see if you can improve our app! Or just go back to swiping on tinder. It's been fun, CodeBabes out.