Hello,

While testing an app on my N97 and N97 Mini I found out about something quite unlucky.

When getting a new instance of locationprovider with criteria anything other but
Criteria.NO_REQUIREMENT ((int) 0), the getInstance method returns null.
So what I'm saying is, when getting an instance with NO_REQUIREMENT it works fine,
but when setting it to any other than that, no instance is returned.

Is there anything known about this?
Any way to detect device capabilities before allowing a user to set its preferred
powerusage? Or is there something I'm just plain missing in this field.

Code snippet:

Criteria cr = new Criteria();
/*switch (midlet.setting_gpspower)
{
case 0:
cr.setPreferredPowerConsumption(Criteria.NO_REQUIREMENT);
break;
case 1:
cr.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
break;
}*/
cr.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
cr.setHorizontalAccuracy(50);
provider = LocationProvider.getInstance(cr);
if (provider == null)
{

new MyWorldAppAlert(midlet.getDisplay(), "fatal", "Fatal Error", "Provider is null", midlet.getDisplay().getCurrent());
return;
}


Thanks for any replies,

Jasper