Smaller APKs with Classy Shark

A big thanks to my friend Enrique López Mañas for giving me feedback on how to improve this post, and of course Boris Farber for creating Classy Shark. App Size An app I am working on feels a lot larger than it should be, my hunch that this is due to dependencies that are being included in the APK that …

Who’s There

Ingredients: Android Device with cameras and internet access and accelerometer Android Device with internet access Webserver for storing pictures Free Urban Airship Account Google Account (for using Google Cloud Messaging for Urban Airship) Wifi Something to attach the android device to the peep hole Problem: When I’m at home I’m usually in the living room. Due to the odd shape …

ViewServer

So the other day I was working on a project. I looked at the xml and thought that it could use some refactoring. I went to use the hierarchyviewer in the android sdk. Unfortunately the tool wasn’t working with my phone. Turns out that it doesn’t work with production phones! You need root for it to work. Fortunately there is …

Copying Intent Data

There is some confusion from an earlier tutorial I wrote about using urban airships push notifications. On one of the steps I have a function call to copyIntentData. This is a method I wrote. I glossed over it because I was focusing on urban airship configuration and felt that this topic fell outside the scope of tutorial. I have had …

Custom Button States

I wanted to make a ImageButton to appear differently depending on a variable. The ImageButton would behave more like a checkbox. I know that there are other options such as subclassing the CheckBox or ToggleButton. This was more of a curiosity. My use case was I had a loop button that I wanted to display a different image when it …

Up, up, and away with Urban Airship

Update I have gotten a lot of feedback from this post. I am a freelance Android developer. If you get stuck or simply don’t want the headache of configuring push notifications. I can be hired. Forward This tutorial is for using Urban Airship’s Android push notifications service. They offer two different methods for enabling push notifications. One via their in …

Put a clamp on it

I wanted to have a background that is horizontally centered, and clamp the pixels on the left and right side. It seems as though clamping is only for pixels to the right and bottom of an image. This called for some image handling to get the missing clamp.

Prevent animation on activity start or stop

I was looking for a way to prevent the animation into and out of Activities. Here is what I found: To prevent the default slide animation on Activity.finish() I found the following to work on 1.6. I am not sure what other versions it works on. getWindow().setWindowAnimations(0); For animation into a new activity for 1.6 is done the following: int …

Back from CTIA

I spent a few days at CTIA. I was able to try out the two new samsung android tablets. I loved them. Though the 8.9 just felt right in my hands. This was not due to weight, as the 10.1 was very light. I had fun meeting lots of people and talking about technology. I will probably be getting a …