Skip to content

Commit

Permalink
Merge pull request #141 from poingstudios/134-consentinformationupdat…
Browse files Browse the repository at this point in the history
…e-callbacks-are-called-repeatedly

ConsentInformation.update() callbacks are called repeatedly
  • Loading branch information
gumaciel authored May 31, 2024
2 parents b38cd1e + 024f9f5 commit b1f496e
Show file tree
Hide file tree
Showing 23 changed files with 65 additions and 65 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Issue with AdMob on Android only
url: https://github.com/Poing-Studios/godot-admob-android
url: https://github.com/poingstudios/godot-admob-android
about: Check the Android plugin repository.
- name: Issue with AdMob on iOS only
url: https://github.com/Poing-Studios/godot-admob-ios
url: https://github.com/poingstudios/godot-admob-ios
about: Check the iOS plugin repository.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[![Version](https://img.shields.io/github/v/tag/Poing-Studios/godot-admob-plugin?label=Version&style=for-the-badge)](https://github.com/Poing-Studios/godot-admob-plugin/releases)
[![Version](https://img.shields.io/github/v/tag/poingstudios/godot-admob-plugin?label=Version&style=for-the-badge)](https://github.com/poingstudios/godot-admob-plugin/releases)
[![Download Asset Library](https://img.shields.io/badge/Download-Asset%20Library-darkgreen?style=for-the-badge)](https://godotengine.org/asset-library/asset/1108)
[![Android](https://img.shields.io/badge/Android-3DDC84?style=for-the-badge&logo=android&logoColor=white)](https://github.com/Poing-Studios/godot-admob-android)
[![iOS](https://img.shields.io/badge/iOS-000000?style=for-the-badge&logo=ios&logoColor=white)](https://github.com/Poing-Studios/godot-admob-ios)
![License](https://img.shields.io/github/license/Poing-Studios/godot-admob-plugin?style=for-the-badge)
![Stars](https://img.shields.io/github/stars/Poing-Studios/godot-admob-plugin?style=social)
[![Android](https://img.shields.io/badge/Android-3DDC84?style=for-the-badge&logo=android&logoColor=white)](https://github.com/poingstudios/godot-admob-android)
[![iOS](https://img.shields.io/badge/iOS-000000?style=for-the-badge&logo=ios&logoColor=white)](https://github.com/poingstudios/godot-admob-ios)
![License](https://img.shields.io/github/license/poingstudios/godot-admob-plugin?style=for-the-badge)
![Stars](https://img.shields.io/github/stars/poingstudios/godot-admob-plugin?style=social)

# 🦾Godot AdMob Plugin

This addon provides an easy and beautiful way to configure AdMob directly through the editor. Supports [godot-admob-android](https://github.com/Poing-Studios/godot-admob-android) and [godot-admob-ios](https://github.com/Poing-Studios/godot-admob-ios).
This addon provides an easy and beautiful way to configure AdMob directly through the editor. Supports [godot-admob-android](https://github.com/poingstudios/godot-admob-android) and [godot-admob-ios](https://github.com/poingstudios/godot-admob-ios).

<div align="center">

Expand All @@ -24,17 +24,17 @@ This addon provides an easy and beautiful way to configure AdMob directly throug
<img height=100 src="static/asset_library.png">
2. Click Download and Install
3. Enable in Project→Project Settings→Plugins.
4. Download [godot-admob-android](https://github.com/Poing-Studios/godot-admob-android) and/or [godot-admob-ios](https://github.com/Poing-Studios/godot-admob-ios) in `Project→Tools→AdMob Download Manager→Android/iOS→LatestVersion`.
5. To know how to deploy, check the README.md of [godot-admob-android](https://github.com/Poing-Studios/godot-admob-android/#usage) and/or [godot-admob-ios](https://github.com/Poing-Studios/godot-admob-ios/#usage).
4. Download [godot-admob-android](https://github.com/poingstudios/godot-admob-android) and/or [godot-admob-ios](https://github.com/poingstudios/godot-admob-ios) in `Project→Tools→AdMob Download Manager→Android/iOS→LatestVersion`.
5. To know how to deploy, check the README.md of [godot-admob-android](https://github.com/poingstudios/godot-admob-android/#usage) and/or [godot-admob-ios](https://github.com/poingstudios/godot-admob-ios/#usage).

<details>
<summary>Manual install for custom versions.</summary>

1. Pick a [specific version](https://github.com/Poing-Studios/godot-admob-editor/tags) from tags
1. Pick a [specific version](https://github.com/poingstudios/godot-admob-editor/tags) from tags
2. Download and extract as a `.zip` or `.tar.gz`
3. Copy the extracted `addons/admob` folder into `res://addons` on your project
4. Download [godot-admob-android](https://github.com/Poing-Studios/godot-admob-android) and/or [godot-admob-ios](https://github.com/Poing-Studios/godot-admob-ios) in `Project→Tools→AdMob Download Manager→Android/iOS→LatestVersion`.
5. To know how to deploy, check the README.md of [godot-admob-android](https://github.com/Poing-Studios/godot-admob-android/#usage) and/or [godot-admob-ios](https://github.com/Poing-Studios/godot-admob-ios/#usage).
4. Download [godot-admob-android](https://github.com/poingstudios/godot-admob-android) and/or [godot-admob-ios](https://github.com/poingstudios/godot-admob-ios) in `Project→Tools→AdMob Download Manager→Android/iOS→LatestVersion`.
5. To know how to deploy, check the README.md of [godot-admob-android](https://github.com/poingstudios/godot-admob-android/#usage) and/or [godot-admob-ios](https://github.com/poingstudios/godot-admob-ios/#usage).

</details>

Expand Down Expand Up @@ -206,12 +206,12 @@ func _on_show_pressed():


## 📎Useful links:
- 🍏 iOS: https://github.com/Poing-Studios/godot-admob-ios
- 🤖 Android: https://github.com/Poing-Studios/godot-admob-android
- ⏳ Plugin for Godot below v4.1: https://github.com/Poing-Studios/godot-admob-plugin/tree/v2
- 🍏 iOS: https://github.com/poingstudios/godot-admob-ios
- 🤖 Android: https://github.com/poingstudios/godot-admob-android
- ⏳ Plugin for Godot below v4.1: https://github.com/poingstudios/godot-admob-plugin/tree/v2

## 📄Documentation
For a complete documentation of this Plugin including how to mediation: [check here](https://poing-studios.github.io/godot-admob-plugin/).
For a complete documentation of this Plugin including how to mediation: [check here](https://poingstudios.github.io/godot-admob-plugin/).

Alternatively, you can check the docs of AdMob itself of [Android](https://developers.google.com/admob/android/quick-start) and [iOS](https://developers.google.com/admob/ios/quick-start).

Expand All @@ -228,12 +228,12 @@ Your support helps us continue to improve and maintain this plugin. Thank you fo


## 🆘Getting help
[![DISCUSSIONS](https://img.shields.io/badge/Discussions-green?style=for-the-badge)](https://github.com/Poing-Studios/godot-admob-plugin/discussions)
[![DISCUSSIONS](https://img.shields.io/badge/Discussions-green?style=for-the-badge)](https://github.com/poingstudios/godot-admob-plugin/discussions)
[![DISCORD](https://img.shields.io/badge/Discord-7289DA?style=for-the-badge)](https://discord.com/invite/YEPvYjSSMk)



## ⭐ Star History
If you appreciate our work, don't forget to give us a star on GitHub! ⭐

![Star History Chart](https://api.star-history.com/svg?repos=Poing-studios/godot-admob-plugin&type=Date)
![Star History Chart](https://api.star-history.com/svg?repos=poingstudios/godot-admob-plugin&type=Date)
10 changes: 5 additions & 5 deletions addons/admob/admob.gd
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func _format_version(version: String) -> String:
return match_result.get_string(1) if match_result else version

func _request_version_support():
var url = "https://raw.githubusercontent.com/Poing-Studios/godot-admob-versions/" + plugin_version + "/versions.json"
var url = "https://raw.githubusercontent.com/poingstudios/godot-admob-versions/" + plugin_version + "/versions.json"
var http_request = HTTPRequest.new()
http_request.request_completed.connect(_on_version_support_request_completed)
add_child(http_request)
Expand Down Expand Up @@ -150,7 +150,7 @@ func start_download(platform: String, download_path: String, file_prefix: String
return

var file_name = file_prefix + godot_version + ".zip"
var url_download = "https://github.com/Poing-Studios/godot-admob-" + platform + "/releases/download/" + version_support[platform] + "/" + file_name
var url_download = "https://github.com/poingstudios/godot-admob-" + platform + "/releases/download/" + version_support[platform] + "/" + file_name

http_request_downloader.request_ready()
http_request_downloader.download_file = download_path + file_name
Expand All @@ -166,7 +166,7 @@ func _on_android_popupmenu_id_pressed(id: int):
var path_directory = ProjectSettings.globalize_path(android_download_path)
OS.shell_open(str("file://", path_directory))
Items.GitHub:
OS.shell_open("https://github.com/Poing-Studios/godot-admob-android/tree/" + version_support.android)
OS.shell_open("https://github.com/poingstudios/godot-admob-android/tree/" + version_support.android)

func _on_ios_popupmenu_id_pressed(id: int):
match id:
Expand All @@ -176,15 +176,15 @@ func _on_ios_popupmenu_id_pressed(id: int):
var path_directory = ProjectSettings.globalize_path(ios_download_path)
OS.shell_open(str("file://", path_directory))
Items.GitHub:
OS.shell_open("https://github.com/Poing-Studios/godot-admob-ios/tree/" + version_support.ios)
OS.shell_open("https://github.com/poingstudios/godot-admob-ios/tree/" + version_support.ios)

func _on_popupmenu_id_pressed(id : int):
match id:
Items.Folder:
var path_directory = ProjectSettings.globalize_path(default_download_path)
OS.shell_open(str("file://", path_directory))
Items.GitHub:
OS.shell_open("https://github.com/Poing-Studios/godot-admob-plugin/tree/" + plugin_version)
OS.shell_open("https://github.com/poingstudios/godot-admob-plugin/tree/" + plugin_version)

func show_download_percent(url_download: String = ""):
if not url_download.is_empty():
Expand Down
4 changes: 2 additions & 2 deletions addons/admob/docs/errors/ERR_001.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ Common causes of this error may include:

Here are the steps to resolve error `ERR_001`:

1. **Check Connection**: Verify your application's internet connection. A good address to test your connection is at [godot-admob-versions](https://github.com/Poing-Studios/godot-admob-versions/blob/master/versions.json). If the connection is functional, proceed to the next step.
1. **Check Connection**: Verify your application's internet connection. A good address to test your connection is at [godot-admob-versions](https://github.com/poingstudios/godot-admob-versions/blob/master/versions.json). If the connection is functional, proceed to the next step.

2. **Invalid .json File**: If the JSON file is invalid, try manually downloading it from the `Project->Tools->Android Download Manager->Android/iOS->LatestVersion` section. Please note that you may download an outdated version. It is recommended to create an issue on GitHub to address this issue, and if you have any questions, feel free to inquire about the latest version.

## What to Do If the Problem Continues

If you continue to experience issues or encounter problems, please consider opening an issue on the repository at [godot-admob-versions](https://github.com/Poing-Studios/godot-admob-versions).
If you continue to experience issues or encounter problems, please consider opening an issue on the repository at [godot-admob-versions](https://github.com/poingstudios/godot-admob-versions).
6 changes: 3 additions & 3 deletions addons/admob/docs/errors/ERR_002.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ Common causes of this error may include:

1. **Connection Issues**: There may be problems with your application's internet connection, preventing the download of the plugin.

2. **Plugin Unavailability**: The plugin you are trying to download may not be currently available on the specified download location. This can be due to outdated information on [godot-admob-versions](https://github.com/Poing-Studios/godot-admob-versions) or the corresponding versions not being released on [godot-admob-ios](https://github.com/Poing-Studios/godot-admob-ios) or [godot-admob-android](https://github.com/Poing-Studios/godot-admob-android).
2. **Plugin Unavailability**: The plugin you are trying to download may not be currently available on the specified download location. This can be due to outdated information on [godot-admob-versions](https://github.com/poingstudios/godot-admob-versions) or the corresponding versions not being released on [godot-admob-ios](https://github.com/poingstudios/godot-admob-ios) or [godot-admob-android](https://github.com/poingstudios/godot-admob-android).

## Solution

Here are the steps to resolve error `ERR_002`:

1. **Check Network Connection**: Verify your application's internet connection. If the connection is functional, proceed to the next step.

2. **Plugin Availability**: Confirm the availability of the plugin by checking the repositories on GitHub: [godot-admob-versions](https://github.com/Poing-Studios/godot-admob-versions), [godot-admob-ios](https://github.com/Poing-Studios/godot-admob-ios), and [godot-admob-android](https://github.com/Poing-Studios/godot-admob-android).
2. **Plugin Availability**: Confirm the availability of the plugin by checking the repositories on GitHub: [godot-admob-versions](https://github.com/poingstudios/godot-admob-versions), [godot-admob-ios](https://github.com/poingstudios/godot-admob-ios), and [godot-admob-android](https://github.com/poingstudios/godot-admob-android).

3. **Retry Download**: If the plugin is available, attempt to download it again. Sometimes, network issues can cause temporary download failures.

## What to Do If the Problem Continues

If you continue to experience issues or encounter problems, please consider opening an issue on the repository at [godot-admob-plugin](https://github.com/Poing-Studios/godot-admob-plugin).
If you continue to experience issues or encounter problems, please consider opening an issue on the repository at [godot-admob-plugin](https://github.com/poingstudios/godot-admob-plugin).
4 changes: 2 additions & 2 deletions addons/admob/src/api/InterstitialAdLoader.gd
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func load(
_plugin.connect("on_interstitial_ad_loaded", func(uid : int):
if uid == _uid:
interstitial_ad_load_callback.on_ad_loaded.call_deferred(InterstitialAd.new(uid))
)
, CONNECT_ONE_SHOT)
_plugin.connect("on_interstitial_ad_failed_to_load", func(uid : int, load_ad_error_dictionary : Dictionary):
if uid == _uid:
interstitial_ad_load_callback.on_ad_failed_to_load.call_deferred(LoadAdError.create(load_ad_error_dictionary))
)
, CONNECT_ONE_SHOT)
2 changes: 1 addition & 1 deletion addons/admob/src/api/MobileAds.gd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static func initialize(on_initialization_complete_listener : OnInitializationCom
_plugin.connect("on_initialization_complete", func(admob_initialization_status : Dictionary):
var initialization_status := InitializationStatus.create(admob_initialization_status)
on_initialization_complete_listener.on_initialization_complete.call_deferred(initialization_status)
)
, CONNECT_ONE_SHOT)

static func set_request_configuration(request_configuration : RequestConfiguration) -> void:
if _plugin:
Expand Down
4 changes: 2 additions & 2 deletions addons/admob/src/api/RewardedAdLoader.gd
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func load(
_plugin.connect("on_rewarded_ad_loaded", func(uid : int):
if uid == _uid:
rewarded_ad_load_callback.on_ad_loaded.call_deferred(RewardedAd.new(uid))
)
, CONNECT_ONE_SHOT)
_plugin.connect("on_rewarded_ad_failed_to_load", func(uid : int, load_ad_error_dictionary : Dictionary):
if uid == _uid:
rewarded_ad_load_callback.on_ad_failed_to_load.call_deferred(LoadAdError.create(load_ad_error_dictionary))
)
, CONNECT_ONE_SHOT)
4 changes: 2 additions & 2 deletions addons/admob/src/api/RewardedInterstitialAdLoader.gd
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ func load(
_plugin.connect("on_rewarded_interstitial_ad_loaded", func(uid : int):
if uid == _uid:
rewarded_ad_load_callback.on_ad_loaded.call_deferred(RewardedInterstitialAd.new(uid))
)
, CONNECT_ONE_SHOT)
_plugin.connect("on_rewarded_interstitial_ad_failed_to_load", func(uid : int, load_ad_error_dictionary : Dictionary):
if uid == _uid:
rewarded_ad_load_callback.on_ad_failed_to_load.call_deferred(LoadAdError.create(load_ad_error_dictionary))
)
, CONNECT_ONE_SHOT)
2 changes: 1 addition & 1 deletion addons/admob/src/ump/api/ConsentForm.gd
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ func show(on_consent_form_dismissed := func(form_error : FormError) : pass) -> v
if uid == _uid:
var formError : FormError = FormError.create(form_error_dictionary) if not form_error_dictionary.is_empty() else null
on_consent_form_dismissed.call_deferred(formError)
)
, CONNECT_ONE_SHOT)

4 changes: 2 additions & 2 deletions addons/admob/src/ump/api/ConsentInformation.gd
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ func update(consent_request : ConsentRequestParameters,

_plugin.connect("on_consent_info_updated_success", func():
on_consent_info_updated_success.call_deferred()
)
, CONNECT_ONE_SHOT)
_plugin.connect("on_consent_info_updated_failure", func(form_error_dictionary : Dictionary):
on_consent_info_updated_failure.call_deferred(FormError.create(form_error_dictionary))
)
, CONNECT_ONE_SHOT)

func reset():
if _plugin:
Expand Down
4 changes: 2 additions & 2 deletions addons/admob/src/ump/api/UserMessagingPlatform.gd
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ static func load_consent_form(
#
_plugin.connect("on_consent_form_load_success_listener", func(UID : int):
on_consent_form_load_success_listener.call_deferred(ConsentForm.new(UID))
)
, CONNECT_ONE_SHOT)

_plugin.connect("on_consent_form_load_failure_listener", func(form_error_dictionary : Dictionary):
on_consent_form_load_failure_listener.call_deferred(FormError.create(form_error_dictionary))
)
, CONNECT_ONE_SHOT)
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The Godot AdMob Plugin from Poing Studios simplifies the process for Godot devel

To access the plugin, you can either download the Godot package provided or explore its source code on GitHub through the links below.

[Download from GitHub](https://github.com/Poing-Studios/godot-admob-plugin/releases/latest){ .md-button .md-button--primary } [Download from AssetLibrary](https://godotengine.org/asset-library/asset/2063){ .md-button .md-button--primary } [Source Code](https://github.com/Poing-Studios/godot-admob-plugin){ .md-button .md-button--primary }
[Download from GitHub](https://github.com/poingstudios/godot-admob-plugin/releases/latest){ .md-button .md-button--primary } [Download from AssetLibrary](https://godotengine.org/asset-library/asset/2063){ .md-button .md-button--primary } [Source Code](https://github.com/poingstudios/godot-admob-plugin){ .md-button .md-button--primary }

### Importing the Godot AdMob Plugin on Project

Expand All @@ -49,7 +49,7 @@ The AdMob plugin for Godot is conveniently available via AssetLib. To import thi
1. In Godot, navigate to `Project > Tools > AdMob Download Manager > Android > LatestVersion`.
2. This action will download the appropriate Android library into your project, which is located at `res://addons/admob/downloads/android/`.

If you encounter any issues with the download, you can try downloading the library manually by clicking [here](https://github.com/Poing-Studios/godot-admob-android/releases/latest).
If you encounter any issues with the download, you can try downloading the library manually by clicking [here](https://github.com/poingstudios/godot-admob-android/releases/latest).

=== "iOS"

Expand All @@ -58,7 +58,7 @@ The AdMob plugin for Godot is conveniently available via AssetLib. To import thi
1. In Godot, navigate to `Project > Tools > AdMob Download Manager > iOS > LatestVersion`.
2. This action will download the appropriate iOS library into your project, which is located at `res://addons/admob/downloads/ios/`.

If you encounter any issues with the download, you can try downloading the library manually by clicking [here](https://github.com/Poing-Studios/godot-admob-ios/releases/latest).
If you encounter any issues with the download, you can try downloading the library manually by clicking [here](https://github.com/poingstudios/godot-admob-ios/releases/latest).

### Installing

Expand Down
2 changes: 1 addition & 1 deletion docs/ad_formats/banner/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,6 @@ Below is a table presenting the standard banner ad sizes:
## Further References

### Samples
- [Sample Project](https://github.com/Poing-Studios/godot-admob-plugin/tree/master/addons/admob/sample): A Minimal Illustration of usage of all Ad Formats
- [Sample Project](https://github.com/poingstudios/godot-admob-plugin/tree/master/addons/admob/sample): A Minimal Illustration of usage of all Ad Formats


2 changes: 1 addition & 1 deletion docs/ad_formats/interstitial.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ Remember that implementing interstitial ads should enhance, not detract from, th
## Further References

### Samples
- [Sample Project](https://github.com/Poing-Studios/godot-admob-plugin/tree/master/addons/admob/sample): A Minimal Illustration of usage of all Ad Formats
- [Sample Project](https://github.com/poingstudios/godot-admob-plugin/tree/master/addons/admob/sample): A Minimal Illustration of usage of all Ad Formats
Loading

0 comments on commit b1f496e

Please sign in to comment.