We’ve been exploring how to create your own Android apps in this special series. In part 1, we learned how to find the tools to create your app and in part 2, we started the process. Today, we’ll start by looking at coding and designing.
The Code and Design
Now you’ll decide what types of elements you need, such as buttons, toggles, check boxes or radio buttons.
Drag your required elements from area 1 to area 2 as shown in the image below. Align your elements by clicking and dragging with your mouse.
For every element, you pull to area 2 you need to add code in the second panel MainActivity.java as shown in the figure.
You can find samples of basic code by clicking here.
If you want to learn basic Java, try the free tutorials here.
Once you’ve put all of your apps abilities into place, you’ll want to test the app.
Today, I’ll talk about two ways to test your app.
Using Android Emulators such as Bluestacks or AMIDuOS
Once you have either of these programs installed, you can click run on your app and you’ll be able to choice one of these emulators to test it on.
Using Your Android Phone
First, you’ll need to open Settings on your phone. Then under Developer options turn on USB Debugging.
If you don’t immediately see developer options look under About Phone in settings and tap on Build number continuously 7 or 8 times. When you go back, you should now see developer options. Turn on USB debugging and connect the phone to your PC with a USB sync cable. The connected device should show up when you click Run to test your app.
Select your device and proceed. Your device will install the application and will run like a regular application if it’s put together correctly. You’ll want to thoroughly test out your app for all of its functions. The more devices you can test it on, the better.
Host Your App on Google Play Store
If you think your app is something others would like to use, you’ll want to arrange for it to appear in the Google Play Store. Open the Google Play Store and sign in. You’ll want to go to the Google Play Developer Console Page.
Accept the terms and conditions and pay a registration fee of $25. After that, you can click on All Applications and choose Add New Application. Upload your app.
While not exactly easy, if you have a bit of technical knowledge and are willing to experiment, you can create your own app.