Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added get_route api function & aidl get_position #9304

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

ATMI
Copy link

@ATMI ATMI commented Jun 23, 2020

This extends external api with get_route function which returns current route and also extends aidl api functionality with get_position function to retrieve various positions (current fixed location by now).

*
* @params positionType (int) - type of position to get
*/
boolean getPosition(in int positionType, out APosition position);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New aidl methods must be added to the end of the file or following methods will be broken.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, acknowledged )

@ehermann
Copy link
Contributor

Is there any plan to integrate this merge request? I'm interested in having these features in the API.
If there is something missing in order to merge this pull I can help fixing.

@Chumva
Copy link
Member

Chumva commented Jul 16, 2020

Probably this request will be merged next week. I will check it once more on the weekend and fix some issues.

@ATMI
Copy link
Author

ATMI commented Jul 17, 2020

Hello! Yes, I am going to do it but was little bit busy in school with all that documents to get into next class. I have already made one more feature (getting of route creation time (ID)) and I think today I will do

@ATMI
Copy link
Author

ATMI commented Jul 18, 2020

Have made all the changes, ready to pull

@vshcherb vshcherb requested a review from max-klaus July 20, 2020 11:32
Copy link
Contributor

@ehermann ehermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wouldn't be better to have the route command as an api call?
And also a ADirectionInfo type already exists, so adding a new offset attribute and return a list of ADirectionInfo instead of a list of Integer sounds better to me.

@vshcherb
Copy link
Member

this request is probably going to be merged soon, so please don't add any extra methods which could be included in another request.

@vshcherb vshcherb added this to the 3.8 milestone Jul 22, 2020
@@ -1344,6 +1344,19 @@ public boolean getRoutePoints(List<ALatLon> route) {
return false;
}

