Maybe Microsoft is doing it right. Or maybe they're not.

Dell Venue Pro, running Windows Phone 7.5

Since I first began seeing concepts of Windows 8 I kept thinking, huh, maybe Microsoft is onto something here. Despite being both an Android and an iOS fanatic, I have been impressed with the Windows Phone OS since trying out Windows Phone 7.5 from Dec 2011 - March 2012 on an extra Dell Venue Pro my dad had available. The hardware was...a brick... to put it nicely, but the OS itself was excellent. 

Over the last 18 months I've found myself continuously (and to my friends' amusement) defending Windows Phone as a viable mobile operating system, and, as an extension, defending Windows 8. I've gushed over the Lumia 920, HTC 8X, and now the Lumia 1020. I almost bought all three of these devices on numerous occasions (just ask Dru). While I maintain that Windows Phone is a great OS, I'm coming to terms with the idea that maybe Microsoft isn't doing it right and that they did in fact jump the gun on the idea of the convergence of the desktop and the mobile experience. Since MS's release of Windows 8 there's been talks of how revolutionary and visionary it is. Ahead of its time. Some referred to it as showing that Microsoft had not only caught up to Apple and Google, but far surpassed their ability to deliver innovative products that end users didn't even know they wanted until they tried it (take the iPad for example).

Well, after a year of saying to myself, yeah, maybe they did get it right, maybe Windows 8 isn't as radical as all the critics say, maybe we will all be using touchscreen desktop computers in a couple years, I'm now saying maybe not

The truth is that the people don't want the same experience on a tablet as they have on their desktop or laptop. Sure, they like familiarity, but at the core a user's interaction with a tablet and user's interaction with a desktop computer is just different. And people are fine with that. The design of an application on the desktop environment is (and should be) vastly different than the tablet and the phone representations of that same application. Probably one of the best examples of this is the Day One app for iPhone, iPad, and Mac. Ask any active Day One user if they'd like to combine either the iPhone and iPad experience or the iPad and Mac and they'd look at you like you were crazy.

Day One for iPhone, iPad, and Mac

Further evidence that people just don't want to merge desktop computing and mobile computing... look at this Acer commercial comparing their 8" Windows tablet to the iPad mini. This is my opinion, and I bet some Windows 8 fans view this commercial as a win for Acer and Windows 8 Pro, but firstly, who wants to play Halo on a tablet (not that they even look like they're actually playing...)? Don't get me wrong, I love iPad games... Plants vs. Zombies vasebreaker endless mode... that'll keep me busy for HOURS. But I don't really care for the idea of getting a dumbed down PC gaming experience on my iPad. Maybe if the entire game was reimagined for iPad, and it really was just a distant relative of Halo, but the ability to run full-fledged PC games on a tablet just doesn't do much for me. Okay, next flaw in the video, of all the things you can do on a tablet, why show someone accepting changes to a Word doc? I mean, seriously, of all the things I've used a tablet for (thinking my Kindle Fire, Nexus 7, and iPad), I have never once wanted to accept changes to a reviewed Word doc. And if I did, I wouldn't want to be using the traditional Word app to do it (see all those tiny touchpoints?!).

UPDATE: I hadn't done my research on Halo Spartan Assault, and it looks like it very much is  the Halo experience reimagined for touch. That's cool. What I was trying to get at is the idea of playing traditional PC games on a tablet running Windows 8 Pro.

What I'm getting at (and have probably repeated 20 times by now) is that I no longer believe that we are heading in the direction of an integrated desktop and mobile computing environment. Those who never got on the Windows 8 bandwagon are probably thinking, yeah, knew that all along. But for those who have seriously entertained the idea of everything converging into a single, universal experience, either the timing is wrong or the implementation is wrong. Either way, maybe Microsoft isn't doing it right after all.

Twitter Share - Android

Been working on a twitter share using the ACTION_SEND intent rather than the more cumbersome Twitter APIs. [css]

// Call find twitter client to get the twitter clients to post to 
Intent shareIntent = findTwitterClient();
shareIntent.putExtra(Intent.EXTRA_TEXT, "test");
startActivity(Intent.createChooser(shareIntent, "Share"));

findTwitterClient will call this method, which will search the phone for various Twitter clients, and launch the tweet through the first client it successfully matches:

