-
Notifications
You must be signed in to change notification settings - Fork 5
API Functions
Xavier Sellier edited this page May 27, 2018
·
21 revisions
name | parameters | return | description |
---|---|---|---|
godot_get_country_code_iso |
String |
Get the country code of the current user | |
godot_share |
string message , [string image_filename] , [String package]
|
void |
Share a message. image_filename has to be placed in the shared directory. Use package to target a specific applicaiton (ie Facebook, Twitter...) |
godot_get_shared_directory |
String |
Return the shared directory inside the file directory for the application |
|
godot_is_online |
bool |
Return true if the network connection is active, false otherwise |
|
godot_is_wifi_connected |
bool |
Return true if the wifi is connected, false otherwise |
|
godot_is_mobile_connected |
bool |
Return true if the mobile data is connected, false otherwise |
name | parameters | return | description |
---|---|---|---|
google_initialize |
int instance_id |
void |
Initialize and connect to google play game service automatically. Google callbacks will be done using the instance_id. |
google_connect |
void |
Connect to google play game service | |
google_disconnect |
void |
Disconnect from google play game service | |
google_is_connected |
boolean |
Return true if connected, false otherwise |
|
google_leaderboard_submit |
String id, int score |
void |
Submit a score to the given leaderboard |
get_google_leaderboard_timespan |
Dictionary |
Return the values of LeaderboardVariant
|
|
google_leaderboard_load_player_score |
String id, [int timespan = TIME_SPAN_ALL_TIME] |
void |
Load the score of the leaderboard id for the current user |
google_leaderboard_load_top_scores |
String id, [int timespan = TIME_SPAN_ALL_TIME, int max_results = 10, boolean force_reload = false |
void |
Load top scores of the leaderboard id |
google_leaderboard_load_player_centered_scores |
String id, [int timespan = TIME_SPAN_ALL_TIME, int max_results = 10, boolean force_reload = false |
void |
Load scores centered of the current user of the leaderboard id |
google_leaderboard_show |
String id |
void |
Show the given leaderboard |
google_leaderboard_showlist |
void |
Show the leaderboards' list | |
google_snapshot_load |
String name, int conflictResolutionPolicy |
void |
Load the given snapshot. godot_android exposes the following values for the resolution policy RESOLUTION_POLICY_HIGHEST_PROGRESS , RESOLUTION_POLICY_LAST_KNOWN_GOOD , RESOLUTION_POLICY_LONGEST_PLAYTIME , RESOLUTION_POLICY_MANUAL , RESOLUTION_POLICY_MOST_RECENTLY_MODIFIED
|
google_snapshot_save |
String name, String data, String description, boolean force |
void |
Save a given snapshot. Use the force to overwrite a conflicting savegame |
get_google_resolution_policies |
Dictionnary |
Return the google snapshot available policies | |
google_achievement_unlock |
String id |
void |
Unlock the given achievement |
google_achievement_increment |
String id, int amount |
void |
Increment by amount the given achievement |
google_achievement_show_list |
void |
Show the achievement list |
name | parameters | return | description |
---|---|---|---|
firebase_initialize |
int instance_id |
void |
Initialize firebase. Firebase callbacks will be done using the instance_id. |
firebase_analytics_status |
boolean status |
void |
Enable/disable firebases analitycs |
firebase_connect |
void |
void |
Connect to firebase anonymously. |
firebase_get_user_details |
String |
Return the current firebase user. Need to parse_json in order to exploit it. |
|
firebase_analytics_log_event |
String event_name, Dictionary params |
void |
Log custom event |
firebase_analytics_tutorial_begin |
String name |
void |
Log event tutoriel_begin
|
firebase_analytics_tutorial_complete |
String name |
void |
Log event tutorial_complete
|
firebase_analytics_purchase |
String item |
void |
Log event purchase
|
firebase_analytics_unlock_achievement |
String achievement |
void |
Log event unlock_achievement
|
firebase_analytics_join_group |
String group |
void |
Log event join_group
|
firebase_analytics_login |
void |
Log event login
|
|
firebase_analytics_level_up |
String name |
void |
Log event level_up
|
firebase_analytics_post_score |
String level, int score |
void |
Log event post_score
|
firebase_analytics_select_content |
String name |
void |
Log event select_content
|
firebase_analytics_share |
void |
Log event share
|
|
firebase_invite |
String message, String action_text, [String custom_image_uri], [String deep_link_uri] |
void |
Send an application invitation (WIP on deepLink ) |
firebase_get_fcm |
String |
Return the Firebase Cloud Message token (used to send cloud message to one device) |