Method signature

For a faster approach to user’s favourite games our Android app provides a feature to create an app icon on user’s device home screen.

     

Method is available only on android platform

FAPI.invokeUIMethod("requestDesktopIcon");

Usage example

function requestDesktopIcon() {
  FAPI.invokeUIMethod("requestDesktopIcon");
}

Callback example

After a method is called user will be suggested to create a desktop icon for you. Depending on his action on of following callbacks can be returned

Callback if a user agreed to create an icon

method: “requestDesktopIcon”

result: “ok”

data: “The icon is added to the desktop.”

Callback if a user denied creating an icon

method: “requestDesktopIcon”

result: “error”

data: “Adding the icon to the desktop was canceled by the user.”

Callback if an error occurred

method: “requestDesktopIcon”

result: “error”

data: “Failed to add the icon to the desktop.”

Callback if a feature is not supported for current device

method: “requestDesktopIcon”

result: “error”

data: “not_supported”