Gradle Warning: missing groovy return statement

I’m having the following warning in my gradle build file Not all execution paths return a value This inspection reports on missing groovy return statement at the end of methods returning and this is the code in that file apply plugin: ‘’ android { compileSdkVersion 21 buildToolsVersion “21.1.2” defaultConfig { applicationId “” minSdkVersion 15 targetSdkVersion […]

Difference between Intent.ACTION_GET_CONTENT and Intent.ACTION_PICK

I’m trying to let the user choose any image that they want on their device to use as a wallpaper in this wallpaper application I’m building. For some reason when I write: Intent myIntent = new Intent(Intent.ACTION_PICK); myIntent.setType(“image/*”); startActivityForResult(myIntent, 100); I go straight into the gallery, but when I write: Intent myIntent = new Intent(Intent.ACTION_GET_CONTENT, […]

Post UTF-8 encoded data to server loses certain characters

I am working on project which includes communication of the server (JavaEE app) and client (Android app). XML is sent as one of POST parameters of the HTTP request (named “xml“). There are also few other POST parameters which I pass to server, but in function below I removed them for simplicity. Problem that occurs […]

Android CollapsingToolbarLayout Title background

I’m working with the CollapsingToolbarLayout from the new Android Design Support Library. I have set its title and it is working fine, the only problem I still have is that when you scroll, the text is lost, depending on the image in the background. What I’d like to do, is set a background to the […]

Accessing localhost of PC from USB connected Android mobile device

I have an android device (Samsung galaxy tab) connected to my PC via USB . I want to use WebServices and run a web page which is located on my local xampp server of my PC on my android device . I can achieve it if I have both , my PC and android device […]

Is there a way to add a badge to an application icon in Android?

On the iPhone, you can add a numbered badge to the application icon. On BlackBerry, I’ve successfully painted an image onto the application’s icon while in the program. I want to do this for Android as well. I don’t want to use the notification bar, as it’s not something that needs to be notified instantly. […]

Android Emulator – Trouble creating user accounts

I need a user account or two in my Android Emulator so that I can test some texting/mailing function of my app. The trouble is that when I try to do this in the emulator: Settings –> Accounts & sync –> Add account –> (my_gmail_account/password) –> Next I get the message “Setup could not finish […]

Android : Is there any free PDF library for Android

I need a PDF library for manipulating a PDF documents, (creating PDF, image convertinng to PDF) and things like that but in Android. I tried the android itext port but the library project generates compile errors after I added it to my Project. Looks like it is still using some affinetransformation classes that are defined […]

cursoradapter with different row layouts

I’m trying to create a custom cursoradapter that will use two different layouts depending on some data in the cursor. I keep reading about ‘overriding getViewTypeCount() and getItemViewType()’ to make this happen but I can’t seem to figure out how to implement this.. This is my code for the bindView and new View methods: @Override […]

Prevent ProgressDialog from being dismissed when I click the search button (Android)

In a long-running operation, I’m showing a popup dialog (created from ProgressDialog to prevent other operations from happening). I have made it non-cancellable with setCancelable(false), so I can’t close it using the back button, but surprisingly, the Search hardware button dismisses the dialog! More exactly, the global search application is displayed, and when I come […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.