Tutorials

Android Add AdMob With Google Play Services

You might want to also check AdMob with Firebase Tutorial Now we can integrate ads from AdMob using Google Play Services. There are some changes in the way ads must be implemented now, so this why I decided to make a tutorial about it and to explain how we have to add ads to our projects. So let’s […]

Info

Android Emulator Alternatives: Genymotion

In Android emulators are very slow. It takes a lot of time to boot, to develop, to test. I am pretty sure everyone searched at least once for ways of improving their emulator’s speed, or for alternatives. I did. And not once, but many times. And now I discovered Genymotion. I must say that it’s

Tutorials

Android Google Maps Api v2

I finally decided to make a new post about the latest way of integrating Google Maps in Android applications. Please note that Google Maps Api v1 is now deprecated and supported by Google any more, so this is deprecated too. So you have to do some preliminary steps first. What tools did I use? Android

Tools

Android Studio / IntelliJ IDEA code regions

If you ever worked with Xcode then you must know the power of “#pragma mark” macro. You could just define regions of code using that and sometimes it helps when you have classes that can get a bit big or if you just want to have a nice structure of your class. Well you can do

, , ,
Snippets, Solutions

Android Gradle & Manifest merge

[Deprecated] This post is now deprecated, the Manifest Merger has changed since my first post. You can find more about this on the android developers site. Manifest file & Gradle If you started using Android Studio and implicitly Gradle, or you just started using Gradle with other IDEs (like Intellij for example), then maybe you

, , ,
Solutions

Android Canvas Issue Starting API Level 14

Recently I had to change the target SDK on one of my applications, but by doing that, I ran into some problems with the Android Canvas.  In this application I use an animation which simulates an explosion. So, I tested my app and I noticed that everything was working OK, until I changed the target

, , , ,
Snippets

Clear Fragment back stack

To clear the Fragments back stack of a FragmentManager, you could iterate through all back stack items and call popBackStack() but there is also a more elegant solution. Please see below: // in my case I get the support fragment manager, it should work with the native one too FragmentManager fragmentManager = getSupportFragmentManager(); // this

, ,
Snippets, Solutions

Run code on main/UI thread on android

Android’s UI components are not thread safe so one may need to update Views or other UI components from a secondary thread when returning from an asynchronous database query or a web service call.  If you run the code from a secondary thread you might see that the code crashes almost on each try. Below

, , , ,
Solutions

Android Nexus 5 USB Driver

Recently I had to install the driver for Nexus 5,  but I completely forgot how to do that so I decided to write a post about this.  So what problems did I have? Well, I did some research on the internet (again) and found the steps to install, but for some reason my Nexus 5

, ,
Solutions

Android Studio: Cannot install from SDK Manager:”Access is denied.”

On Android Studio I noticed that if I try to install the android sdk files I get an error like in the image below: (I have Windows 8 on my computer) So I found out that the solution is to open the Android Studio as Administrator from where it is installed. In my case Android

,
Solutions

Android Studio Gradle 0.9 error: Unable to load class ‘com.android.builder.testing.api.DeviceProvider’

I had to re-install my windows, therefore I had to re-install all my programs too, including Android Studio :) So, after I had re-installed Android Studio, I kept getting a Gradle error: ” Unable to load class ‘com.android.builder.testing.api.DeviceProvider’”. After I googled it I found the solution here. It seems that we have to delete gradle’s cache.

,
Solutions, Tutorials

How to get user location

Nowadays, knowing the location is very important for applications. Even if you want to develop a simple application that returns the coordinates, or you develop different kind of apps that need location and you need to know what is the location of the use,r this tutorial might help you. In order to get your current

, ,
Tools

Android State list generator

Inspired by a post from stackoverflow, I made a simple XML State List generator :), you simply need to fill the inputs with your corresponding drawable names and then press Generate button. For more details regarding android StateList XML please check the official documentation. Android state list generator version 2 is here:  New in android state list generator

, ,
Tutorials

Android and Java sockets – simple messenger

Hello all, as you requested in the previous TCP server-client tutorials, I made a new tutorial on how to create multiple client connections to a single server. I posted the projects on GitHub here for you so I will post here only the main classes and functionality that I consider important to walk through. You

, , , , , , , , ,
Scroll to Top