Sample Code For Sending an Android Push Notification from PHP via Urban Airship

Update: Sorry there is some confusion about what variables need to be changed in order for this script to work. The only values that need to be changed are: $dictionary[‘apids’] = array(…) $username $password Obtaining an apid is explained on step 9 of this page. The $username is the application key from the details page for the urban airship apps …

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.

Alpha Compositing Tutorial with Britney Spears and Guillermo Diaz

I was attempting to use PorterDuff.Mode.DST_IN to apply a rounded rectangle to images. The mask was successful in removing the parts of the image I did not want. However it was leaving behind solid black instead of transparent. This is not what I wanted. After researching the problem for a while I discovered that I needed create an additional layer …

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 …

Don’t stretch background images

I had a background image that I didn’t want to resize. But it was being forced to fit in the window and it looked ugly(See screen shots). I read that the solution was to make a custom drawable.

Android Platform Versions

I like to check the platform versions in use so that I know which API level to use while excluding the least amount of users. Google updates the platform page on the first and fifteenth of the month. As of this post, if a one develops for API Level 7 then 95% of the devices on the Android Market should …

Beginning Android Application Development

I was sent a free copy of Beginning Android for Attending the first AnDevCon. I really like that the book is in color it makes reading it so much easier. The part that I was not happy with was that the coding style in the book does not follow the android style guidelines. I realize that these guidelines are for …

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 …