Sending file to Locus Map - asamm/locus-api GitHub Wiki
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.
- Sending generic
VIEWintent
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.
- Sending direct
VIEWintent
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.