Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9199687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:35:29+00:00 2026-06-17T22:35:29+00:00

I am developing an Android Application which retreives the Location and sends this to

  • 0

I am developing an Android Application which retreives the Location and sends this to a OData Server via Restlet [1]

In Android the Location sets Longitude and Latitude as double.

double lat = location.getLatitude();

My Restlet / OData Service:

public class LatLoc {

  private double latitude;

  public void setLatitude(double latitude) {
    this.latitude = latitude;
  }
}

The OData $metadata:

<EntityType Name="locations">
    <Property Name="latitude" Type="Edm.Double"/>

The method responsible to add a Entity: (GeoService is the class handeling the Restlet connection and implements the method addEntity() )

public class LocTrans {
  GeoService proxy = new GeoService();
  void sendLoc(Location location) throws   Exception, Throwable {
    LatLoc locSend = new LatLoc();
    locSend.setLatitude(location.getLatitude());
    System.out.println("Lat")
    proxy.addEntity(locSend);
  }
}

The println shows a ‘normal’ Latitude in form XX.XXXXXXXXXXX (with at least 6 digits after the ‘.’)

But the server receives a Latitude like XX.XXX; so only with 3 digits after the decimal point.

The documentation of Restlet staits, that Edm.Double and the primitive datatype double arer equivalent.

Where is my error, that the double values are cut off while being send to the server?

[1] http://wiki.restlet.org/developers/172-restlet/267-restlet/271-restlet.html

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T22:35:30+00:00Added an answer on June 17, 2026 at 10:35 pm

    Sad answer: I haven’t found a solution to the Restlet problem.

    I am using odata4j now, and this works.

    void sendLocation(Location location, UUID uuid) throws Exception {
       OEntity newLocation = c.createEntity(entitySet)
         .properties(OProperties.guid("trackID", uuid.toString()),
         OProperties.double_("latitude", location.getLatitude()),
         .execute();
    

    }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an Android application which sends content to a server using rest web
I am developing a Android application which communicates with a PHP server via JSON.
I have been developing an Android application which sends NDEF messages via Android Beam
I have been developing an Android application which sends NDEF messages via Android Beam
I'm developing an android application which requires background updates of my location . I
I'm developing an android application which uses web service to get data from server,
I am developing android application which requires user to Login. This application relies on
I am developing an android application in which i struggled with this thing, Need
I am developing an android application which receiving the video stream from a server.
I'm developing an android application which deals with capturing location coordinates with GPS. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.