Applications can on most operating systems be launched in several ways:
In the case when the application is launched from a link, notification or when installed it is possible to pass additional arguments such as an install referrer when installing or a deep-link when launching from an application specific link or notification. Defold provides a unified way to get the information about how the application was invoked using a native extensions.
To start using the Inter-app communication extension you need to add it as a dependency to your
game.project file. The latest stable version is available with the dependency URL:
We recommend using a link to a zip file of a specific release.
The API is very easy to use. You provide the extension with a listener function and react to listener callbacks.
local function iac_listener(self, payload, type) if type == iac.TYPE_INVOCATION then -- This was an invocation print(payload.origin) -- origin may be empty string if it could not be resolved print(payload.url) end end function init(self) iac.set_listener(iac_listener) end
Full documentation of the API is available on the extension GitHub page.
Did you spot an error or do you have a suggestion? Please let us know on GitHub!GITHUB