Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.media.ExifInterface;

public class Main {
    public static boolean hasGPSInfo(String path) {

        try {
            ExifInterface exf = new ExifInterface(path);
            float[] latlnt = new float[2];
            exf.getLatLong(latlnt);
            if (latlnt[0] <= 0 || latlnt[1] <= 0) {
                return false;
            }
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
        return true;
    }
}