Shortcut / Favorites
Suggest to the player to create a shortcut or add the game to favorites.
Information
FREEThe method returns the success of the operation, boolean
.
- JavaScript
- Unity
const success = await gp.app.addShortcut(); // true / false
public void AppShortcut()
{
GP_App.AddShortcut(OnAddShortcut);
Debug.Log("Send add shortcut request");
}
// success: true / false
private void OnAddShortcut(bool success)
{
Debug.Log("Shortcut result: " + success);
}
Supported Platforms
Platforms without support
Check Support
FREE- JavaScript
- Unity
gp.app.canAddShortcut // true / false
// true / false
bool result = GP_App.CanAddShortcut();
Use this property to check if adding a shortcut is supported on the current platform. It also checks for the possibility of adding it again.
- JavaScript
- Unity
if (gp.app.canAddShortcut) {
// can suggest adding to favorites
}
if (GP_App.CanAddShortcut()) {
// can suggest adding to favorites
}
Stay in Touch
Other documents of this chapter available Here. To get started, welcome to the Tutorials chapter.
GamePush Community Telegram
: @gs_community.
For your suggestions e-mail
: [email protected]
We Wish you Success!