Facebook: Canvas Webpage Has Expired

While working on a Facebook application I ran into an issue where the tab and the canvas page kept loading with the message “Webpage has expired” in Internet Explorer.  I’m used to a lot of bullshit from IE, but this was a new one.  A fellow developer had already experienced the issue previously and steered [...]

Continue Reading

Android: Creating an Animated Splash Screen

A common device used in mobile applications is the Splash Screen or Start-Up Screen which displays some default content while your app is loading data or doing some other pre-run processing.  In Android there are probably several ways to accomplish this, but the easiest I’ve found is to use a Runnable inside your Main Activity. [...]

Continue Reading

Flash: Loading AS3 Classes by Name

Over the past year I’ve started to program my Flash applications more and more like I would for something in Android.  Since Actionscript 3 and Android/Java share a lot of similarities, this is actually pretty simple to implement. One of my favorite things to do it to create a method in my Document Class that [...]

Continue Reading

Android: Converting from Bitmap to ByteArray

In Android there are a couple of different ways to convert a saved bitmap image into a byte array, but each one has advantages and disadvantages.  The first options is just to use the compress method of the Bitmap class which lets you pick the format (JPG/PNG), the image quality 0-100, and the output stream [...]

Continue Reading

Android: Actively checking your WiFi connection

With any Android app that requires an internet connection, you are probably going to want to check that it’s actually on before having the user attempt to upload or download something.  Android provides a couple different ways of checking that you’re online, but I thought it might be useful to create a class that be [...]

Continue Reading

Android: Conserving memory when loading bitmaps

When writing an app that needs to do a lot of image manipulation, one of the first things you learn is that creating bitmaps in Android is expensive.  Loading one full size image from the MediaStore or other source is often enough to bring the app crashing down.  The solution to this is to sample [...]

Continue Reading

Android: Saving full-sized camera photos

When using the camera in an Android application a few extra steps have to be taken to save a full-sized photo, otherwise the image saved in the MediaStore will actually be much smaller. private static final int TAKE_PICTURE = 1; String filename = “sample.jpg”; ContentValues values = new ContentValues(); values.put(MediaStore.Images.Media.TITLE, filename); values.put(MediaStore.Images.Media.DESCRIPTION, “Sample Photo”); values.put(MediaStore.Images.Media.MIME_TYPE, [...]

Continue Reading

Facebook: Adding age restrictions to Facebook apps

On occasion I build Facebook applications for brands that require age restrictions like 21+.  While this should probably be an option in the Graph API or even in the application control panel, it isn’t, so instead you have to change it using the legacy API.  Luckily this isn’t too bad, just modify a couple of [...]

Continue Reading