I'm trying to get a full open location code from short open location code, what am I doing wrong? I'm using Java Open Location Code -library in my android project.
// 63.7740574, 23.9011008
// This is an full olc (I searched it from web)
// input = "9GM5QWF2+JC";
// This is an short olc (also searched from the web)
// input = "QWF2+JC";
// And this is an olc which is copied to clipboard from google maps application
input = "QWF2+JC Hautala";
boolean isFullCode = OpenLocationCode.isFullCode(input);
boolean isShortCode = OpenLocationCode.isShortCode(input);
if (isFullCode || isShortCode)
{
OpenLocationCode olc = new OpenLocationCode(input);
Double lat = olc.decode().getCenterLatitude(); // Crashes here if we are parsing input to short code
Double lng = olc.decode().getCenterLatitude(); // But doesn't crash if we are using full lenght code
result = new LatLng(lat, lng);
}