Tag: java

Aviary crashes on Android L (5.0)

Was just testing my app and found out that after I upgraded my Nexus 5 to Lollipop/5.0, the Aviary SDK I use in it crashes big time. In a google search I found an SO question asked yesterday with the exact same problem, but that question has been deleted by the user (I was able […]

Intercepting clicks from subview in Android

My application has a custom view which contains other custom views of a different type. The subviews have their own click listeners (which I can’t change, as these are in 3rd party libraries). How can I intercept a user’s click at the level of my view to do some processing, and then pass the click […]

android project has red x but no errors in code

I am trying to run android project. The project has a red x on the project folder but none of the sub folder has that red x. No code is highlighted that shows an error. Unfortunately none of my projects are executing. When I run as project it says this error. It does not show […]

android internals and memory/processor constraints?

I’m considering creating a screen reader for Android. My questions are as follows. One how much of the internals of Android are exposed through the Java API? I’m looking for things such as system wide notification when text is displayed, notification of a new application being launched, etc. I’d rather not have to modify the […]

Sending base64 encoded image to server using HttpUrlConnection Android

I’m trying to send base64 encoded images to a server using HttpUrlConnection. The problem I’m having is that most images gets sent successfully, however some generate a FileNotFound exception. My code for encoding the image can be found below. public static String encodeImage(Bitmap thumbnail) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); thumbnail.compress(Bitmap.CompressFormat.JPEG, 100, baos); byte[] b […]

Where will code stop running when app is killed from task manager on Android

If a user is running my app and decides to kill it via the task manager, are there any guarantees about how much code will be executed before the process dies? I feel like it could stop running at any arbitrary line, however I guess I don’t really know the answer to this. An example […]

Android app uninstallation event for analytics

I wonder what are the ways/patterns to detect app uninstallation for any kind of analytics on android? I know the limitations of ACTION_PACKAGE_REMOVED intent – not received by application being removed. I am using flurry at the moment and have also discovered that they do not provide any kind of support for deinstallation events. This […]

When caching images and data should you use Internal or External Storage?

I’ve read this Android save app settings/data in Internal/External Storage but I don’t think i’ve really got an answer. I’m developing an app where I should store some “cache” data, like a dozen of images and some strings (json). Initially I was storing all that on the sdcard, (external storage) but later i thought that […]

Is it possible to execute a Java code string at runtime in Android?

I want to get a line of Java code from user and execute it in Android. For example: String strExecutable = ” int var; var = 4 + 3″ Object obj = aLibrary.eval(strExecutable); It is not java script and I want to run a java code. Is it possible? If yes how? I have studied […]

(MapView and 1700 Overlays Items).equals(“ Slow”)

I have a MapView and I’m overlaying 1,700 points onto it, each with the same drawable but with different information. I’m currently using Itemized Overlay to add all the overlays then populate once fished. This works, but the performance is slow. Changing zoom level and focus is jumpy. Now, would it be any better to […]

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