Google IAP v2 expiration warning message when using IAP v3

When I tried to move our app over to Enterprise (Android), I’m getting a warning dialog about the Google IAP v2 library being expired and to move to IAP v3.  Our app has been on IAP v3 for a while now (SDK build) so I don’t know why this error message is coming up.  I have the latest Google IAP .jar file in my /lib directory (from Enterprise build 2015.2697) and I didn’t see anything out of place in my AndroidManifest file, but maybe I missed something obvious since I’m somewhat new to Enterprise builds?

Any help would be appreciated!

For some reason I can’t upload the screenshot, so here’s the error message text:

"store.* library removed on Android

Due to Google removing In-App Billing Version 2 in January 2015, the Corona store.* library on Android is no longer active.

Please migrate to the Google IAP v3 plugin.

See our IAP Guide for more info."

Here is what one of the Engineers had to say:

That Google v2 warning will happen if you call store.init(“google”) instead of using our v3 plugin.  The “build.settings” file is not supported on Android for Corona Enterprise, meaning that all of the plugin settings (as well as all other settings) in that file are ignored.  He’ll need to download our plugins from our “Corona Enterprise” daily build page and integrate the v3 plugin into his native Android app project.

So make sure you have the right app store plugin. Make sure you’re requiring and initing the library correctly.

Rob

Thanks for the reply. After digging into the code, I found the issue.  Even though I was running the app on a device, system.getInfo(“targetAppStore”) was returning " none" and bypassing the correct v3 store initialization.  Is that a bug or just a quirk of running the app in Enterprise/native?

>> Even though I was running the app on a device, system.getInfo(“targetAppStore”) was returning " none" and bypassing the correct v3 store initialization.  Is that a bug or just a quirk of running the app in Enterprise/native?

It’s not a bug.  You just haven’t configured Corona which store you want to target.  In the Corona Simulator’s build dialog, you would normally select the store you want to target… but you don’t have that option when building via Google’s Android SDK.  :slight_smile:

To set the “targetAppStore” for Corona Enterprise builds, you need to add the following to your “AndroidManifest.xml” file…

\<manifest\> \<application\> \<!-- Add this meta-data tag within your "application" block. --\> \<!-- You can set the value to "google", "amazon", or whatever you want. --\> \<!-- system.getInfo("targetAppStore") will return whatever this value's string. --\> \<meta-data android:name="targetedAppStore" android:value="google"/\> \</application\> \</manifest\>

Thanks Josh for the info!  While this solves the issue in this post, it does make me a bit anxious about whether or not I’m missing any additional pieces of the native build puzzle that Corona usually takes care of.  Are there any other flags that I should worry about that aren’t covered in the quick start tutorials and sample apps?

The most important detail is that the “build.settings” file is ignored for native Android builds.  So, whatever you are doing in that file, you’ll need to duplicate according to Google’s documentation in the AndroidManifest.xml file.  Such as orientation, permissions, version code, package name, etc.

The Corona app icons are ignored too.  You’ll have to create Android “launcher” icons under your project’s “res/drawable*” directories according to Google’s documentation as well.

For first time native Android SDK developers, I usually tell them to play around with Google’s Android sample project’s first to get a feel for how to set up and build an Android application project.  That helps people learn the fundamentals.

Here is what one of the Engineers had to say:

That Google v2 warning will happen if you call store.init(“google”) instead of using our v3 plugin.  The “build.settings” file is not supported on Android for Corona Enterprise, meaning that all of the plugin settings (as well as all other settings) in that file are ignored.  He’ll need to download our plugins from our “Corona Enterprise” daily build page and integrate the v3 plugin into his native Android app project.

So make sure you have the right app store plugin. Make sure you’re requiring and initing the library correctly.

Rob

Thanks for the reply. After digging into the code, I found the issue.  Even though I was running the app on a device, system.getInfo(“targetAppStore”) was returning " none" and bypassing the correct v3 store initialization.  Is that a bug or just a quirk of running the app in Enterprise/native?

>> Even though I was running the app on a device, system.getInfo(“targetAppStore”) was returning " none" and bypassing the correct v3 store initialization.  Is that a bug or just a quirk of running the app in Enterprise/native?

It’s not a bug.  You just haven’t configured Corona which store you want to target.  In the Corona Simulator’s build dialog, you would normally select the store you want to target… but you don’t have that option when building via Google’s Android SDK.  :slight_smile:

To set the “targetAppStore” for Corona Enterprise builds, you need to add the following to your “AndroidManifest.xml” file…

\<manifest\> \<application\> \<!-- Add this meta-data tag within your "application" block. --\> \<!-- You can set the value to "google", "amazon", or whatever you want. --\> \<!-- system.getInfo("targetAppStore") will return whatever this value's string. --\> \<meta-data android:name="targetedAppStore" android:value="google"/\> \</application\> \</manifest\>

Thanks Josh for the info!  While this solves the issue in this post, it does make me a bit anxious about whether or not I’m missing any additional pieces of the native build puzzle that Corona usually takes care of.  Are there any other flags that I should worry about that aren’t covered in the quick start tutorials and sample apps?

The most important detail is that the “build.settings” file is ignored for native Android builds.  So, whatever you are doing in that file, you’ll need to duplicate according to Google’s documentation in the AndroidManifest.xml file.  Such as orientation, permissions, version code, package name, etc.

The Corona app icons are ignored too.  You’ll have to create Android “launcher” icons under your project’s “res/drawable*” directories according to Google’s documentation as well.

For first time native Android SDK developers, I usually tell them to play around with Google’s Android sample project’s first to get a feel for how to set up and build an Android application project.  That helps people learn the fundamentals.