Local Notifications - flutter

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.

Related

How can I access device information without using packages in Flutter?

How can I access device information without using packages in Flutter? How can I get the information of the device where the app is installed in my Flutter app?
First, you'd be better off using packages. But if you really want/need to do it, you'd have to write platform-specific code code in the native language of the targeted platform (ie. Swift or Objective-C for iOS/Mac, Kotlin or Java for Android, etc), then use so-called platform channels to pass messages between your app and the platform-specific code.
If you'd like to get details about the device, on iOS you'd use UIDevice, on Android you'd typically want Build.
This can only be done through Method Channel

Show notification even app is close flutter

I want my application to always show in a notification .It should be undismissable and it should be shown on notification bar always even app is off.
Try flutter_local_notifications plugin.
If you didn't find a plugin that satisfies your needs, just implement it on the native side.
Flutter is a UI framework. Use it as such.
Plugins wrap native capabilities and encapsulate them, but feel free to add native code that suits your needs.

how work with contact ,camera, gps in flutter without using plugins

I'm trying to do CRUD on contacts and SMS using flutter, but after so much searching I feel flutter does not have any core options about contacts or SMS. there is nothing in the official documentation.
how work with contacts, camera, GPS in flutter without using plugins?
because the contact has a different implementation in android and IOS you need to have a code for each platform. in flutter its called Plugin or platform-specific code. and as I said there is no way to work with a contact without plugins cause its platform-specific code. if you don't want to use plugin You should write your own plugins for contact. and I think this is the hard way.
if you want to have your own plugin check Writing custom platform-specific code link

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?

Compatibility of Flutter with Car Play and Android Auto

I developed an app on Flutter and I'm looking at a way to link it with Car Play and Android Auto. For my understanding Flutter is not compatible yet. Anyone know if it will be in the future (if yes, when we should expect this)? Is there any turnaround I can look into?
Flutter Apps are now compatible with Apple CarPlay!
flutter_carplay aims to make it safe to use apps made with Flutter in the car by integrating with CarPlay. CarPlay takes the things you want to do while driving and puts them on the car’s built-in display. Currently, it supports only iOS 14.0+.
Feel free to like, star, comment, share, and contribute to support more!
In pub.dev: https://pub.dev/packages/flutter_carplay
GitHub: https://github.com/oguzhnatly/flutter_carplay
Flutter has yet to have Car Play and Android Auto support as of this writing. As previously mentioned in the comments, it's best to keep track for its updates in this GitHub thread.
I got audio app working on carplay easily enough. Based on
https://pub.dev/packages/flutter_radio_player/example
And then using my apple developer account, setting entitlements to allow carplay, basically. I cam add details if requested. Also, I used a mac/xcode to check things worked etc.
Android auto I can't yet get working.. funny that!