Android Open Source - android-whereami Converter






From Project

Back to project page android-whereami.

License

The source code is released under:

GNU General Public License

If you think the Android project android-whereami listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package de.uvwxy.whereami;
//w  w  w. ja  v a2 s  . c o  m
import de.uvwxy.whereami.db_location.Location;

public class Converter {
  public static de.uvwxy.whereami.db_location.Location createLoc(String name, android.location.Location androidLocation) {
    Location b = new Location();

    b.setLatitude(androidLocation.getLatitude());
    b.setLongitude(androidLocation.getLongitude());
    b.setAltitude(androidLocation.getAltitude());
    b.setBearing(androidLocation.getBearing());
    b.setAccuracy(androidLocation.getAccuracy());
    b.setTime(androidLocation.getTime());
    b.setSpeed(androidLocation.getSpeed());
    b.setProvider(androidLocation.getProvider());
    b.setName(name);

    return b;
  }

  public static android.location.Location createLoc(de.uvwxy.whereami.db_location.Location protoLocation) {
    android.location.Location b = new android.location.Location(protoLocation.getProvider());

    b.setLatitude(protoLocation.getLatitude());
    b.setLongitude(protoLocation.getLongitude());
    b.setAltitude(protoLocation.getAltitude());
    b.setBearing((float) protoLocation.getBearing());
    b.setAccuracy((float) protoLocation.getAccuracy());
    b.setTime(protoLocation.getTime());
    b.setSpeed((float) protoLocation.getSpeed());
    b.setProvider(protoLocation.getProvider());

    return b;
  }
}




Java Source Code List

de.uvwxy.whereami.ActionShare.java
de.uvwxy.whereami.ActivityMain.java
de.uvwxy.whereami.Converter.java
de.uvwxy.whereami.ListItemLocationAdapter.java
de.uvwxy.whereami.LocationManager.java
de.uvwxy.whereami.db_location.DBLocationConnection.java
de.uvwxy.whereami.db_location.DBLocationExporter.java
de.uvwxy.whereami.db_location.DBLocation.java
de.uvwxy.whereami.db_location.Location.java
de.uvwxy.whereami.fragments.FragmentCurrentLocation.java
de.uvwxy.whereami.fragments.FragmentSavedLocations.java
de.uvwxy.whereami.fragments.FragmentSettings.java