show ads in flutter website(flutter web app) - flutter

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",
)

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.

Where should I put FCM configuration in flutter app exactly?

I'm using firebase_messaging plugin in my flutter app to handle app notifications (given from a Laravel server). So far, I've successfuly installed the plugin in my project. Tested it on a page, it works.
But in the doc's example page, it's only demonstrate the usage of a single page. In reality, most of the apps has or may have many pages and each page has it's own notification channels, so does my app.
So.. Where is the exact location to put it's configuration? Should I configure it one each page, or can I just put it on main.dart and subscribe every channel from that page?
I don't think the first option is a best practice. Since I'm trying to follow DRY principle and avoid code-duplication to make it easier to maintain the app in the future. Any clue?

A reliable way to display google admanager ads in 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?

Alternative to admob for flutter

I am a new flutter developer.
I have an app on the play store using flutter.
When setting up admob inside the app, I placed the code inside the main.dart file.
Inside the app a user will navigate through multiple screen (roughly 10+ screens) hourly.
I didn't realize the way the admob code was setup, that a new ad was loading and showing every-time a user switched pages.
With over 50 users, some doing this up to 10 times a day, Google decided that I had broke terms of agreement and disabled my admob account.
I filed a dispute but was denied the ability to reactivate my admob account.
I am trying to figure out what my options are for monetizing my app.
I assume 1 option is to write native code and use something other than admob. Is there any other option for monetizing an app with flutter outside of admob?
SEARCH THESE PLUGINS IN PUB DEV..THEY ARE ALTERNATIVES OF ADOMB FOR FLUTTFR
facebook audience network
ironsrc.com
adcolony
admost flutter plugin
sanjagh
nend plugin
flutter pollfish
You can use admob config as usual. You only need to add https://pub.dev/packages/admob_flutter as a dependency and handle configs for iOS and android separately.

Android Facebook login dialog opens without any styling

I am using the Cordova official Facebook plugin and run into a weird issue...
The login process, which previously worked just fine for me, is now open in some native Android "black-screen" view without any styling.
The functionality works just fine - the authentication process succeeds, so there is a consistent connection with Facebook. The thing is, I am expecting a Facebook view instead of only the text content without any styling. Here is an example with Facebook native Hackbook app:
Tried running on two different devices - the issue remains.
Tried with cordova 2.2.0, then started a fresh project with 2.5.0 - the issue remains.
Please advice.
UPDATE:
Well, I have spent too much time on this issue, and it seems like this is the new Facebook SDK for Android.
I really wish I am wrong here, but here are examples from Facebook's flow for Android:
https://developers.facebook.com/docs/howtos/androidsdk/3.0/login-with-facebook/
Also - when checking the other sample apps in the SDK, all of them behave the same. The only one that shows a Facebook page is the Hackbook, and by it might be because this app is implemented with the old API (version 2):
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
Hackbook: another sample app demonstrating a selection of Graph API calls. Note that this sample is untouched from v2.0 of the SDK, and demonsrates the SDK's backward-compatibility.
UPDATE 2:
Ok, digging a bit more into it, it seems that there is no iframe involved here, the screen can be changed as you wish with a regular android activity theme added to the activity.
Here is an example of adding one of Androids default themes to the androidMenifest.xml (you can of course create your own Faceboke like theme ):
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:label="#string/facebook_login" />