초보자라 오류가 생겼는데 어떻게 해결해야될지 모르겠습니다...
현제 불러온 사진의 정보에 있는 gps좌표를 추출하여 그좌표를 주소로 바꾸는 것을 하고있는데 아래 코드에 노란색으로 칠해놓은 부분의 배열의 크기가 0인체로 증가하지 않아 주소를 받을수 없는 상태가 반복되고 있습니다.왜 증가하지 않는건지 알려주세요ㅠㅜ
public class Imagepopup extends Activity implements OnClickListener {
tv=(TextView)findViewById(R.id.textView1);
try {
ExifInterface exif = new ExifInterface(imgPath);
showExif(exif);
} catch (IOException e) {
e.printStackTrace();
Toast.makeText(this, "Error!", Toast.LENGTH_LONG).show();
}
}
public String getLocation(double lat,double lng)
{
String addrStr = null;
Geocoder gCoder = new Geocoder(this, Locale.getDefault());
try{
List<Address> addrList = gCoder.getFromLocation(lat,lng, 1);
StringBuilder strBlder = new StringBuilder();
if(addrList.size()>0)
{
}
}
catch(IOException e)
{
System.out.println("IO Exception Occurs\n");
}
tv3.setText(addrStr);
return addrStr;
}
public class GeoDegree
{
private boolean valid=false;
public Float latitude,lonitude;
public GeoDegree(ExifInterface exif)
{
public Float getLatitude() {
return latitude;
}
public Float getLongitude() {
return lonitude;
}
public int getLatitudeE6() {
return (int) (latitude * 1000000);
}
public int getLongitudeE6() {
return (int) (lonitude * 1000000);
}
}
}