public Intent findTwitterClient() {
final String[] twitterApps = {
// package // name - nb installs (thousands)
"com.twitter.android", // official - 10 000
"com.twidroid", // twidroid - 5 000
"com.handmark.tweetcaster", // Tweecaster - 5 000
"com.thedeck.android" }; // TweetDeck - 5 000 };
Intent tweetIntent = new Intent();
tweetIntent.setType("text/plain");
final PackageManager packageManager = getPackageManager();
List<ResolveInfo> list = packageManager.queryIntentActivities(
tweetIntent, PackageManager.MATCH_DEFAULT_ONLY);

for (int i = 0; i < twitterApps.length; i++) {
for (ResolveInfo resolveInfo : list) {
String p = resolveInfo.activityInfo.packageName;
if (p != null && p.startsWith(twitterApps[i])) {
tweetIntent.setPackage(p);
return tweetIntent;
}
}
}
return null;
}

Use LogCat to Debug for Android

To use LogCat you need to import the Log library in the java code import android.util.Log;

Then, where you would normally print something, replace “System.out.println(“HERE”);” with:

Log.d(“LOGCAT”, “HERE”);

Now when you run your app on the emulator or a device it'll print out to logcat, which can be viewed right in Eclipse (might need to go to Tools and click LogCat or something similar) or in the terminal in the directory where the android sdk has been installed, in the <sdk>/platform-tools/ folder.

Run adb logcat from that directory location to view the logs.

This prints out a log of everything that's happening, so if it's on the phone there's probably going to be a lot of stuff going on continuously, which is why it's helpful to use good tags so you can just browse or search for "LOGCAT" and you'll find what you're looking for.

Android Thoughts

Recently a friend decided to upgrade from an Android device to an iPhone 4s. I commented on her facebook post:

You're crossing to the dark side??

Kyle youll be back to the dark side iphone is taking over the world!!!! and i want to be on team apple when that happens.

Touche. can't argue. iphone is by far the best. Android is decent but given iOS and apple hardware as an alternative it's almost a no brainer. unless windows phone 8 makes a splash...

Someone else chimes in:

Almost a no-brainer... but not quite. Compared to budget Android devices, the iPhone is definitely superior. But there is literally no hardware spec on the iPhone that isn't matched or beaten by higher end Androids. If you favor features over price point, it comes down to preference, not superiority. The user experience on Android 4.0 is absolutely amazing, and the open source nature of Android puts it light years ahead of iOS in terms of development opportunities.

Again, it's about preference. iOS is clean, simple, and beautiful. Android is powerful, customizable, and versatile. It's all about what you're looking for in a phone. But let us be wary of granting to Apple some of these unearned superlatives.

My latest thoughts on Android:

I haven't used Android 4.0, but given the improvements between 2.2, 2.3, 3.0, and similarly positive and 'groundbreaking' reviews for 4.0, I can't imagine it being something I get too excited about. I switched from an iPhone 4 to Android (dual core Motorola Atrix) for many of the reasons listed but have ultimately been let down.