@Override
public String getApplicationMode() {
Copy link
Contributor

@ehermann ehermann Jul 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getApplicationMode can be misleading. Unless I'm wrong you are not getting the current application mode, but the application mode at the moment the route was created.
If you are interested in getting the current application mode, maybe creating a generic function getSettings that is somewhat symmetrical to the setCustomization can be an alternative.

*/
String getApplicationMode();
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be refactored into 3 differnet methods:

  1. getCalculatedRoute - information about calculated routes, geometry, appmode, time, etc
  2. getApplicationMode - current app mode
  3. getNavigationStatus - progress, currentSegment, leftDistance, leftTime, etc

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in latest commit

@vshcherb vshcherb removed this from the 3.8 milestone Jul 30, 2020
import android.os.Parcel;
import android.os.Parcelable;

public class APosition implements Parcelable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. APosition > ALocation
  2. ALocation immutable
  3. ALocation extends AidlParams
  4. positionType > locationType and it should be explained in the method's description

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in latest commit

@vshcherb vshcherb added this to the 3.9 milestone Aug 14, 2020
@vshcherb vshcherb removed this from the 3.9-android milestone Dec 15, 2020
@vshcherb vshcherb modified the milestones: 4.0-android, future-android Dec 15, 2020
@vshcherb vshcherb closed this Dec 31, 2020
@ATMI
Copy link
Author

ATMI commented May 31, 2021

Can I know the reason the pull request wasn't merged

@vshcherb vshcherb reopened this Jun 1, 2021
@vshcherb
Copy link
Member

vshcherb commented Jun 1, 2021

It has conflicts (now) with OsmandAidlServiceV2.java and we've just lost initiator of this request. Cause there was no info around, we decided it's not needed.

Probably you agree: any code needs a user otherwise there is always a price for something that nobody needs.

ntruchsess pushed a commit to ntruchsess/Osmand that referenced this pull request Apr 9, 2024
aidl method stub to get location

aidl output parameter as parcelable

APosition constructor params order fixed

Order of AIDL methods rearranged; Added getCurrentRouteSegmentIndex() & getRouteCreationTime();

get rid of duplicate class LatLonParcelable, use ALatLon instead; added getRoute() aidl api method; added getRoutePoints()  aidl method

getApplicationMode() aidl method added

Refactored due to osmandapp#9304 (comment) && osmandapp#9304 (comment)
ntruchsess pushed a commit to ntruchsess/Osmand that referenced this pull request Apr 9, 2024
aidl method stub to get location

aidl output parameter as parcelable

APosition constructor params order fixed

Order of AIDL methods rearranged; Added getCurrentRouteSegmentIndex() & getRouteCreationTime();

get rid of duplicate class LatLonParcelable, use ALatLon instead; added getRoute() aidl api method; added getRoutePoints()  aidl method

getApplicationMode() aidl method added

Refactored due to osmandapp#9304 (comment) && osmandapp#9304 (comment)
ntruchsess pushed a commit to ntruchsess/Osmand that referenced this pull request Apr 9, 2024
aidl method stub to get location

aidl output parameter as parcelable

APosition constructor params order fixed

Order of AIDL methods rearranged; Added getCurrentRouteSegmentIndex() & getRouteCreationTime();

get rid of duplicate class LatLonParcelable, use ALatLon instead; added getRoute() aidl api method; added getRoutePoints()  aidl method

getApplicationMode() aidl method added

Refactored due to osmandapp#9304 (comment) && osmandapp#9304 (comment)
ntruchsess pushed a commit to ntruchsess/Osmand that referenced this pull request Apr 9, 2024
aidl method stub to get location

aidl output parameter as parcelable

APosition constructor params order fixed

Order of AIDL methods rearranged; Added getCurrentRouteSegmentIndex() & getRouteCreationTime();

get rid of duplicate class LatLonParcelable, use ALatLon instead; added getRoute() aidl api method; added getRoutePoints()  aidl method

getApplicationMode() aidl method added

Refactored due to osmandapp#9304 (comment) && osmandapp#9304 (comment)
ntruchsess pushed a commit to ntruchsess/Osmand that referenced this pull request Apr 9, 2024
aidl method stub to get location

aidl output parameter as parcelable

APosition constructor params order fixed

Order of AIDL methods rearranged; Added getCurrentRouteSegmentIndex() & getRouteCreationTime();

get rid of duplicate class LatLonParcelable, use ALatLon instead; added getRoute() aidl api method; added getRoutePoints()  aidl method

getApplicationMode() aidl method added

Refactored due to osmandapp#9304 (comment) && osmandapp#9304 (comment)
ntruchsess pushed a commit to ntruchsess/Osmand that referenced this pull request Apr 10, 2024
aidl method stub to get location

aidl output parameter as parcelable

APosition constructor params order fixed

Order of AIDL methods rearranged; Added getCurrentRouteSegmentIndex() & getRouteCreationTime();

get rid of duplicate class LatLonParcelable, use ALatLon instead; added getRoute() aidl api method; added getRoutePoints()  aidl method

getApplicationMode() aidl method added

Refactored due to osmandapp#9304 (comment) && osmandapp#9304 (comment)
ntruchsess pushed a commit to ntruchsess/Osmand that referenced this pull request Apr 10, 2024
aidl method stub to get location

aidl output parameter as parcelable

APosition constructor params order fixed

Order of AIDL methods rearranged; Added getCurrentRouteSegmentIndex() & getRouteCreationTime();

get rid of duplicate class LatLonParcelable, use ALatLon instead; added getRoute() aidl api method; added getRoutePoints()  aidl method

getApplicationMode() aidl method added

Refactored due to osmandapp#9304 (comment) && osmandapp#9304 (comment)
ntruchsess pushed a commit to ntruchsess/Osmand that referenced this pull request Apr 10, 2024
aidl method stub to get location

aidl output parameter as parcelable

APosition constructor params order fixed

Order of AIDL methods rearranged; Added getCurrentRouteSegmentIndex() & getRouteCreationTime();

get rid of duplicate class LatLonParcelable, use ALatLon instead; added getRoute() aidl api method; added getRoutePoints()  aidl method

getApplicationMode() aidl method added

Refactored due to osmandapp#9304 (comment) && osmandapp#9304 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants