I\'m getting the below error message from phones that are SDK version < 8. I just released this app on the android market and prior to release my test phones were a HTC Thun
I believe the easiest way to deal with this pesky exception is to just catch it:
@Override
public void showDialog(int dialogId) {
try {
super.showDialog(dialogId);
} catch (IllegalArgumentException e) { /* Log it if you wish*/ }
}
That said, I don't think you're using onCreateDialog()
as the API intended (which is why you were seeing the strange behavior), it should definitely return a dialog object most of the time.