Implementing OpenSSL plugin in Enterprise?

It turned out I didn’t have it 100% fixed, as I also had to add intent-filter/services/etc to the AndroidManifest.xml file, which I mostly have working now.

I have the facebook, flurry, vungle and google play game services plugins working, but I’m struggling to get google IAP working when I build with Enterprise (it works when I build from simuator). When I call store.purchase() nothing happens, I don’t get any errors or any reply at all.

I’m using the plugin.google.iap.v3.jar, and my manifest file has the com.android.vending.BILLING permission and the following:

\<receiver android:name="com.ansca.corona.purchasing.GoogleStoreBroadcastReceiver"\> \<intent-filter\> \<action android:name="com.android.vending.billing.IN\_APP\_NOTIFY" /\> \<action android:name="com.android.vending.billing.RESPONSE\_CODE" /\> \<action android:name="com.android.vending.billing.PURCHASE\_STATE\_CHANGED" /\> \</intent-filter\> \</receiver\>

Is there something else I’m missing? I’m guessing you’ll spot something straight away Danny.

Similarly, I’m not sure how to integrate google play licensing when building with Enterpise. I have the com.android.vending.CHECK_LICENSE permission, and I see there is a google play licensing plugin included with corona enterprise (just called classes.jar), but I’m not sure how I’m supposed to use it.

For the most part we’re using enterprise to do offline building and building multiple apks at once from the command line, so any of the native java stuff isn’t second nature to me yet as we haven’t had to use it.

If anyone can point me in the right direction for these things it would be greatly appreciated. 

Have you checked the log to see if any error messages show up there?

The licensing plugin is just like any other plugin, its just named differently.  You just have to put it in the libs directory along with the other jar files.  After that in your lua code you would call the licensing library like normal.

http://docs.coronalabs.com/daily/api/library/licensing/init.html

I had the log set to look for “Corona” tags, I’ll double check the whole log and then get back to you (the galaxy s4 fills the log like crazy).

With regards to the licensing plugin, when we’ve built in the simulator we have something like this in config.lua:

license = { google = { key = "aMassiveLongString", policy = "serverManaged", }, },

Is that not necessary? And if it is, where would we put that “key” string when building for enterprise? Or will it still be pulled from config.lua (I know that most stuff in build.settings is ignored when building with enterprise, not sure about config.lua).

Thanks

While build.settings is ignored for Android Enterprise, config.lua is not ignored.  The plugin will read those values from config.lua.

Ok cool. Now that I think about it, if config.lua was ignored all the image scaling would have been messed up.

I probably won’t get to rebuild the project and check the IAP logs until the morning now, but I’ll update this post with my findings once I have.

Been a while since I posted this, just thought I’d update. 

In addition to the points listed above, I had issues due to the store.target string being set to none when building with Enterprise (because there was no build menu to set it to anything else). Once I put a workaround for that in, everything worked as it should.

Thanks for your help dchan.

Is anyone able to answer a query I have regarding using the openssl plugin with Enterprise. I’ve posted this in other topics and emailed someone at corona without any luck so far.

 

It seems to work fine when building for android, and on my s4 the app runs fine. However when I install on my Kindle Fire HDX it fails to load the plugin, and when we tried to submit to Amazon they said the app wouldn’t open on any device not just Kindle devices. So I tried building the app using the simulator instead, and it works as it should.

 

Do I need to do anything else with the plugin to get it to work for Amazon Enterprise builds? I’ve clearly missed a step, but as I say it seems to work for Google Play without any issues and I’m not sure what I could have missed.

 

Any ideas?

Been a while since I posted this, just thought I’d update. 

In addition to the points listed above, I had issues due to the store.target string being set to none when building with Enterprise (because there was no build menu to set it to anything else). Once I put a workaround for that in, everything worked as it should.

Thanks for your help dchan.

I hate having to bump topics, but I’m still none the wiser on why these builds would fail for Amazon apps only.

Can anyone help?

Is anyone able to answer a query I have regarding using the openssl plugin with Enterprise. I’ve posted this in other topics and emailed someone at corona without any luck so far.

 

It seems to work fine when building for android, and on my s4 the app runs fine. However when I install on my Kindle Fire HDX it fails to load the plugin, and when we tried to submit to Amazon they said the app wouldn’t open on any device not just Kindle devices. So I tried building the app using the simulator instead, and it works as it should.

 

Do I need to do anything else with the plugin to get it to work for Amazon Enterprise builds? I’ve clearly missed a step, but as I say it seems to work for Google Play without any issues and I’m not sure what I could have missed.

 

Any ideas?

Nice info here. Exactly what I was looking for.

I hate having to bump topics, but I’m still none the wiser on why these builds would fail for Amazon apps only.

Can anyone help?

Nice info here. Exactly what I was looking for.