An open source and free android library supporting all major navigation apps to get directions and location on several apps.
Note: this isn't another location finder or travel library it only facilitates usage of existing libraries
#How to use You can clone and checkout master branch of this library and use as a library module in your IDE
1- Add jitpack repositories
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
}
Add gradle dependency
<dependency>
<groupId>com.github.pkitools</groupId>
<artifactId>Android-Location-Navigator</artifactId>
<version>{Tag/VERSION}</version>
</dependency>
After setting up the library, have a look at LaunchNavigator
class. It is the facade for all functionality of this library
LaunchNavigator navigator = LaunchNavigator.with(context);
NavigationParameter parameter = NavigationParameter.builder().app(LaunchNavigator.WAZE)
.destination(Position.builder().latitude(Double.toString(locationBox.getLatitude())).longitude(Double.toString(locationBox.getLongitude()))
.build()).build();
navigator.navigate(parameter);
We need network permission to check if you are connected for our Geo and reverse Geo Coding
Navigation parameter is the property sent to '''LocationNavigator''' specifying details of a trip including
- Start Positionand End Position
- Traveling Method
- Navigation App
You can Setup a destination and start position for navigation.
You can add a position based on latitude/longitude, title of place or address of it.
Geocodes will use google maps API to convert an address to latitude / longitude and reverse
By default Geo Coding is enabled you can disable it by calling
LaunchNavigator.withoutGeoCoding()
Supported navigation methods are :
- Drive
- Bicycle
- Walk
- Public transport
- Turn By Turn Turn-by-turn Navigation is a feature of some GPS navigation devices where directions for a selected route are continually presented to the user in the form of spoken or visual instructions. Use this mode to get directions to the address or coordinate specified. Directions are always given from the user's current location. -GEO
You can specify your favourite app in the parameter.
You can get list of apps supported by calling '''getSupportedApps''' Currently we support most of known navigation providers but please feel free to request if your favourite app is not in list
- Google Maps
- Citymapper
- Uber
- Waze
- Yandex Navigator
- Sygic
- HERE Maps
- Moovit
- Lyft
- MAPS.ME
- Cabify
- Baidu Maps
- 99 Taxi
- Gaode Maps (Amap)
List of apps that are installed in user's device and are supported by the library
If you don't specify app, it will show you the app chooser
Android Location Navigator (ALN) is still a baby. I just started it and have a long road to go. It would be much appreciated if any one can help
SonarQube is used for checking quality of code. Please ensure sonarlint plugin is installed in your Android Studio and there is no major or critical quality issues. For now we have very limited number of tests but moving forward we shall have at least 85% coverage. Therefore please make sure your changes are covered in tests
. Please follow java best practices for naming conventions
. make sure all public and protected libraries are documented in a human readable way
. think twice before a pull request
This is the process flow for implementing of a feature:
- Clone project locally
- Generate a branch
- Implement the feature
- Make pull request
- Code review
- Merge
List of QA rules to ensure the code is consistent and reliable Our priorities are:
- Ease of use
- Reusability
- Readability
- Functionality
Please report your genuine bugs using GitHub bugs
- stabilising and testing the app
- improve code quality and test coverage
- add new location providers
- add new features