Category: Android

MenuInflater NullPointerException (NPE)

I just recently published my first app on Google Play, and after I had published it I was playing with it on my Galaxy S3 and it crashed when I tried to delete a page. I know I had this working correctly on my Nexus 7 prior to publishing it, but I didn’t test it on my phone (shame on me :(). So, I went to work trying to figure out what the problem was, and here’s part of the stack trace:

FATAL EXCEPTION: main
java.lang.NullPointerException
	at com.actionbarsherlock.view.MenuInflater.inflate(MenuInflater.java:109)
	at com.test.app.SomeFragment.onCreateOptionsMenu(SomeFragment.java:1921)
	at android.support.v4.app.Watson.onCreatePanelMenu(Watson.java:55)
	at com.actionbarsherlock.ActionBarSherlock.callbackCreateOptionsMenu(ActionBarSherlock.java:559)
	at com.actionbarsherlock.internal.ActionBarSherlockNative.dispatchCreateOptionsMenu(ActionBarSherlockNative.java:65)
	at com.actionbarsherlock.app.SherlockFragmentActivity.onCreatePanelMenu(SherlockFragmentActivity.java:165)
	at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:446)
	at com.android.internal.policy.impl.PhoneWindow.invalidatePanelMenu(PhoneWindow.java:820)
Read more...

Android Tutorial: Implementing a Drag and Sort ListView with a Database

I’m working on an app and got to the point where I wanted to implement a drag and drop ListView that allows re-ordering, adding and deleting of list items using a database. I didn’t think that it would be all that difficult. However, with my limited experience with Android, it turned out to be a bit of a pain to get working. But, now that I have it working I figured I’d post some example code so that others can take advantage of what I learned and hopefully have an easier time getting this implemented.

My initial searches had me stumble upon DragSortListView (DSLV) by Carl A.… Read more...

Android Tutorial: Implement A Shake Listener

So I’ve been playing around with Android and have a little app that I wanted the user to be able to shake the phone and have something happen. I did some digging and the following is a tutorial on how to setup a shake listener to capture a shake and then do whatever you want.

This is by no means something that I’ve created, I just used examples that I found on stackoverflow.com. Also, this uses G-force to calculate the shake threshold. Many thanks to Peterdk and Akos Cz for their input and answer for this solution. Peterdk recommended using the G-Force app by Blake La Pierre on Google Play Store if you want to get the actual G-force value on your phone and tweak it in the code below.… Read more...

How to Root and Install Android 2.2 (Froyo) and Flash 10.1 on the HTC Droid Incredible

****** If you brick your phone it’s not my fault and I can’t help you!!!
…just needs to be said. 🙂 ******


Special thanks to all the people who’s sites I used to get this put together!

All I have to say is, “WOW! Android 2.2 (Froyo) with Flash 10.1 on the HTC Droid Incredible is now truly INCREDIBLE!” I could go on, but I’ll just let you get started and you’ll find out all the cool stuff about it soon enough!

Final setup consists of the following:

  • Sky Raider 2.5.2 with Flash 10.1 and HTC’s Sense UI
  • Titanium Backup with BusyBox

So August 18th came and went and I, just like thousands of others, was disappointed that there was no Android 2.2 (Froyo) love for the HTC Droid Incredible!… Read more...

HTC “Droid” Incredible Review

My First Impressions

I’ve got my first Android phone and, long story short: I’m loving it.

Why make the switch to Android now? Read on…

I’ve owned WinMo phones forever because I wasn’t willing to switch to another carrier and Verizon hasn’t had a compelling phone to offer until now. Yes, the Moto Droid was a contender but I think it’s ugly and after demoing it in the store a couple times I just didn’t like it. I was waiting for the Nexus One, but the Incredible came out first, has a better camera and a better screen (no multi-touch issues like the N1).… Read more...