User Tools

Site Tools


manual:advanced:locus_api:routing_service

This is an old revision of the document!


Routing service

Basic information

Since version 3.2.0, Locus offer possibility to implement own add-on, that will supply complete routing for Locus navigation. Method is based on Service and communication with Locus is thanks to AIDL interface.

It sounds complicated, but best is to check existing Locus add-on for Offline navigation.

How to

To add your own routing service to Locus, you need to

  • Installed Locus API in your IDE and added dependency to your new/existing project. More in Locus API Installation.
  • Create MyRoutingService extends ComputeTrackService.
  • Register MyRoutingService in AndroidManifest.xml file
        <service android:name=".MyRoutingService"
            android:label="My routing" >
            <intent-filter>
                <action android:name="locus.api.android.
                    ACTION_COMPUTE_TRACK_PROVIDER"/>
            </intent-filter>
        </service>
  • That's all. Locus find your service thanks to defined action parameter and add it to the list of available routing engines. Right below the MapQuest, Yours and others.

Possibilities

RoutingService allows direct integration into Locus. Thanks to AIDL, for users won't be even visible, that they use independent add-on.

What is possible

  • Specifiy basic information - name, attribution
  • Ability to call “Settings” activity directly from Locus
  • Ability to compute track between requested points and return back to Locus full Track with all navigation orders and required information for full voice navigation.
manual/advanced/locus_api/routing_service.1432214439.txt.gz · Last modified: 2015/05/21 16:20 (external edit)