Hi,
Jon from GeoODK here...
Hope all is well, I have been working on developing some spatial
functionality into ODK Collect, the geotrace, geoshape widgets. I am just
about done, will submit a pull request when its all done, hopefully you
will find the widgets worthy for trunk.
One of the main features that I am working on is the ability to load KML's
and GeoJSON into the mapping widgets.
There are a few things I wanted to ask that are not clear to me.
-
The KmlLayer and GeoJSON layer types are available to leverage in
the Google Maps Android API Utility Library (link below), however it
requires a minimum SKD build of 9.
https://developers.google.com/maps/documentation/android-api/utility/?hl=en
I just wanted to check if ODK is planning to support 8 and for how long? Im
not sure what the usage is that far back. -
Note: just for testing I upgraded the SDK min build to 9 so I could try
out these layer types.... When attempting to load a KMLLayer into map
(which is a very straight forward implementation). You pretty much just
point it at a file and Google maps rendering engine does the rest.
I kept getting all types of errors like "can not find method getAlpha()"
for the MarkerOptions object, these object are part
com.google.android.gms.maps.GoogleMap package.
When I looked closer at the object that was link with collect, it did not
contain these "newer" functions like "getAlpha()" so it makes sense why the
Google Maps Android API Utility Library was not working.
So I started to dig, and dig and dig, I finally found the issue, it was
that collect uses a snapshot of google play servers
hosted http://cwe.cs.washington.edu:8082/artifactory/libs-snapshot/ which
is specified in the gradle file with Maven.
I wanted to check to see if there was a reason why we are hosting a
snapshot and would it be posible to replace that by including the google
play services in gradle, something like this?
dependencies {
compile 'com.google.android.gms:play-services:8.4.0'
}
- When I removed the the collect google play snapshot and include the GSM
services with gradle. Things were working "smother" but found some errors
with libs that are include with the collect app, like the google drive api.
The one that is backed into the app in the libs folder does not work with
the latest google play service, it seems that some methods have changed
names. This also makes sence because the google in the libs folder are the
ones that will work with the GSM snapshot that we are using.... Similar
question as 2. I was also wondering it it is posible to remove these
google play service from the libs folder and include them in the gradle
file, it would probably make maintaining the library build easier to
upgrade.
I think it would look something like list for each of the libs,
dependencies {
compile 'com.google.apis:google-api-services-drive:v2-rev197-1.21.0'
}
Thanks in advance for your reply, I hope everyone is doing well.
Im really looking forward to submitting these geo widgets, please let me
know if you have any in site on the issue above.
Jon