Google Play Service Upgrade

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.

  1. 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.

  2. 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'
}

  1. 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

This is the stupidity of the Google Play Services library.

It is constantly changing with each SDK update, and method names come and
go.

Hence why we have a snapshot of it.

Our snapshot, however, is ancient.

We recently had to deprecate API 7 support as Google no longer supports it.

IF you do the legwork to update all the other ODK Collect features to work
with the latest play-services library that is compatible back to 9, I am
comfortable with ending the API 8 (Android 2.2.x) support and ceasing
ongoing updates to it on the main ODK Collect branch.

··· On Sun, Jan 3, 2016 at 8:13 PM, Jon Nordling wrote:

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.

  1. 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.

  2. 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.

https://developers.google.com/android/reference/com/google/android/gms/maps/model/MarkerOptions.html#alpha(float)

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'
}

  1. 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

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

I just pushed an update to ODK Collect that removes the SDK 7 Maps code,
replacing it with the newer Maps v2 fragment. This should simplify
updating the google-play-services layer.

··· On Mon, Jan 4, 2016 at 10:51 AM, Mitch Sundt wrote:

This is the stupidity of the Google Play Services library.

It is constantly changing with each SDK update, and method names come and
go.

Hence why we have a snapshot of it.

Our snapshot, however, is ancient.

We recently had to deprecate API 7 support as Google no longer supports it.

IF you do the legwork to update all the other ODK Collect features to work
with the latest play-services library that is compatible back to 9, I am
comfortable with ending the API 8 (Android 2.2.x) support and ceasing
ongoing updates to it on the main ODK Collect branch.

On Sun, Jan 3, 2016 at 8:13 PM, Jon Nordling jonnordling@gmail.com wrote:

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.

  1. 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.

  1. 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.

https://developers.google.com/android/reference/com/google/android/gms/maps/model/MarkerOptions.html#alpha(float)

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'
}

  1. 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

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com