Home | Random | Downloads | About | Hikes | WebCam | Search | Sitemap | Email | Feed

Catfood Earth for Android 1.20

Catfood Earth for Android 1.20

I recently upgraded to the HTC One which has a transparent notification bar. This makes it hard to see notification icons when using Catfood Earth as your wallpaper, at least in the summer when it's always light at high latitudes and your white icons are displayed on top of polar ice and clouds.

Catfood Earth for Android 1.20 fixes this with an option to paint black under the notification bar. That's the only update other than the latest Xamarin runtime.

Share:

Catfood: Earth for Android

EarthForAndroid

I’ve just released Catfood Earth for Android. It’s my second app created with Xamarin’s excellent toolkit. Being able to develop in C# allowed me to reuse a lot of code from the Windows version of Catfood Earth. The Android version doesn’t include all the same layers (yet) but it’s got the main ones – daytime (twelve different satellite images included, based on NASA’s Blue Marble Next Generation but with some special processing to make them look better), nighttime (city lights, shaded to show nighttime and the terminator between day and night) and a clouds layer that is downloaded every three hours.

My main worry had been that this would suck the phone battery dry, but after a fair amount of optimization it doesn’t even register on the battery consumption list. Grab it now from Google Play ($3.99, Android 2.2 or better).

Share:

Share a picture in MonoDroid

Here’s how to share a picture to Facebook, Twitter and so forth from MonoDroid:

Java.IO.File cache = ExternalCacheDir;
if ((cache == null) || (!cache.CanWrite()))
{
    // no external cache
    cache = CacheDir;
}

Java.IO.File tempFile = new Java.IO.File(cache, "temp.jpg");
using (FileStream fileStream = File.OpenWrite(tempFile.AbsolutePath))
{
    _currentBitmap.Compress(Bitmap.CompressFormat.Jpeg, 85, fileStream);
}

Intent shareIntent = new Intent(Intent.ActionSend);
shareIntent.PutExtra(Intent.ExtraStream, Android.Net.Uri.FromFile(tempFile));
shareIntent.PutExtra(Intent.ExtraText, "Some text - appears in tweets, not on facebook"));
shareIntent.SetType("image/jpeg");

StartActivity(Intent.CreateChooser(shareIntent, "Share Image");

A fun mix of Java and C#. The directory got me to start with so check to see if the ExternalCacheDir is available and if not fall back to the internal CacheDir. Frustratingly Facebook doesn’t pick up on the text associated with an image regardless of the intent ExtraWhatever specified.

Share:

Catfood: WebCams for Android

Catfood WebCams for Android

I’ve just released a WebCam app for Android. It’s based on WebCamSaver but allows you to control the webcam – you tap the edges of the screen to pan, pinch to zoom in and out. A fun little time waster.

This is the first app I’ve released using Xamarin’s MonoDroid framework. This integrates nicely into Visual Studio and allows you to program an Android app in C#. This is fantastic for productivity and code reuse and I enjoyed the process a lot more than previous work I’ve done in Java / Eclipse. The main drawback is that the framework adds around 5MB (significant for mobile) and the documentation isn’t always the best, especially when you search for something and find out you’ve been dumped into iOS reference material. Digging around the sample code and cross-referencing the official Android documentation helps a lot. I’m going to take a stab at something a little more ambitious next…

Share:

I Thought He Came With You

Robert Ellison's Blog

7,250,102,861 people still need to read this blog.

Catfood Earth 3.41

Catfood Earth 3.41