Google Instant Apps
Here you can find instruction how to build instant app using Defold.
You can use the InstantApp extension in your own project by adding this project as a Defold library dependency. Open your game.project file and in the dependencies field under project add:
Or point to the ZIP file of a specific release.
If you are working on cross-platform application the best practice to check the existence of
instantapp module, this module exists only in android bundle:
if instantapp then -- call instantapp methods end
instantapp.is_instant_app() Original DOC
Returns true if this application is an instant app.
if instantapp.is_instant_app() then --do something specific for instant app end
instantapp.show_install_prompt() Original DOC
Shows a dialog that allows the user to install the current instant app.
if instantapp.is_instant_app() then instantapp.show_install_prompt() -- if this is instant app then show install prompt else -- regular app logic end
instantapp.get_cookie_max_size() Original DOC
Gets the maximum size in bytes of the cookie data an instant app can store on the device.
local cookie_size = instantapp.get_cookie_max_size() --number, for example 16384
instantapp.get_cookie() Original DOC
Gets the instant application cookie for this app. Non instant apps and apps that were instant but were upgraded to normal apps can still access this API.
local cookie_byte_array = instantapp.get_cookie()
instantapp.set_cookie() Original DOC
Sets the instant application cookie for the calling app. Non instant apps and apps that were instant but were upgraded to normal apps can still access this API.