Benutzer-Werkzeuge

Webseiten-Werkzeuge


privat:programmieren:mtadmob_plugin:mtadmob_plugin

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
privat:programmieren:mtadmob_plugin:mtadmob_plugin [2025/12/30 10:05] vitalijprivat:programmieren:mtadmob_plugin:mtadmob_plugin [2026/01/19 15:24] (aktuell) – gelöscht 216.73.216.40
Zeile 1: Zeile 1:
-    - In der AndroidManifest.xml folgenden code einfügen \\ <code | download> 
-<application  
-  android:allowBackup="true"  
-  android:icon="@mipmap/appicon"  
-  android:roundIcon="@mipmap/appicon_round"  
-  android:supportsRtl="true"> 
-  <meta-data 
-    android:name="com.google.android.gms.ads.APPLICATION_ID" 
-    android:value="ca-app-pub-9661522762240356~5397188219"/> 
-</application> 
-</code> \\ <code | download> 
-android:value="ca-app-pub-9661522762240356~5397188219"/> 
-</code> kommt aus der ADMOB-Seite \\ {{.:pasted:20251230-094049.png}} 
-    - Unter  \\ <code | download> 
-            builder 
-                .UseMauiApp<App>() 
-                //.ConfigureSyncfusionPdfViewer() 
-                .UseMauiMTAdmob() // <--- HIER hinzufügen 
-                .UseLocalNotification() 
-                .ConfigureFonts(fonts => 
-                { 
-                    fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); 
-                    fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); 
-                }); 
-</code> 
-     - Dann legst du eine Datei CrossPlatformAdBanner.cs unter Controls an \\ <code | download> 
-using Microsoft.Maui.Controls; 
-using Plugin.MauiMTAdmob.Controls; 
-using Plugin.MauiMTAdmob.Extra; // ← hier ist BannerSize definiert 
  
-namespace DimCalc.Controls; 
- 
-public class CrossPlatformAdBanner : ContentView 
-{ 
-    public CrossPlatformAdBanner(string AdsId_in) 
-    { 
-#if ANDROID 
-        // Hier läuft AdMob 
-        Content = new AdMMTAdView 
-        { 
-            AdsId = AdsId_in, //"ca-app-pub-9661522762240356/4084106545", 
-            HeightRequest = 50, 
-            AdSize = BannerSize.AnchoredAdaptive 
-        }; 
- 
-#else 
-        // Windows → AdSense via WebView 
-        Content = new WebView 
-        { 
-            HeightRequest = 120, 
-            Source = new UrlWebViewSource 
-            { 
-                Url = "https://deinedomain.de/ads/banner.html" 
-            } 
-        }; 
-#endif 
-    } 
-} 
-</code>  
privat/programmieren/mtadmob_plugin/mtadmob_plugin.1767089117.txt.gz · Zuletzt geändert: von vitalij