Skip to content

Sending file to Locus Map

Jiří M. aka Menion edited this page Feb 21, 2019 · 3 revisions

Valid for: API 0.3.6+


The useful method of how to send data to Locus Map application may be over one of many supported file formats.

How to

To achieve this, there are two options.

  1. Sending generic VIEW intent

ActionFiles.importFileSystem() method send common View intent with define Uri to file and it's meta-type into the system, so other applications with registered intent-filter may handle this intent.

  1. Sending direct VIEW intent

It is possible to skip dialog with supported applications and send the request directly to Locus Map app. For this, use ActionFiles.importFileLocus() function, where valid LocusVersion is an additional parameter.

FileProvider

Based on restrictions with access to the filesystem, introduced in Android 4.4, both methods need working FileProvider to correctly share Uri to files. How to setup FileProvider is written here.