Skip to 0 minutes and 12 secondsHere, we'll generate the files that are necessary for us to share the code on a device directly, for instance by sending it as an email to yourself and installing it from that email. To do that, we need what is called a signed APK. And we do that from up here in the menu on the Build and then we go here to generate signed APK. Once you've done that, you'll get to a menu like this. It might not look exactly the same, because I have already used it. Yours will probably not have any information in it, for instance. And the first time you do it, you will have to create what is called a keystore.
Skip to 0 minutes and 54 secondsSo you have to go in here and create a new one. So create a keystore, find a place that is convenient for you to save it. Now I saved it on my Dropbox, so I can access it from all the computers I have. The key store is where you will store the key that you are using to create it. You will have to use the same key for all of your APK. That's a rule. So this one, you will just be using always. So it's important that you know where it is. It's important that you don't throw it away. You should always be able to find it, and you should remember the password.
Skip to 1 minute and 32 secondsFind a place where you can save it. As I said, I do it on the Dropbox. It's convenient for me. Go in, and create a password, and confirm it. Then you give yourself an alias. I usually have my own name. This is a short name for yourself. This is commonly used in companies so that you can set up several users using the same keystore. So give yourself one. You won't be a company, so just call yourself something. Again, that needs a password and the confirmation of the password. Set the validity of the key in years. I use 100 years myself, because I don't expect to live more than that.
Skip to 2 minutes and 24 secondsAnd I will never change the keystore, so 100 years it is. Then you fill in your name. What organisation you are. You can leave that blank, if you're just yourself. Where you're from, and that's it. And you press OK.
Skip to 2 minutes and 41 secondsAnd that's it. And you have a keystore. Now, I won't fill this in, because as I said, you should only do one ever. Once you've done it, you can go in and choose it. And then put in the password for the keystore. This will find the list of aliases. I only have one alias, so I'll use the alias of Carland, which is my name. I used this often online. Well, it's not really my name, an alias. And then the password for that alias. And then I press Next.
Skip to 3 minutes and 19 secondsThis might bring up another menu, where you have to put in another password and master password. Do that, this means that there will be a password that Android Studio will be able to use to secure that nobody else will be using your key. And now, what you do you go in and find a place where you want to save the APK file. Always choose Release here. And yeah, find a name-- give it also a name. You know, you could go in here, into the File Explorer here and find a good place to add it.
Skip to 4 minutes and 4 secondsAnd then you just press Finish.
Skip to 4 minutes and 8 secondsAnd you will be having your APK file. Now the way to get it installed on your phone is really easy. You simply email it to yourself. Once you have it on your phone, the first time you have emailed it, it will probably say something like, you have not allowed it from unknown sources. But you just go into your Settings under the Security. And you can turn on Allow Unknown Sources on your phone. And if you do that on your phone, then when you go into your email, there should be an Instal button. And you can Instal it. So that is how you create an APK file.
Skip to 4 minutes and 53 secondsAnd you can see now here, mine is finished, and I can see it in my Explorer. We have it here. And now, yes, as I said, I could just email it to myself.
Setting up an Android device (APK method)
Here in this video we’ll show you how to create an APK file that you can then share via email, through a personal cloud service (such as dropbox) or by uploading to GooglePlay.
This method is generally used to share the code with others. This is a simple method to get the app on to a device. However, if this method is used to set up the game on the device, you cannot debug your code on the device. There is also a downloadable guide for this Step.
© University of Reading