Eclipse AVD Nexus 5 emulator not working

I’m trying to run a nexus 5 emulator in Eclipse AVD but I get a blank screen, I tried Nexus 4 emulation and it works fine, but not Nexus 5 for some reason. I tried this on multiple computers. This is just running an emulator with no project, so it’s not a code issue. Please […]

java.lang.NoSuchMethodError: No static method setOnApplyWindowInsetsListener

I upgraded my android studio to 2.1.3. And now I am getting following error java.lang.NoSuchMethodError: No static method setOnApplyWindowInsetsListener(Landroid/view/View;Landroid/support/v4/view/OnApplyWindowInsetsListener;)V in class Landroid/support/v4/view/ViewCompatLollipop; or its super classes (declaration of ‘’ appears in /data/data/com.restroshop.restroowner/files/instant-run/dex/slice-internal_impl-24.2.0_7c318f8d2adb03d07a9def5d35a14e39204ecef2-classes.dex) at$LollipopViewCompatImpl.setOnApplyWindowInsetsListener( at at at at at at com.restroshop.restroowner.splash.SplashScreen.onCreate( at at at at at […]

Is there any Android api to find/sense room temperature programmatically in android code?

I am developing an android app for my project, I need to find room temperature as part of it. I am using Droid 2 A955 model for testing. My Questions are: What sensors need to be available in my Android phone to perform this temperature sensing task? Can Ambient Light Sensor (available in Droid 2) […]

Android: OpenCV: imwrite always returns false and fails to write

This code used to work but on Android 4.2 and OpenCV 2.4.4 it fails, but I don’t know why. Can anyone shed any light on it for me? Thanks for any help. Baz public void SaveImage (Mat mat) { Mat mIntermediateMat = new Mat(); Imgproc.cvtColor(mRgba, mIntermediateMat, Imgproc.COLOR_RGBA2BGR, 3); File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); String filename = […]

Highlight selected item inside a RecyclerView

I’m having trouble with highlighted an item within a RecyclerView, similar to setting the selected item in a ListView. At the moment, I’ve set up up the RecyclerView, have a default LayoutManager, and have an adapter which displays all the data. I’ve just recently got the onClickListener() working (although I’m not sure if it should […]

How do I determine whether a path is a local file or not

Given just a location as a string, is there a reliable way to determine if this is a local file (such as /mnt/sdcard/test.jpg) or a remote resource (such as Converting it to a Uri with Uri.parse doesn’t seem to give me anything to indicate where the file is. I don’t really want to have […]

Uncaught TypeError when using a JavascriptInterface

I’m currently displaying a bunch of data to the user as HTML in a webview. I have some links below each entry that should call a method in my app when clicked. The Android WebView’s javascript interface seems to be the best (only?) way of handling these things. However, whenever I click the link, I […]

I have updated Android SDK to rev. 22 yesterday and there is no apkbuilder in tools

I have checked with my friend who has Android SDK tools version 21, the apkbuilder is there. I have updated the Android SDK tools to version 22 and I can’t find apkbuilder anymore. So it seems that the Andorid SDK tool has replace the apkbuilder with something else? How can I make ant build.xml without […]

Android: programmatically change the application label?

It doesn’t seem possible, but I was hoping someone may be aware of a way. Can the label of the application (the one defined in the manifest file by android:label=”@string/app_name”) be set from code?

Gmail “Can't attach empty file”

My app creates a PDF using iText library (template PDF with forms which are filled) and I want to then attach it to an email to send. When I try to attach the file I get the error Can’t attach empty file in the Gmail app. Have also tried with the HTC email app and […]

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