AS3 / AIR Google Play application id and expansion

2019-08-18 23:40发布

问题:

I developed an app linked with main expansion file called "main.1000000.com.mycompany.myapp.obb". I access this file with the

File.applicationStorageDirectory.resolvePath('Android/obb/' + FILENAME)

method which indicates in debug mode on Windows, that the file exists. But after uploading to Google Play I noted two problems:

1) Application id has been altered with prefix "air.", so it is now "air.com.mycompany.myapp"

2) Application cannot find the expansion file sucessfully downloaded along.

File.applicationStorageDirectory.resolvePath('Android/obb/' + FILENAME).nativePath

on the device returns something like "/data/data/air.com.mycompany.myapp/com.mycompany.myapp/LocalStore/main.1000000.com.mycompany.myapp.obb" which is weird, because there is app id without the .air prefix and then with.

I really don't know what am I missing or if this is the problem, so could someone please give me and advice what parameter should I use in resolvePath method to solve it?

回答1:

"Android/obb" is in the documentsDirectory and not in the application storage directory