marcojak / mauimtadmob Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi, will NuGet support Native Ads in the future?
On my Maui app,
Match rates are always %100
Interstatial Show Rate is about %10,
Rewarded Video Show Rate is about %50, what may be the reason of that any idea?
my banner show rates are always around %85
Regards.
I don't know if it's just me. But I have a routine that sets the AdId programmatically, and I am receiving this error
Java.Lang.IllegalStateException: 'The ad size and ad unit ID must be set before loadAd is called.'
this is the way I am setting the ads.
I am using the MVVM with the Maui Toolkit
public partial class MyViewModel : ObservableObject
{
[ObservableProperty]
private string _adsBanner; // I set this value when the navigation to the page is called
}
<admob:MTAdView
AdSize="Banner"
AdsId="{Binding AdsBanner}" />
My MauiProgram
var builder = MauiApp.CreateBuilder();
builder
.UseMauiMTAdmob()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSansRegular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSansSemibold.ttf", "OpenSansSemibold");
});
This is some logs I am receiving
Loaded assembly: Anonymously Hosted DynamicMethods Assembly [External]
[DynamiteModule] Local module descriptor class for com.google.android.gms.ads.dynamite not found.
[DynamitePackage] Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
[Ads] This request is sent from a test device.
[DynamiteModule] Local module descriptor class for com.google.android.gms.ads.dynamite not found.
[Ads] Not retrying to fetch app settings
[EGL_emulation] eglCreateContext: 0xad295390: maj 2 min 0 rcv 2
[DynamiteModule] Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:234310602
[DynamiteModule] Selected remote version of com.google.android.gms.ads.dynamite, version >= 234310602
[EGL_emulation] eglCreateContext: 0xad296820: maj 2 min 0 rcv 2
[DynamiteModule] Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:234310602
[DynamiteModule] Selected remote version of com.google.android.gms.ads.dynamite, version >= 234310602
xplicit concurrent copying GC freed 75555(4111KB) AllocSpace objects, 58(3772KB) LOS objects, 49% free, 9184KB/17MB, paused 234us total 16.321ms
The thread 0x8f9c has exited with code 0 (0x0).
The thread 0x8dcc has exited with code 0 (0x0).
The thread 0x2c0 has exited with code 0 (0x0).
The thread 0x9578 has exited with code 0 (0x0).
**Java.Lang.IllegalStateException:** 'The ad size and ad unit ID must be set before loadAd is called.'
Version 1.0.2 was also tested in version 1.0.4
Project using net7.0-android
I had this running quite well and ads were showing in a Maui cross-platform solution for Android and iOS target .Net 7
I cleaned the Solution and rebuilt once all was looking good and then get these errors.
I've had to remove this plugin and comment the few code snippets and amend the manifest and plist.
All back to normal but no ads :(
Any advice from anyone here? I'm sure its an iOS/.Net 7/Firebase version incompatiblity.
Severity Code Description Project File Line Suppression State
Error MSB3027 Could not copy "C:\Users\linds.nuget\packages\xamarin.firebase.ios.core\8.10.0.3\lib\net6.0-ios15.4\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_x86_64-simulator\GoogleUtilitiesComponents.framework\PrivateHeaders\GULCCComponentContainerInternal.h" to "bin\Debug\net7.0-ios\iossimulator-x64\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_x86_64-simulator\GoogleUtilitiesComponents.framework\PrivateHeaders\GULCCComponentContainerInternal.h". Exceeded retry count of 10. Failed.
Severity Code Description Project File Line Suppression State
Error MSB3021 Unable to copy file "C:\Users\linds.nuget\packages\xamarin.firebase.ios.core\8.10.0.3\lib\net6.0-ios15.4\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_x86_64-simulator\GoogleUtilitiesComponents.framework\PrivateHeaders\GULCCComponentContainerInternal.h" to "bin\Debug\net7.0-ios\iossimulator-x64\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_x86_64-simulator\GoogleUtilitiesComponents.framework\PrivateHeaders\GULCCComponentContainerInternal.h". Could not find a part of the path 'bin\Debug\net7.0-ios\iossimulator-x64\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_x86_64-simulator\GoogleUtilitiesComponents.framework\PrivateHeaders\GULCCComponentContainerInternal.h'.
I have installed VS 2022 and tried to migrate my project from VS 2019. My VS 2019 project worked ok with the original MTAdmob, however, when building the new project I receive the following error message:
System.IO.FileNotFoundException: Could not load assembly 'Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken='.
If I remove the MauiMTAdmob nuget package and all code references from my VS 2022 project then the rest of my app builds and runs without an issue.
Steps to reproduce:
Versions:
Microsoft Visual Studio Community 2022 (64-bit)
Version 17.3.3
dotnet version 6.0.400
Logs
There is a build error in release mode that mentions the package:
Precompiling failed for C:\Users\hidden\obj\Release\net6.0-android\android-x86\linked\Plugin.MauiMtAdmob.dll.
Failed to load method 0x6000095 from 'C:\Users\hidden\obj\Release\net6.0-android\android-x86\linked\Plugin.MauiMtAdmob.dll' due to Could not load file or assembly 'Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies..
Mono Ahead of Time compiler - compiling assembly C:\Users\hidden\obj\Release\net6.0-android\android-x86\linked\Plugin.MauiMtAdmob.dll
AOTID 030115F2-9CB1-3D92-0052-0036762132E1
Using profile data file 'C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\targets\dotnet.aotprofile'
Run with MONO_LOG_LEVEL=debug for more information.
AOT of image obj\Release\net6.0-android\android-x86\linked\Plugin.MauiMtAdmob.dll failed. hidden C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\targets\Microsoft.Android.Sdk.Aot.targets 91
Debug build log output:
1>Build FAILED.
1>
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: System.IO.FileNotFoundException: Could not load assembly 'Microsoft.Maui, Version=1.0.0.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: File name: 'Microsoft.Maui.dll'
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters) in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs:line 245
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: at Mono.Cecil.MetadataResolver.Resolve(TypeReference type) in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/cecil/Mono.Cecil/MetadataResolver.cs:line 111
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: at Mono.Cecil.TypeReference.Resolve() in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/cecil/Mono.Cecil/TypeReference.cs:line 278
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: at Java.Interop.Tools.Cecil.TypeDefinitionCache.Resolve(TypeReference typeReference) in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionCache.cs:line 20
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: at Java.Interop.Tools.Cecil.TypeDefinitionRocks.<GetTypeAndBaseTypes>d__5.MoveNext() in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionRocks.cs:line 40
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: at Java.Interop.Tools.Cecil.TypeDefinitionRocks.IsSubclassOf(TypeDefinition type, String typeName, IMetadataResolver resolver) in /Users/runner/work/1/s/xamarin-android/external/Java.Interop/src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/TypeDefinitionRocks.cs:line 94
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: at MonoDroid.Tuner.FixAbstractMethodsStep.FixAbstractMethods(AssemblyDefinition assembly)
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: at Xamarin.Android.Tasks.LinkAssembliesNoShrink.RunTask()
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\32.0.448\tools\Xamarin.Android.Common.targets(1388,3): error XALNS7028: at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs
```:line 17
Hi,
I'm using your component and am really confident with it. But now Google has announced this:
"Later this year, Google will require all publishers serving ads to EEA and UK users to use a Google-certified Consent Management Platform (CMP). You can use any Google-certified CMP for this purpose, including Google's own consent management solution. If you are interested in using Google's consent management solution, start by setting up your GDPR message and implementing the UMP SDK. Learn more.
So my question is: Are you going to support this in a future version of the component?
Kind regards
Frank
The window consists of a vertical stack containing:
Horizontal stack
Horizontal stack
Collection View
MTAdView
Because the ad takes some time to connect to its source, the CollectionView occupies ALL thescreen available to it and when the ad arives it shows on top of the last item in the CollectionView.
If MTAdView control is moved before the CollectionView everything works correctly.
It seems like the MtAdMob does not request height unless the ad has arrived...
<ContentPage.Resources>
<converters:ShortDateConverter x:Key="ShortDateConverter"/>
<converters:PortionConverter x:Key="PortionConverter"/>
<converters:CookStatusConverter x:Key="CookStatusConverter"/>
<converters:DateColorConverter x:Key="DateColorConverter"/>
<converters:DrawerConverter x:Key="DrawerConverter"/>
<converters:ColorConverter x:Key="ColorsConverter"/>
</ContentPage.Resources>
<ContentPage.BindingContext>
<local:RemovePageViewModel />
</ContentPage.BindingContext>
<Shell.TitleView HorizontalOptions="FillAndExpand" >
</Shell.TitleView>
<CollectionView.ItemTemplate>
<Grid.RowDefinitions>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
<VisualStateManager.VisualStateGroups>
<VisualState.Setters>
</VisualState.Setters>
</VisualStateManager.VisualStateGroups>
</CollectionView.ItemTemplate>
<edt:SfComboBox x:Name="SubType" WidthRequest="160" HorizontalOptions="Center" FontSize="14"
BackgroundColor="White"
IsEditable="false" MaxDropDownHeight="500" ItemsSource="Binding Level1_Items"
DisplayMemberPath="title" Opacity="0.5" IsEnabled="False"
TextColor="DarkBlue" ClassId="1" SelectedIndex="-1">
</edt:SfComboBox>
<edt:SfComboBox x:Name="DetailedType" WidthRequest="160" HorizontalOptions="Center" FontSize="14"
BackgroundColor="White"
IsEditable="false" MaxDropDownHeight="600" ItemsSource="Binding Level2_Items"
DisplayMemberPath="title" Opacity="0.5" IsEnabled="False"
TextColor="DarkBlue" ClassId="2" SelectedIndex="-1">
</edt:SfComboBox>
<CollectionView.SelectedItem>
model:freezer_item/
</CollectionView.SelectedItem>
<CollectionView.ItemTemplate>
</CollectionView.ItemTemplate>
<controls:MTAdView x:Name="SettingsAd0" AdsId="ca-app-pub-3940256099942544/6300978111"
HeightRequest="50" AdSize="Banner"/>
Seems like every time I want to test and give this package another chance, it always messes up my apps. Thank heavens for GitHub. Clearly a bit more work needs to be done. Thanks though
I have tried this with the sample, and I can't get any AdViews to load.
Visual Studio 17.5.4
.NET 7.0 iOS
Xcode 14.2
iPhone 14 Pro Max running 16.4.1
When I change the Application ID and AdsId to match something from my own AdMob setup, and set the package name to my own app's package name so it will install, it installs on my phone but refuses to run and crashes as soon as it starts up.
Stack trace attached. Since it's happening with the sample app I have to figure it's something with the library.
This happens when you deploy a debug version to the device directly, or upload to TestFlight and install that way. Either way it crashes. The stack trace included here is from a debug run
Hello.
Thanks for plugin but there's an error.
Microsoft.Maui.Platform.HandlerNotFoundException: 'Handler not found for view Plugin.MauiMTAdmob.Controls.MTAdView.'
Can you help?
Bug:
As soon the app open on a page where there is a banner the app crash instantly. It is only a problem on IOS as it works like a charm on Android. It also works fine on IOS Simulator, the problem is only on a real device. I am building with a Macbook and download the app through Testflight.
Phone
OS: iOS
Version 16.4
In my page, I added a Rewarded
adv. In the constructor of the page I added
public ProfilePage(ProfilePageViewModel model)
{
InitializeComponent();
#if ANDROID || IOS
CrossMauiMTAdmob.Current.TagForChildDirectedTreatment = MTTagForChildDirectedTreatment.TagForChildDirectedTreatmentUnspecified;
CrossMauiMTAdmob.Current.TagForUnderAgeOfConsent = MTTagForUnderAgeOfConsent.TagForUnderAgeOfConsentUnspecified;
CrossMauiMTAdmob.Current.MaxAdContentRating = MTMaxAdContentRating.MaxAdContentRatingG;
#endif
}
then on Clicked
I added this code
private async void buttonEarn_Clicked(object sender, EventArgs e)
{
#if IOS || ANDROID
CrossMauiMTAdmob.Current.LoadRewarded(DeviceInfo.Current.Platform == DevicePlatform.Android ? Constants.AndroidReward1 : Constants.iOSReward1);
CrossMauiMTAdmob.Current.ShowRewarded();
#else
await DisplayAlert(AppResources.AdvNewPointsTitle, AppResources.AdvNoPlatformSupported, AppResources.OK);
#endif
}
The result is that I have to click a few times before the app shows the rewarded adv. Here a video.
After the first time, to click again on the button, I have to restart the app.
its posible to use it in blazor hybrid maui ?
Hi,
I have my MAUI app with NET8. The plugin is working but the advs are not displayed after the first adv is displayed.
I have to close the app and reopen it to see another advertisement.
Basically, I want to display a rewarding advertisement after a user activity. Between one activity and another could pass a few minutes.
Do you know if this is a common issue?
Thank you in advance,
Enrico
When I add MauiMTAdmob package to my application and try to build it on iOS, project doesn't build and I can see following error in visual studio:
File 'C:/Users/username/AppData/Local/XamarinBuildDownloadCache/FAdM-8.13.0/Frameworks/GoogleMobileAdsFramework-Current/GoogleMobileAds.xcframework/ios-arm64_armv7/GoogleMobileAds.framework/GoogleMobileAds' is not a valid framework: Index and count must refer to a location within the buffer.
iOS
.net MAUI 8.0.3
Xcode 15.1
xmlns:admod="clr-namespace:Plugin.MauiMTAdmob.Controls;assembly=Plugin.MauiMtAdmob"
<admod:MTAdView Grid.Row="2" x:Name="myAds" AdSize="AnchoredAdaptive" IsVisible="true"
AdsId="{Binding AdbannerId}" VerticalOptions="End"
HeightRequest="{OnIdiom Phone=50, Tablet=90, Desktop=90}" />
My MAUI page has crash when add above code.
I use:
Do I miss something?
Thank you.
As i heard Native Ads bring more income thats why many people need this.
And I couldnt find a way for App Open Ads.
thanks
Sorry for using the issues page to report this but the page where the tutorial was hosted has been offline for a few days.
My app.xaml.cs file contains this:
using Plugin.MauiMTAdmob;
namespace MauiApp2
{
public partial class App : Application
{
public App()
{
InitializeComponent();
// Set the Ad Unit ID based on the platform
CrossMauiMTAdmob.Current.AdsId =
DeviceInfo.Platform == DevicePlatform.Android
? "ca-app-pub-3940256099942544/8214777181"
: "ca-app-pub-3940256099942544/4255350878";
MainPage = new AppShell();
}
}
}
how can I use the value of CrossMauiMTAdmob.Current.AdsId in my MainPage.xaml?
RuntimeException: 'Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException
many lib not support .net 7.0 please 6.0...
Whenever I put the .aar file as android library it throws this exception:
The type 'ConsentDebugSettings' already contains a definition for 'DebugGeography' AdMobTest (net7.0-android)
C:\Users\lamin\OneDrive\Visual Studio\MAUI\AdMobTest\obj\Debug\net7.0-android\generated\src\Com.Google.Android.Ump.ConsentDebugSettings.cs
When I try to run my project I get an error saying package com.google.android.ump does not exist
The readme does mention you might have to install some packages. So I tried installing Plugin.GoogleUserMessagingPlatform, but I am still getting the error. What I am suppose to do to resolve the error?
I'm using Admob well.
My particular client talked about Ad Manager and I don't know if it's compatible
After a lot of research, I couldn't find a solution to integrate the library using Blazor.
Is it possible to use this library with Blazor or is it impossible?
Is there a possibility of creating a solution for this?
Since the last update of Visual Studio to version 17.6.2 an app I am developing stubbornly refuses to show AdMob ads.
I have set an event handler for the ad loading on android, and checked that the ad s do not load at all.
The ad I am trying to load is the standard Google banner test ad ca-app-pub-3940256099942544/6300978111.
On Android, I upgraded 1.0.2 to 1.0.4 an error will be thrown. I found out is the Plugin.Firebase 1.2.5 that has a conflict with 1.0.4.
Reverting it back to 1.0.2, clear the BIN and OBJ will work again.
Here is the error:
Severity Code Description Project File Line Suppression State
Error JAVA0000 Error in obj\Debug\net7.0-android\lp\314\jl\classes.jar:com/google/android/gms/measurement/internal/zzfj.class:
Type com.google.android.gms.measurement.internal.zzfj is defined multiple times: obj\Debug\net7.0-android\lp\314\jl\classes.jar:com/google/android/gms/measurement/internal/zzfj.class, obj\Debug\net7.0-android\lp\315\jl\classes.jar:com/google/android/gms/measurement/internal/zzfj.class
Compilation failed
java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: obj\Debug\net7.0-android\lp\314\jl\classes.jar
com/google/android/gms/measurement/internal/zzfj.class
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:98)
at com.android.tools.r8.D8.main(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:4)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: obj\Debug\net7.0-android\lp\314\jl\classes.jar:com/google/android/gms/measurement/internal/zzfj.class
at Version.fakeStackEntry(Version_3.3.75.java:0)
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:75)
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:28)
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:27)
at com.android.tools.r8.internal.Fj.b(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:2)
at com.android.tools.r8.D8.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:22)
at com.android.tools.r8.D8.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:17)
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:85)
... 1 more
Caused by: com.android.tools.r8.internal.f: Type com.google.android.gms.measurement.internal.zzfj is defined multiple times: obj\Debug\net7.0-android\lp\314\jl\classes.jar:com/google/android/gms/measurement/internal/zzfj.class, obj\Debug\net7.0-android\lp\315\jl\classes.jar:com/google/android/gms/measurement/internal/zzfj.class
at com.android.tools.r8.internal.JT.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:14)
at com.android.tools.r8.internal.JT.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:22)
at com.android.tools.r8.internal.HN.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:33)
at com.android.tools.r8.internal.HN.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:10)
at java.base/java.util.concurrent.ConcurrentHashMap.merge(ConcurrentHashMap.java:2048)
at com.android.tools.r8.internal.HN.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:6)
at com.android.tools.r8.graph.B2$a.e(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:4)
at com.android.tools.r8.dex.b.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:110)
at com.android.tools.r8.dex.b.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:28)
at com.android.tools.r8.D8.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:25)
at com.android.tools.r8.D8.d(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:606)
at com.android.tools.r8.D8.c(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:1)
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:24)
... 5 more
Directory 'obj\Debug\net7.0-android\lp\314' is from 'play-services-measurement-base.aar'. SGPool.Maui 1
Ads are seems to have left and right padding with Maui. And Centered.
Hi,
I am getting below error when installing this nuget package. Did I miss anything here? How to resolve? Thanks,
Severity Code Description Project File Line Suppression State
Error Could not find a part of the path 'C:\Users\XXXX.nuget\packages\xamarin.firebase.ios.core\8.10.0.1\lib\net6.0-ios15.4\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_i386_x86_64-simulator\GoogleUtilitiesComponents.framework\Headers\GoogleUtilitiesComponents-umbrella.h'.
This is an open question. Is this plugin has some solution to display advertisements on Windows and macOS?
Is there any provider that offers an SDK for MAUI to display advertisements for this platforms?
Thank you in advance,
Enrico
Severity Code Description Project File Line Suppression State
Error Could not find a part of the path 'C:\Users\user.nuget\packages\xamarin.firebase.ios.core\8.10.0.1\lib\xamarinios10\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_i386_x86_64-simulator\GoogleUtilitiesComponents.framework\PrivateHeaders\GULCCComponentContainerInternal.h'.
The error is above.
Hello,
I've been using your xamarin plugin for a long time and really liked the simplicity so thank you.
Since moving to MAUI I've found your work to be helpful yet again!
I'm trying to use this plugin in combination with https://github.com/TobiasBuchholz/Plugin.Firebase specifically the crashalytics(works fine) and the analytics. After installing the analytics plugin if MauiMTAdmob is also installed it causes the following crash;
Error in obj\Debug\net7.0-android33.0\lp\233\jl\classes.jar:com/google/android/gms/internal/measurement/zzef.class:
Type com.google.android.gms.internal.measurement.zzef is defined multiple times: obj\Debug\net7.0-android33.0\lp\233\jl\classes.jar:com/google/android/gms/internal/measurement/zzef.class, obj\Debug\net7.0-android33.0\lp\261\jl\classes.jar:com/google/android/gms/internal/measurement/zzef.class
Compilation failed
java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: obj\Debug\net7.0-android33.0\lp\233\jl\classes.jar
com/google/android/gms/internal/measurement/zzef.class
at com.android.tools.r8.internal.Fj.a(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:98)
at com.android.tools.r8.D8.main(R8_3.3.75_b7a6ff6b13548611571508fe72282c9167faa649161ca0013edfc92e19bd7e58:4)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: obj\Debug\net7.0-android33.0\lp\233\jl\classes.jar:com/google/android/gms/internal/measurement/zzef.class
at Version.fakeStackEntry(Version_3.3.75.java:0)
<Removed>
Directory 'obj\Debug\net7.0-android33.0\lp\233' is from 'play-services-measurement-sdk-api.aar'.
I've found the conflict appears to be between the Admob plugin and the Plugin.firebase.analytics
I've tried googling to no avail do you have any recommendation on how I can fix this?
I'm quite new to MAUI/Xamarin so please forgive me if it's a really obvious solution.
Simple minimum repo;
https://github.com/Noobicle/MauiBuildErrorMin
When trying to load an interstitial ad I get an error saying Local module descriptor class for com.google.android.gms.ads.dynamite not found
The full stacktrace:
[Ads] Failed to instantiate ClientApi class. [DynamiteModule] Local module descriptor class for com.google.android.gms.ads.dynamite not found. [DynamiteModule] Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:221908400 [DynamiteModule] Selected remote version of com.google.android.gms.ads.dynamite, version >= 221908400 [DynamitePackage] Instantiated singleton DynamitePackage. [DynamitePackage] Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl [Ads] This request is sent from a test device. [ConnectionStatusConfig] Dynamic lookup for intent failed for action: com.google.android.gms.leibniz.events.service.START [GmsClient] unable to connect to service: com.google.android.gms.leibniz.events.service.START on com.google.android.gms [WebViewFactory] Loading com.google.android.webview version 83.0.4103.106 (code 410410686) [anyname.routin] The ClassLoaderContext is a special shared library. [nativeloader] classloader namespace configured for unbundled product apk. library_path=/product/app/WebViewGoogle/lib/x86_64:/product/app/WebViewGoogle/WebViewGoogle.apk!/lib/x86_64:/product/app/TrichromeLibrary/TrichromeLibrary.apk!/lib/x86_64:/product/lib64:/system/product/lib64 [anyname.routin] The ClassLoaderContext is a special shared library. [nativeloader] classloader namespace configured for unbundled product apk. library_path=/product/app/WebViewGoogle/lib/x86_64:/product/app/WebViewGoogle/WebViewGoogle.apk!/lib/x86_64:/product/app/TrichromeLibrary/TrichromeLibrary.apk!/lib/x86_64:/product/lib64:/system/product/lib64 [cr_LibraryLoader] Loaded native library version number "83.0.4103.106" [cr_CachingUmaRecorder] Flushed 3 samples from 3 histograms. [DynamiteModule] Local module descriptor class for com.google.android.gms.ads.dynamite not found. [Ads] Invoke Firebase method getInstance error. [Ads] The Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires the latest Firebase SDK jar, but Firebase SDK is either missing or out of date [DynamiteModule] Local module descriptor class for com.google.android.gms.ads.dynamite not found.
Hello,
Just to let you know, the tutorial link have been down for more than a week.
When loading the MauiMTAdmob Sample application (with no changes), 2 events fire shortly after the Main page loads:
This results in an ad being displayed in the center of the page.
A short time later, these two events fire again, with a new ad, and again with a third... etc.
I would like to control when the ads appear. How do we suppress or control these initial 2 events? Are they on an unexposed timer somewhere?
I use CrossMauiMTAdmob.Current.LoadInterstitial(interstitialsAdId);
to load interstitial and show it if it is ready.
First time, everything works.
But if I want to load ad second time it will never be loaded.
I subscribe for OnInterstitialLoaded
(never called) or check CrossMauiMTAdmob.Current.IsInterstitialLoaded()
(always false)
I have a .net7 Maui app and .net7 maui class library projects. I am using MVVM.
I have done the following:
I am getting the following error for controls:MTAdView/
The type 'controls:MTAdView' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
Am I doing something wrong or is there an issue with this package?
Microsoft.Maui.Platform.HandlerNotFoundException
HResult=0x80131500
메시지=Handler not found for view Plugin.MauiMTAdmob.Controls.MTAdView.
소스=Microsoft.Maui
StackTrace:
/ Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
/ Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context)
/ Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view)
/ Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
/ Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
/ Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context)
/ Microsoft.Maui.Handlers.LayoutHandler.SetVirtualView(IView view)
/ Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
/ Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
/ Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context)
/ Microsoft.Maui.Handlers.ContentViewHandler.UpdateContent(IContentViewHandler handler)
/ Microsoft.Maui.PropertyMapper.UpdateProperties(IElementHandler viewHandler, IElement virtualView)
/ Microsoft.Maui.Handlers.ContentViewHandler.SetVirtualView(IView view)
/ Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
/ Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context)
/ Microsoft.Maui.Platform.ElementExtensions.ToPlatform(IElement view, IMauiContext context)
/ Microsoft.Maui.Handlers.WindowHandler.MapContent(IWindowHandler handler, IWindow window)
/ Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent)
/ Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes)
/ Microsoft.Maui.Controls.BindableObject.SetValue(BindableProperty property, Object value, Boolean fromStyle, Boolean checkAccess)
/ Microsoft.Maui.Controls.Application.set_MainPage(Page value)
/ TranslateLab.Views.Componnent.LoadingView.d__5.MoveNext() 파일
When try install the nuget package:
Error No se puede encontrar una parte de la ruta de acceso 'C:\Users\mbernal\.nuget\packages\xamarin.firebase.ios.core\8.10.0.3\lib\net6.0-ios15.4\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_x86_64-simulator\GoogleUtilitiesComponents.framework\PrivateHeaders\GULCCComponentContainerInternal.h'.
I have VS2022 community 17.4.4
Maui-check:
OpenJDK 11.0 Checkup...
- 11.0.16.1 (C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\bin\..)
- 11.0.12 (C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin\..)
> Visual Studio 17.3.0-pre.2.0 Checkup...
- 17.5.0-pre.3.0 - C:\Program Files\Microsoft Visual Studio\2022\Preview
- 17.4.4 - C:\Program Files\Microsoft Visual Studio\2022\Community
> Android SDK Checkup...
- emulator (31.2.10)
- build-tools;31.0.0 (31.0.0)
- platforms;android-31 (1)
- system-images;android-31;google_apis;x86_64 (9)
- platform-tools (33.0.2)
- cmdline-tools;5.0 (5.0)
> Android Emulator Checkup...
- Emulator: pixel_2_-_api_31 found.
> .NET SDK Checkup...
- 6.0.302 - C:\Program Files\dotnet\sdk\6.0.302
- 6.0.308 - C:\Program Files\dotnet\sdk\6.0.308
- 6.0.401 - C:\Program Files\dotnet\sdk\6.0.401
- 6.0.402 - C:\Program Files\dotnet\sdk\6.0.402
- 6.0.405 - C:\Program Files\dotnet\sdk\6.0.405
- 7.0.102 - C:\Program Files\dotnet\sdk\7.0.102
- 7.0.200-preview.22628.1 - C:\Program Files\dotnet\sdk\7.0.200-preview.22628.1
> .NET SDK - Workload Deduplication Checkup...
> Edge WebView2 Checkup...
- Found Edge WebView2 version 109.0.1518.52
> .NET SDK - Workloads (6.0.301) Checkup...
- android (Microsoft.NET.Sdk.Android.Manifest-6.0.300 : 32.0.440) installed.
- ios (Microsoft.NET.Sdk.iOS.Manifest-6.0.300 : 16.1.229) installed.
- maccatalyst (Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.400 : 16.1.229) installed.
- tvos (Microsoft.NET.Sdk.tvOS.Manifest-6.0.400 : 16.1.229) installed.
- macos (Microsoft.NET.Sdk.macOS.Manifest-6.0.400 : 13.0.784) installed.
- maui (Microsoft.NET.Sdk.Maui.Manifest-6.0.300 : 6.0.419) installed.
I got the interstitial to work inside a Maui Blazor application. However my banner ad is displaying a black bar. Is there anyway to display the banner ad without using XAML? How do you attach the MTAdView to your layout if you are using HTML?
Installed the nuget package to test, now after remove the nuget package getting an error:
Java.Lang.RuntimeException: 'Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:
How to step back?
After loading the advertisement through LoadRewarded,
ShowRewarded Reward Ads appears on the screen.
But ShowRewarded again,
the advertisement will not be exposed,
also LoadRewarded again and ShowRewarded, Not working this function.
MTAdView control in Xaml throws exception for WinUI apps.
I know that this plugin only functions for Android and iOS but placing the MTAdView control on a page on the WinUI platform results in a run-time exception in InitializeComponent. Any code using the MTAdView compiles fine, it just crashes immediately.
Your Xamarin plugin allows this: an MTAdView on a Xaml Page for Xamarin.UWP uses zero page real estate and the page is fully functional. My Xamarin app for Android, iOS, and UWP is able to use the same Xaml for all platforms.
This crash on Maui hinders its useability for cross-platform development. It is possible to code around this by creating the control in xaml.cs code-behind (inside blocks of "if DevicePlatform.Android or DevicePlatform.iOS") but this obviously isn't ideal.
Ideally, this should function as the plugin does on Xamarin. Allow definition of MTAdView for all platforms which results in initializing a view with height and width of zero.
After upgrade:
ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/FirebaseCore.framework/FirebaseCore' contains bitcode.
ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/FirebaseCoreDiagnostics.framework/FirebaseCoreDiagnostics' contains bitcode.
ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher' contains bitcode.
ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/GoogleAPIClientForREST.framework/GoogleAPIClientForREST' contains bitcode.
ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/GoogleDataTransport.framework/GoogleDataTransport' contains bitcode.
ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac' contains bitcode.
ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/GoogleUtilities.framework/GoogleUtilities' contains bitcode.
ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/Protobuf.framework/Protobuf' contains bitcode.
ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/leveldb.framework/leveldb' contains bitcode.
ITMS-90482: Invalid Executable - The executable 'MyApp.app/Frameworks/nanopb.framework/nanopb' contains bitcode.
How can I fix it?
Thank you.
I am getting the following error while installing the MauiMTAdmob
NuGet package:
'C:\Users\Nikolay.IT\.nuget\packages\xamarin.firebase.ios.core\8.10.0.1\lib\xamarinios10\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64_i386_x86_64-simulator\GoogleUtilitiesComponents.framework\Headers\GoogleUtilitiesComponents-umbrella.h'.
Hey,
I've followed the set-up docs and everything appears correctly set up.
I'm using my own App ID and Banner ID
Added a banner to the middle of my page and upon running i get a null exception.
Seems to be something to do with the AdSizeConstraint.
I've included logs, any chance you could help me work out the issue?
Added Xaml incase this helps
<controls:MTAdView
AdSize="Banner"
AdsId="ca-app-pub-xxxxxxxxxxxxx"
x:Name="myAds"></controls:MTAdView>
Its going to be something simple that im missing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.