Google delivers power, customizability, and a sense of freedom on Android devices, however I find the power comes with some catches - weak battery life, unexpected FCs, laggy display (WHY?? the Atrix's processor should kill the iphone 4). The customization options are confusing and inconsistent across different hardware makers. Even having developed two Android apps, I haven't seen (or maybe just haven't utilized) any features that I feel are compelling. Lastly, the freedom I feel due to the open source nature of Android is refreshing, but honestly, I'd be fine giving up this flexibility for a superior WP7 or iOS device.

To me, bottom line is the Android ecosystem is discombobulated and inconsistent. It's a decent OS and beats any feature phone on the market, but having seen both Android and iOS up close and personal, I'm ready to switch back to iOS or try something new in WP7/WP8.

Candy Jar Estimator Launches

unnamed

Yesterday Bryce (my business partner) and I launched "Candy Jar Estimator" on the Android Market.  It's designed to help you win candy guessing competitions - it takes your candy, the jar type, any custom jar measurements, and computes the expected number of candies in the jar.  Basically it means automatic WIN if you use it the next time a candy estimating competition rolls around at work, church, holiday festivities, etc.  so... it's pretty awesome.

Anyway we've also entered our app in the BYU mobile app competition.  The competition runs through November 16 and there are several prizes that we could potentially take home, including $6000 grand prize, $3000 judge's prize, and a local company's choice: brand new iPads for all team members.  If you'd like to help our team out here a few things you could do.

unnamed
  1. If you have an Android phone, download the app (yes it costs a dollar), l eave a 5 star rating and a SUPER AWESOME comment.
  2. Tell your Android friends to download it and leave some awesome reviews for us.  Say "my brother is entering his android app into BUY's mobile app competition. check...it...OUT! http://bit.ly/tmlitR" (and then make sure they download it and not just look at it)
  3. Even if you don't have an Android, you can help us by +1-ing our app on the Android Market. go here (http://bit.ly/tmlitR) and click the +1 button on the top right of the screen.

The biggest help will probably be sharing, so if you want to tweet it, Facebook it, or blog it that would be very helpful.  Also - if you have friends that are big blogger's a little spotlight from their blog goes a LONG way.

Available in Android Market

Using LogCat in NetBeans

The best way to debug in Android is to use LogCat.  I've yet to figure out an easy way to do this though -- using NetBeans -- but it can be done.  LogCat should be installed with your Android SDK and AVD (android virtual device) kits, however the problem is that NetBeans doesn't display logcat in a "console"-like format.  I was looking at this tonight and figured out how you can still get your LogCat printout -- it just prints straight to a text file and not in a nice built-in display window like Eclipse has.
USING LOGCAT IN NETBEANS
1) First, you'll have to add the adb tools path the Windows global variable (if you're on a mac you'll have to google how to do this).  See http://www.shahz.net/android/adb-installation-and-how-to-logcat.html
2) Then, whenever you run your app and it crashes (or anytime you want to debug), open the command prompt and enter:
adb logcat -v time > logcat.txt
This will create a file in the current folder with the current LogCat logs.  You'll have a lot of stuff in there so it's important that you've used LogCat properly in your code so that you know what to look for.  Run "start logcat.txt" to take a look.
3) To to use LogCat in your code you'll first need to import the Log library:
import android.util.Log;
Then, down where you would normally print something out, you'll replace "System.out.println("HERE");" with:
Log.d("LOGCAT", "HERE");
4) Now, run the logcat command again, then open the text file with the start command:
adb logcat -v time > logcat.txt
start logcat.txt
5) Now, use CTRL-F "LOGCAT" to look through all your LOGCAT debugging statements.
Also - If your app is crashing try searching for "E/AndroidRuntime"... this will take you to the information on what caused the error.
I know it's a little complicated, but it works!  And it'll let you debug crash errors too.  The problem with using toasts for debugging is that the app may crash before you ever reach the toast.  Which... ends up not really helping you at all.  So if you can bear the pain of these steps for your debugging, it should help out a lot!   And if you find a better way to use LogCat in NetBeans please let me know.  It would be awesome if they let you view the LogCat logs directly in NetBeans.  Man that would be sweet.  Good luck!
Let me know if you find any mistakes with the info above.

Android Toast Example

Android lets you "toast" a display message that pops up on top of the current window. This usually occurs on some condition and is generally simple in nature, something like "OK", or "File submitted", etc. The code below can be plugged into any android class to launch a toast.

    Toast toast = Toast.makeText(getApplicationContext(), "Invalid Parameter", Toast.LENGTH_SHORT);
    toast.show();

This bit of code will launch a short toast that displays the text "Invalid Parameter". The length of the toast is 2 seconds, and can be changed to a longer 3.5 second toast by changing the duration(Toast.LENGTH_SHORT) to Toast.LENGTH_LONG.

Toast away!

So excited I can't sleep

Seriously, I can't sleep.  I'm sitting here in Eclipse messing with these layouts and getting stoked for the BYU Mobile App Competition.  A partner and I are developing a super awesome Android app that is going to be a blast.  Too bad I can't say what it is yet.  But, in about three weeks we should be ready to push it out.  We're under way right now and will be working on it as much as possible to get it ready for the competition. Man, I feel like saying more but I guess I won't for now.  People could be out there snatching up our idea as we speak.  That sucks.  But believe me once it's out there I'll be all about spreading the news.  The cool thing is that this app has never been done before on Android, it's a fresh market!  There's one on the iOS app store, but it's lame.  Maybe we'll try xcode and iphone development if this goes well.

Here's how the BYU mobile app competition works:

  • Teams of 1 to 4, with at least one member a current BYU student
  • Build your app for Android, iOS, WP7, or Blackberry
  • Release it to the Market/App Store November 2-16
  • Cash prizes as follows:
  • Grand Prize: $6,000
  • Analytics 1st Place: $3,000
  • Judged 1st Place: $3,000
  • Analytics 2nd Place: $1,500
  • Judged 2nd Place: $1,500
  • Audience Choice: All team members will be awarded with an iPad 2 (or 3). This award will be based on audience input at the final event
