Google Play Instant in Cocos Creator 3.6

Hi, How can I call showInstallPrompt() of Google Play Instant game in Cocos Creator in version 3.6.2, I have found sample project, but it runs in version 2.x.

Check out the doc
https://docs.cocos.com/creator/manual/en/editor/publish/native-options.html#google-play-instant

1 Like

I see no mention of prompt in this doc. I just found in Google API. How do I call that function in Cocos?

You can use this
https://docs.cocos.com/creator/manual/en/advanced-topics/js-java-bridge.html

1 Like

Thanks

Hello I have a size problem when I build Google Instant game, I have reduced the image and sound size, my asset size is about 2MB, but when I build with android, every time I check 1 APP ABI, the size increased to more than 10MB, do you have any way to reduce its size? Also I found the Refactor function in version 2.x, but I can’t find it in version 3.6, is it still supported?

The feature cropping will help for build package size, also remember to use release build variants

https://docs.cocos.com/creator/manual/en/editor/project/#feature-cropping

I’m not sure what you mean by Refactor function

I tried feature- cropping but it didn’t work very well. Regarding Refactor, when building with Android Instant in version 2.x, there will be a record and refactor option, which will help split resources when loading into the game.

Oh, this is not yet supported in v3, we haven’t got time to cover yet, sorry for that