A reliable way to display google admanager ads in Flutter - flutter

I am struggling with trying to include ads from google admanager -aka DFP- (not admob).
I have found this package: "flutter_google_ad_manager 0.10.1" https://pub.dev/packages/flutter_google_ad_manager
However, digging into the package's code, it seems to use a PlatfromView that uses a native plugin to display ads on Android and iOS.
I found this comment on https://github.com/flutter/flutter/issues/12114 that discourages the use of PlatfromViews to display ads in flutter:
"Note that because Flutter's AndroidView and UiKitView rely on
low-level manipulation of platform UI components, it's almost
guaranteed that they will interact with the Google Mobile Ads SDK in
ways the mobile ads engineering team have not anticipated and do not
test for. Even if the approach looks like it's working right now, it's
likely to run into issues with MRAID functionality, JS code included
in the creatives, and impression and click measurement. The last of
those is particularly important, since abnormalities in impression and
click stats can result in suspension of accounts.While we work on
these issues with the relevant parties we highly recommend using the
Flutter team's firebase_admob plugin, and discourage using plugins
that do use platform views to embed AdMob ads."
So, what should I do? Is there anyway to display DFP ads with flutter?

Related

Flutter web with Google Place Photos

Successfully using the Google Places API to display location photos in an iOS app. However, apparently this API isn't meant for client-side apps so when I deploy my Flutter app to the web I get a bunch CORS errors.
Unfortunately the docs for the Google Maps API don't speak to Flutter implementations though I found these two Flutter plugins that allow you to work with it:
google_maps_flutter
google_maps_flutter_web
The only issue is that they only provide examples of working with Google Maps and not getting locations photos. Does anyone have experience with these plugins or this issue?
Ideally I wouldn't have to use a plugin at all, I'd like to just be able to hit some endpoint like I can with the Places API, though the docs for this don't mention being able to do this.

FLUTTER WEB: How can we have a single codebase for the Flutter app & Web?

We have a single codebase for Android & iOS in Flutter.
We tried to use the same codebase for Web in Flutter too, but it hadn't gone well.
As of some libraries/plugins, currently unsupported by Flutter SDK.
To mitigate these issues, we are maintaining two separate repositories, one for Android-iOS and other for Web.
Also, to add up here, for separate repositories because each Flutter product has a unique pubspec.yaml file. Now there are a few plugins that are currently supported in App but Not yet on Flutter Web, namely Awesome Notifications, Clevertap plugin, etc.
Integrating those plugins on the web, stops the web to run. So keeping the same codebase for both is getting technically complicated as the app has many many functions.
It takes so much time in simultaneously testing, debugging and resolving issues in Web.
So, how we can maintain same code for all platforms i.e., Android, iOS & Web, without doing it in other repository for Web and gaining advantage in streamlining our codebase into one for all platforms?
For Ex. If I commented the package awesome_notifications for Web in pubspec file, the issue arises (as shown in the screenshot) in code wherever we used its functionalities.
For successfully working on both Mobile & Web, are there any methods available we can use packages for both (Mobile & Web)?
Ideally you’d want to use a single codebase to host both the web and mobile versions, to minimise code maintenance and improve efficiency. To do this, you’ll need to be able to find the platform the code is running on, so that code can be called programmatically.
You can use the constant kIsWeb to check if the application is compiled for the web, and you can then use that condition to only run platform-specific code (such as the awesome_notifications package) if you’re on a platform that supports it. That way you’ll still be able to import the required packages, but only call them when the app is running on the mobile version of your app.
That should allow you to condense your codebase into one repository without sacrificing any functionality that may not work across all platforms.

Local Notifications

I'm building my first app in Flutter and want to include local notifications for Android and iOS. I've searched quite extensively for how to implement these, but every search result on Medium, Youtube, or random website uses flutter_local_notifications on pub.dev (I can't find anything on api.flutter.dev except for icons). I'm sure it's a great resource, but I've been trying to code everything from scratch rather than use these plugins so I can understand the foundational mechanics better.Anyone know of a resource to guide me?
As Notifications are pretty platform-specific, there is no direct approach of calling notifications from flutter itself. You rather have to write your own native code for both ios and android in order to send notifications. For android, you can either use Java or Kotlin as a native language, and for iOS, you use Swift.
You can follow this tutorial in order to get your hands on a native method for calling notifications on android.

show ads in flutter website(flutter web app)

How to implement AdSense or any other to show ads on the flutter website (flutter web app).
Which are the ad provider options like Adsense for a flutter web app.
Currently if you try, your application will be submitted for review, and then you will inaccurately obtain a "Valuable Inventory: No content" flag/violation. The problem is noticed though, but unfortunately it will be a good amount of time before it gets prioritized over the mobile ad framework.
https://github.com/flutter/flutter/issues/40376
I don't think flutter is in a mood to encourage adds on flutter web. Google uses crawlers to search the content on websites which will not work in case of flutter that well event though you try to inject adds through js code using plugin and this made me scrape my whole UI project and start it over again on angular or react.
Take a look at this new package I just saw has been released. Still in the infancy stages as it says but it's a start at least.
https://pub.dev/packages/admanager_web
Example of implementation:
AdBlock(
size: AdBlockSize.largeRectangle,
adUnitId: "/6355419/Travel/Europe",
)

Reaching Ionic specific page from URL

Is it possible to reach a specific page in an Ionic3 app , from an external source , like another website , or a python script.
I would like to know if I can transfer data to the app, but without having the app asking for the data
such functionality is typically called “deep links” for apps. Its not easy to build such experience with apps due to platform differences (ios vs android). There are solutions that abstract differences and provide good overall implementation path: branch.io.
Branch features native plugins for Ionic 3+.
You can google guides for actual implementation.