-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
base: master
Are you sure you want to change the base?
Conversation
* | ||
* @params positionType (int) - type of position to get | ||
*/ | ||
boolean getPosition(in int positionType, out APosition position); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, acknowledged )
Is there any plan to integrate this merge request? I'm interested in having these features in the API. |
Probably this request will be merged next week. I will check it once more on the weekend and fix some issues. |
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 |
… & getRouteCreationTime();
Have made all the changes, ready to pull |
There was a problem hiding this 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.
…ed getRoute() aidl api method; added getRoutePoints() aidl method
this request is probably going to be merged soon, so please don't add any extra methods which could be included in another request. |
@@ -1344,6 +1344,19 @@ public boolean getRoutePoints(List<ALatLon> route) { | |||
return false; | |||
} | |||
|
|||
@Override | |||
public String getApplicationMode() { |
There was a problem hiding this comment.
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(); | ||
} |
There was a problem hiding this comment.
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:
- getCalculatedRoute - information about calculated routes, geometry, appmode, time, etc
- getApplicationMode - current app mode
- getNavigationStatus - progress, currentSegment, leftDistance, leftTime, etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in latest commit
import android.os.Parcel; | ||
import android.os.Parcelable; | ||
|
||
public class APosition implements Parcelable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- APosition > ALocation
- ALocation immutable
- ALocation extends AidlParams
- positionType > locationType and it should be explained in the method's description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in latest commit
Can I know the reason the pull request wasn't merged |
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. |
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)
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)
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)
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)
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)
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)
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)
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)
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).