Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(BREAKING CHANGES) Refactoring MobileAds API to v3.0.0 #82

Closed
7 tasks done
gumaciel opened this issue May 6, 2023 · 3 comments · Fixed by #90
Closed
7 tasks done

(BREAKING CHANGES) Refactoring MobileAds API to v3.0.0 #82

gumaciel opened this issue May 6, 2023 · 3 comments · Fixed by #90
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@gumaciel
Copy link
Contributor

gumaciel commented May 6, 2023

Is your feature request related to a problem? If so, please describe.

This change intends to change many of the plugins in all aspects, in order to make the plugin more dynamic and easy to use, it is necessary almost completely to redo the plugin to meet the use of mediation.

⚠️WARNING⚠️:

  • No long support for Godot 3 due to the high complexity of refactoring (but there's the godot3 branch such as the supported versions in the release tab)
  • Next tag release will be v3.0.0, when Godot 5 arrives probably will be v4.0.0, and create a branch to store the old version.
  • Will be release with Android and iOS version

What feature or improvement would you like to see?

✅GOALS✅

  • Create an Interface of MobileAds class with GDScript with the most important methods used on AdMob.

Example:

extends Control

func _ready() -> void:
	MobileAds.initialize(OnInitializationCompleteListener.new(_on_initialization_complete))

func _on_initialization_complete(initialization_status : InitializationStatus) -> void:
	for key in initialization_status.adapter_status_map:
		var adapterStatus : AdapterStatus = initialization_status.adapter_status_map[key]
		prints(key, adapterStatus.latency, adapterStatus.initialization_status, adapterStatus.description)

Android documentation: https://developers.google.com/admob/android/mediate#java

import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.initialization.AdapterStatus;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;

public class MainActivity extends AppCompatActivity {

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        MobileAds.initialize(this, new OnInitializationCompleteListener() {
            @Override
            public void onInitializationComplete(InitializationStatus initializationStatus) {
                Map<String, AdapterStatus> statusMap = initializationStatus.getAdapterStatusMap();
                for (String adapterClass : statusMap.keySet()) {
                    AdapterStatus status = statusMap.get(adapterClass);
                    Log.d("MyApp", String.format(
                            "Adapter name: %s, Description: %s, Latency: %d",
                            adapterClass, status.getDescription(), status.getLatency()));
                }

                // Start loading ads here...
            }
        });
    }
}

Other goals could be increased during the development

Additional context

Should be in the next minor release (e.g.: v3.1.0):

  • Creational of Unit Tests to have a little more assurance the plugin will work well (probably use gdUnit4)

Release Planning, Version Support, and Versioning:

#87

Calendar Version Support:

#88

@Momo90k
Copy link

Momo90k commented Jul 11, 2023

Is mediation finally supported?
If yes, can I use the plugin with Godot version 3.5.+?
Thank you for your work.

@gumaciel
Copy link
Contributor Author

Hi @Momo90k , it will be supported when this issue is closed and merged on master branch

This refactoring aims to Godot v4.1.

This should work on 3.5+, but you will need to write usage of this plugin in Godot in your way, when this issue closes, it will be all ready for 4.1.

@Momo90k
Copy link

Momo90k commented Jul 15, 2023

Ok. Thank you.

@gumaciel gumaciel changed the title (BREAKING CHANGES) Refactoring MobileAds API to v2.0.0 (BREAKING CHANGES) Refactoring MobileAds API to v3.0.0 Aug 14, 2023
gumaciel added a commit that referenced this issue Aug 20, 2023
gumaciel added a commit that referenced this issue Aug 23, 2023
gumaciel added a commit that referenced this issue Aug 23, 2023
gumaciel added a commit that referenced this issue Aug 23, 2023
gumaciel added a commit that referenced this issue Aug 23, 2023
gumaciel added a commit that referenced this issue Aug 23, 2023
@gumaciel gumaciel linked a pull request Aug 23, 2023 that will close this issue
@gumaciel gumaciel unpinned this issue Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants