-
Notifications
You must be signed in to change notification settings - Fork 14
Geocaching Field Notes
Since the version 3.2.0, Locus Map offers full access to user's field notes. For this access a system called Content provider is used. You don't have to be too skilled with it. Most of required work is already done in Locus API and you may (and it's suggested) use already pre-prepared functions.
To access field notes in read or write mode, you need
- Installed Locus API in your IDE and added dependency to your new/existing project. More in Installation manual.
- Permission in your AndroidManifest.xml file.
For read only access
<uses-permission android:name=“com.asamm.locus.permission.READ_GEOCACHING_DATA” />
For read/write access
<uses-permission android:name=“com.asamm.locus.permission.WRITE_GEOCACHING_DATA” />
Field notes in Locus are stored in SQLite databases, so all queries sent over Locus API to content provider may be defined in probably well known way for you - same as a query to SQLite database.
What is possible
- GET, INSERT, UPDATE, DELETE queries on FieldNotes
- GET, INSERT, UPDATE, DELETE queries on FieldNote images
To use basic features check FieldNotesHelper.java class.
Here are three very important parts
- static classes that contain names of possible field notes columns. These are used in all specific requests.
- static helper functions for basic operations over content provider. Of course you may write your own functions if you require more specific requests.
- static functions for some other tasks. For example requests on “log certain field notes over Groundspeak Live API”.
Sample call
int count = FieldNotesHelper.getCount(context, lv);
In this basic call, where you get information about number of existing field notes, you need only two things.
- current active context
-
LocusVersion
object, which is already described in our basics here
-
Basics
-
Non-API tools
-
Using API
-
Work with points
-
Work with tracks
-
Integration into Locus Map
-
Other/advanced features