-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PlayAssetDelivery: can't fetch on-demand/fast-forward packs on installed app downloaded from Google Play #1538
Comments
@ajwfrost I'm sorry to bother you again. I just tested on-demand AssetPackDelivery with the latest (As I'm the only one reporting this PAD on-demand issue, it makes me really worried and I start feeling like it might be an issue on my side. If anyone has successfully done this, please let me know.) |
Hi I've just gone through and double-checked this using our test cases, and it's working okay here ... Looking at the log file from the linked issue, we can see:
and then 5s later it looks like it's being killed as an ANE. So I'm wondering if there's still an issue with the services listed in your app descriptor file, or the Google Play service? We can perhaps send you a version of the ANE library that has additional debug information in it, if that doesn't help... I am wondering whether the declaration that some of the APIs are asynchronous may be different from them being multithreaded so it may be that us waiting to get a response from the service is causing it to not actually run properly in this case! thanks |
@jimmymjing please try with the below version of the ANE, which has some extra logging in it.
thanks |
@ajwfrost Thanks so much for the debug version ANE, I will follow the directions pointed out in your post and let you know the results! |
@ajwfrost _pad = new PlayAssetDelivery();
_isPADInited = _pad.initAssetDelivery();
if (_isPADInited) {
_pad.addEventListener(PlayAssetDeliveryEvent.PLAY_ASSET_UPDATE, playAssetDelivery_statusHandler);
//calling either function (getAssetPackStatus / getAssetPackLocation / fetchAssetPack) freezes the app
var sta:int = _pad.getAssetPackStatus("ap_assets_one");
log("ap status:" + sta); // <-------NEVER REACH HERE
// _pad.getAssetPackLocation("ap_assets_one");
//_pad.fetchAssetPack("ap_assets_one");
} //log from OnePlus mobile //log from XiaoMi mobile Just in case, here's the description xml. |
Hi - something's gone wrong with the update here then as we're not seeing the log output that we'd expect .. let me double-check the build (or re-do it with the normal build script) and perhaps add a bit more logging into it. If "getAssetPackLocation" is still blocking then it means you're not executing the updated code as we changed how this function works... Will provide another updated ANE file shortly... thanks |
Thanks so much! I will test it right away once I get the ANE :D |
Hi Please check with the below ANE file, and if you don't see trace output like the below then please double-check the ANE file is properly updated and rebuild/deploy is working! Below is with local testing but we're pushing out Android log 'warning' level to try to ensure it shows up...
If you can call it like the below it may be best (and an "aab-debug" build would mean we should see the AS3
thanks! |
Will test it right away. |
@ajwfrost Hello, now it works! I just copy/pasted the code and then packaged the aab with Does |
@ajwfrost play store_2022_1_19_14_1_40.log p.s. Local test PAD always works. I only have this PAD fetching issue for the app downloaded through Play Store internal testing. |
Great, thanks ... so we had slightly updated the code under the "GetAssetStatus" command:
Previously, we were waiting for the response from the asset pack service, but you can see these are coming in now after we have returned from the function (with the trace The only trouble appears to be, when the task does complete, it has failed... Let us tweak this a little more and see if we can get it to work in a more asynchronous way. This is going to mean that the getAssetPackStatus method will never provide a response directly, it will always need to trigger a status update event... thanks |
Thanks so much! I will wait for an updated ANE then :) |
Here's another version .. not quite sure why the task was saying it's failed but the Android example code just tries to get the task result, so I've changed it so that it's logging the 'success' value but trying to get the result information regardless.. Plus other blocking calls have been removed. There's hopefully some events now being dispatched to the thanks |
Hi, this time the package gets downloaded! Thanks! I will post the log here and maybe you can check to see if things look right. (I do see linktodeath) |
Awesome, thanks for the log... So this time we get the results of the "status" task successfully:
with status 8 = The request for "fetch" isn't working though, I'm wondering whether this is because they're overlapping i.e. the fetch request starts before the "status" task has finished:
But curiously this does seem to have kicked off the request:
and we then get status events as it is fetched:
So after it's hit the "completed" status, you should be able to get at the files from it... I'll just tidy up and remove some of the logging (or switch it back down to debug/info levels); I'm wondering whether we also need to prevent folk from calling one async function when another one is already in progress, but it may just be that this was a fast-follow pack so perhaps it's invalid to request a "fetch" unless the download was interrupted (looking at the Android/Java documentation on it...) -> it can be left to the user here I think! But to let you know there's been a response, we can trigger another update event there and leave the status at 'unknown'... Best to wait for a proper release with an updated version number in it! but that should be possible to do later today. thanks |
Hi @jimmymjing |
@ajwfrost Thanks so much! |
Yep, will get that up this shortly. |
v1.0.2 is available now, in the repo and apm. |
I'm so sorry to ask this question all around. I'm just afraid that it simply got ignored somehow. I fight on this for many days but to no avail. I assume it is a bug for the PlayAssetDelivery ANE. The original post is here: airsdk/ANE-PlayAssetDelivery#6
Please shed some light on this. I think most of the apps would exceed 250MB and using PAD should be a must. Can someone please confirm that on-demand Asset Delivery is working? Thanks so much!!!
The text was updated successfully, but these errors were encountered: