Updating Corona to use Google Play services instead of old android.location framework

Folks: In a September 2014 forum post, Joshua Quick said Corona Labs had no plans to switch from the old android.location framework to Google Play services. 

It now seems high time to make those plans. Google says the android.location framework that Corona SDK-built apps use is deprecated:

The Google Play services location APIs are preferred over the Android framework location APIs (android.location) as a way of adding location awareness to your app. If you are currently using the Android framework location APIs, you are strongly encouraged to switch to the Google Play services location APIs as soon as possible. 

Can we get an update on this? One reason I’m asking is that my Corona SDK-built app is generating location-related Java crashes, according to Google Play Store beta testing (see below). This was a Galaxy S4 running 5.x. The problem appears to be in Corona’s use of the android.location framework:

 

java.lang.IllegalArgumentException: provider doesn’t exist: network
at android.os.Parcel.readException(Parcel.java:1544)
at android.os.Parcel.readException(Parcel.java:1493)
at
android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:623)
at
android.location.LocationManager.requestLocationUpdates(LocationManager.java:867)
at
android.location.LocationManager.requestLocationUpdates(LocationManager.java:459)
at com.ansca.corona.CoronaSensorManager$1.run(CoronaSensorManager.java:190)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

Hi @corona273,

At this time, this is a low-priority feature for most Corona developers. Plus, it’s not supported on non-GooglePlay devices such as Amazon. If this feature is extremely important to you, please file a feedback request for it, and encourage others to provide votes so we can guage the overall developer demand for it.

Sincerely,

Brent Sorrentino

Brent: Thanks for your quick response!

Though I’d be interested in knowing why you believe “this is low-priority feature for most Corona developers.” I’d say, by contrast, avoiding APIs that are deprecated tends to be a high priority feature for Corona developers. :slight_smile:

An addendum: Even if Corona chooses not to upgrade from the deprecated API, I’d hope you’d fix the current SDK API so it no longer crashes on Android with a “java.lang.IllegalArgumentException”. :( 

It did not crash on my Nexus 5 device but I can send you the Google Play Store crash report for my Galaxy S4 user.

We will need a bug report with code that crashes.  Please produce a test project complete with config.lua and build.settings. Put it in a zip file and use the “Report a bug” link at the top of the page please.

Rob

I also use location awareness in my app, and I didn’t realize the android version that Corona uses is being deprecated until I stumbled across this post. I think a lot of people probably don’t realize that, and if they did, you might see more people requesting it.  

In other words, I don’t think you can gauge its importance based on the number of people requesting it. It wasn’t even a thing on my radar at all until I saw this post.

Dave

Engineering has been very clear, we will not be addressing this because it’s a Google Play only solution and we don’t want to hose the non-Google Play people who are using our map features.  We will not be asking Engineering to consider this until Google gives a remove-by date.

Rob

Hi @corona273,

At this time, this is a low-priority feature for most Corona developers. Plus, it’s not supported on non-GooglePlay devices such as Amazon. If this feature is extremely important to you, please file a feedback request for it, and encourage others to provide votes so we can guage the overall developer demand for it.

Sincerely,

Brent Sorrentino

Brent: Thanks for your quick response!

Though I’d be interested in knowing why you believe “this is low-priority feature for most Corona developers.” I’d say, by contrast, avoiding APIs that are deprecated tends to be a high priority feature for Corona developers. :slight_smile:

An addendum: Even if Corona chooses not to upgrade from the deprecated API, I’d hope you’d fix the current SDK API so it no longer crashes on Android with a “java.lang.IllegalArgumentException”. :( 

It did not crash on my Nexus 5 device but I can send you the Google Play Store crash report for my Galaxy S4 user.

We will need a bug report with code that crashes.  Please produce a test project complete with config.lua and build.settings. Put it in a zip file and use the “Report a bug” link at the top of the page please.

Rob

I also use location awareness in my app, and I didn’t realize the android version that Corona uses is being deprecated until I stumbled across this post. I think a lot of people probably don’t realize that, and if they did, you might see more people requesting it.  

In other words, I don’t think you can gauge its importance based on the number of people requesting it. It wasn’t even a thing on my radar at all until I saw this post.

Dave

Engineering has been very clear, we will not be addressing this because it’s a Google Play only solution and we don’t want to hose the non-Google Play people who are using our map features.  We will not be asking Engineering to consider this until Google gives a remove-by date.

Rob