So you’ve just made an Android application. One that took you ages to complete and something that you feel proud of. What is going to stop someone from stealing your logic and source code? How easy is it to obtain? The short story is that your source code is not safe by default and it is very easy to obtain.
This tutorial is going to be broken up in two parts.
Both are designed differently, but the source code is just as easy to access. For each of these application types, you will see how to better protect your code using obfuscation practices.
Read MoreAs an Android developer, you’ll often run into the scenario where you need to perform tasks and display notifications for your app in the background.
To retain battery power on our users device we are going to run background tasks using a broadcast receiver. This will prevent a thread from constantly running in the background draining the battery quickly over time. Instead, the task will be run on defined intervals of the alarm.
Read MoreIt was recently requested that I show how to create an Android app from start to finish using a text editor and command line. Although the process isn’t difficult, it might not be so straight forward for a first time developer. The scope of this article should cover the following:
Creating clean looking user interfaces in Android can often be challenging. With all the screen resolutions and screen densities that exist for Android, a lot more must be taken into consideration than iOS apps.
A nifty trick I figured out is being able to use font glyphs instead of PNG or JPEG images. When using standard images you must create an image for every density (xxhdpi, xhdpi, hdpi, mdpi) and even then it still might not look clear. When using font glyphs, the images will always look crisp because they are vector graphics.
For this example, I’m going to use Font Awesome because it is open source and there are more than 400 glyphs included.
Read MoreThere is often a scenario where you need to download files from a server onto the Android device. This needs to be done without forcing the user to launch a web browser and have interaction as some of the downloaded data might be private. Let’s use the scenario where you’ve made a game and you have in-app purchases. You want to keep the size of the game small for everyone so you decide to put the purchase items on your server. When a user purchases an item then the item will be downloaded in the background. This is a perfect usage example.
For purposes of the tutorial we will be staying simple. We will be downloading a remote image in the background and then displaying it when it has finished downloading.
Read MoreThreads and asynchronous tasks have never been pleasant in Android. It is a nightmare to handle screen orientation changes or update the UI from a common thread. However, the guys at Google came up with Volley and it is an excellent way to make Android HTTP requests.
Out of the box you have the ability to make a request that will return a JSONArray or JSONObject which is pretty slick because most APIs use those as a standard.
Read MoreUnity3D offers a ton of great features for Android projects, but often there are gaps that must be filled with plugins.
Let’s take the example of Toast popups for Android. In your game you might like to show a popup message that explains an error, or states that you are signed in to a server.
Read More