Basically there's a grand prize, a first and second for most popular based off the analytics, and a first and second based off the judge's opinions.  Then there's iPad prizes for audience choice.  So there's a good chance of winning something if you have a good idea, successful implementation of that idea, and a killer marketing strategy.  Assuming we get the product we want we're going to spread the word like wildfire.  I'm talking BYU, UVU, Utah State booths, and spreading the word all across the map... up in Washington, back in Georgia, Michigan, out in Hawaii.   I'm pumped about the whole project.
In other exciting news, Mango's came out yesterday, the $250 Amazon tablet is being announced today, and iPhone 5 is set to come out in less than a week.  This is huge!  I want an Amazon Kindle Fire tablet (or whatever it's going to be called) already.

Do number of installs spike when you publish a new version to the Android Market?

I just published a new release (the first update) of Cow Tipping (http://market.android.com/details?id=com.kyleclegg.cowtipping).  Just in the time since the update 36 hours ago the stats are saying that the number of installs has increased about 50 times it's normal rate.  Seriously... it's averaged like 10 or 20 a day and yesterday there were about 500.  WHY?!?  Are these (a) new downloads or (b) a combination of new downloads and reinstallations of the latest version by existing users?  Seems like an enormous spike. Is there anything that would affect the number of installs around the time you publish a new version?

Don't know the answers to these questions.  Someone out there might.

Cow Tipping on the Steady Rise

Cow Tipping has been live on the Android Market for a month and a half now!  It's been pretty exciting to see it happen.  Granted, it's my first app and it's extremely simple, but I'm happy with it.  The app's making about a quarter a day now in admob ads and has almost 2500 downloads, 36% retention.  Trying to push out an update - possibly tonight - when I get to it.

Notes on some features to add:

  • Back button - from finished gameplay
  • Hint - for new users
  • Size Optimization - drop from 3.6 MB to under 2.0 MB
  • New finishing messages
  • Sheep - to distract from tipping the cows
  • Levels with different objectives, background, etc.

Any suggestions?  How can I make it something worth using?

New Changes

A couple new changes for me.  Things might get crazy.

First, as you can see, this blog now houses google adsense text ads. Your first response - jerk, sellout, shmuck. Right? Relax. This blog is my testing zone for wp junk so don't have a cow if I do something stupid.  Just consider it as having done the web a favor- one less rookie mistake for the next time around if I screw something up.  I think they look pretty good, actually.

The next new thing is that I am now running Android! Switched from iphone to Motorola Atrix and boy it is sweet. I feel empowered. Take that Jobs. This little guy is now my testing ground for my Cow Tipping app and anything else I get into this summer.

One last thing- posting this from Wordpress for Android. Android fo' lyfe.

ERROR: the user data image is used by another emulator. aborting

Got this error message after I restarted my system following an install prompt for another program (did not shut down the emulator first): "ERROR: the user data image is used by another emulator. aborting."  I fixed it, but had to try a couple different things.  Suggestions:

  1. If the Emulator is open, restart it
  2. If the Emulator is not opened (my case) try Run configurations > Target > Wipe user data > Run
  3. Another way to try "Wipe user data" is to click the Android SDK Manager icon in Eclipse, click the AVD you want to start, make sure you check wipe user data, then Launch.

Number 3 worked for me.

Android requires compiler compliance level 5.0. Please fix project properties.

In our Android mobile development class we constantly work on projects as a class and then Dr. Liddle sends us the updated zip containing the project to review after our in-class additions.  For some reason today I'm having some issues importing the Android project into Eclipse.  Problems and fixes below. Problem #1: Android requires .class compatibility set to 5.0. Please fix project properties.

Solution: 1. Fix project: Package Explorer -> Right click the project -> "Android Tools" -> "Fix Project Properties" 2. Restart Eclipse: "File" -> "Restart"

Problem #2: The following error appears many times The method xyz() of type ABC must override a superclass method

Solution: Package Explorer -> Right click the project -> "Properties" -> "Java Compiler" -> "Compiler Compliance Level" = 1.6

Problem #3: The import android.net.http.AndroidHttpClient cannot be resolved

Solution: Package Explorer -> Right click the project -> “Properties” -> "Android" -> "Project Build Target" = 2.3.3

Note: Also try Clean (On Windows: Project -> Clean) then Refresh (F5) at random.  There's a good chance this will magically solve all your problems.