Expansion files, how to?

Hi guys,
I’m trying to create a build with expansion files as my apk is now over 50mb. I followed every step on the tutorial but everytime I build I always get a single .apk file which is 70mb.

This is part of my build.settings and I built using 1093 :

androidPermissions =     {         usesExpansionFile = true,         "com.android.vending.CHECK\_LICENSE",             "android.permission.INTERNET",         "com.android.vending.BILLING",         "android.permission.WRITE\_EXTERNAL\_STORAGE"                     },  

and this is the config lua

application =          {             content =             {                 width = 800,                 height = 1280,                 scale = "letterBox",                 xAlign = "center",                 yAlign = "center",                 fps = 60,             },             license =             {                 google =                 {                     key = "BLABLABLABLA"                 },             },         }  

ps : of course it’s not real my license key

Is there something that I missed? Is there any link that I can read in setting up expansion files?
Thanks<
 

You got your build.settings wrong

Try this:

settings = { orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown"} }, android = { largeHeap = true, usesExpansionFile = true, usesPermissions = { "android.permission.ACCESS\_WIFI\_STATE", "android.permission.VIBRATE", "android.permission.INTERNET", "com.android.vending.CHECK\_LICENSE", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.READ\_PHONE\_STATE", "android.permission.ACCESS\_NETWORK\_STATE", "com.android.vending.BILLING", }, }, }

How is my build settings wrong?

All the permissions are there :

usesExpansionFile = true, -> Check
 

“com.android.vending.CHECK_LICENSE”, -> check
“android.permission.INTERNET”, -> check
“android.permission.WRITE_EXTERNAL_STORAGE”  -> check

at least according to this document : http://docs.coronalabs.com/daily/guide/distribution/buildSettings/index.html#expansion-files

Doh! Nvm… yes it’s very stupid of me. Should’ve checked how I should make the build settings for android

You got your build.settings wrong

Try this:

settings = { orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown"} }, android = { largeHeap = true, usesExpansionFile = true, usesPermissions = { "android.permission.ACCESS\_WIFI\_STATE", "android.permission.VIBRATE", "android.permission.INTERNET", "com.android.vending.CHECK\_LICENSE", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.READ\_PHONE\_STATE", "android.permission.ACCESS\_NETWORK\_STATE", "com.android.vending.BILLING", }, }, }

How is my build settings wrong?

All the permissions are there :

usesExpansionFile = true, -> Check
 

“com.android.vending.CHECK_LICENSE”, -> check
“android.permission.INTERNET”, -> check
“android.permission.WRITE_EXTERNAL_STORAGE”  -> check

at least according to this document : http://docs.coronalabs.com/daily/guide/distribution/buildSettings/index.html#expansion-files

Doh! Nvm… yes it’s very stupid of me. Should’ve checked how I should make the build settings for android

After file expansion also i am getting main.obb is 68 kb.so i dont have any idea about integration of these obb file.If any one knows about this ,please post  your reply here.

Hmm which version of corona are you using?

Try a different one maybe.

I’m sending updates everyday to my alpha testers and I never had such file generated.

Currently I’m using 1143.

Thanks for given the reply…

I am using 1076 version…is it suggested one or not?

Sorry, I never use public releases. They are to buggy and limited. And 1076 seems to be very old.

Don’t even try to publish your app with expansion files using build before 1137, as there’s a bug which does not allow loading of assets when the app is first run.

Ok and let me know one thing, after expansion if we get two file then which one we have to upload?

and suggest me the inegration steps for Inapp purchase for android.

Thankyou.

Well you get two files: apk and obb.

You upload apk as an apk, and then after apk is uploaded to google play you can add expansion file, you simply select the obb file.

Inapp purchase is described fine in corona documentation. Just follow it.

yes i have followed the same procedure, but i am getting confusion about license key in config file,with out integration of apk file how can we get that key.

Under services & Api i found one License key but it is in encoded format.

Please let me clear about this.

The license key from services & api is the correct value you should put in your config.lua file.

You uploaded an APK signed with a certificate that expires too soon. You
need to sign your APK with a certificate that expires farther into the
future.

Can you tell me the solution for this above error?(means  required certification expire period)

Thankyou.

I would expect a new certificate to fix the issue for you

Thankyou…

I have integrated the apk & obb and i added one product in play store,while integrating it i have little bit confucion.

with out publishing the app how to test that product id is able to purchase or not,

and where we have to keep that product id,

is it android.test.purchased instead of test we have to integrate that product id or not?

please provide the solution for this.

Hi,

you don’t have to publish your application to test your in app purchases.

If you’ve got a test account on google play, you will be able to use it to test your in app purchases without publication.

The other way is to publish your app in alpha test. You will be able to invite users to test your app [in alpha test mode] and they will be able to but your addon. Please note, that during alpha test, when a non-test account buys the addon, they WILL be charged for it.

In in App purchase page coding ,where we have to provide that product id?

local googleProductList =

{

   “android.test.purchased”,            – Marketplace will always successfully purchase this product ID.

    “android.test.canceled”,            – Marketplace will always cancel a purchase of this product ID.

    “android.test.item_unavailable”,    – Marketplace will always indicate this product ID as unavailable.

}

if my product id is “abc” then how to integrate it here