Writing NFC Card - flutter

I am using flutter to build my application to read and write the NFC cards I am using the flutter plugin NFC reader to read the cards but I couldn't find any way to write the NFC​ cards.

You can't write NFC tags on ios where in android you can.
You might wanna use Platform channels.
Platform channels helps writing and communicating between platform-specific code and your Dart code
Here is a medium post regarding writing an NFC tag on android
Write it on android and connect it to dart using Platform channels

Related

share a text between two mobile devices using Flutter NFC

I'm trying to configure NFC in flutter and find a Near by Device using it and while tapping the two devices the text Message should be shared from one device to Another
couldn't able to find any Perfect Example or a Tutorial regarding my requirement any docs or sample code will be really helpful
To share a text between two mobile devices use Flutter NFC, you can use the flutter_nfc_kit package, which provides a simple and easy-to-use API for working with NFC in Flutter.
**ExampleCode:
Add the flutter_nfc_kit package to your dependencies in your pubspec.yaml file.**
**Initialize the NFC module in your main function:
NFC.instance.start();
NFC.instance.share("Your message here");
**NFC.instance.onShareSuccess.listen((event) { print(event.shareData); });
NFC.instance.isAvailable**

How to create Host-based card emulation android application

I am trying to create an android HCE application to emulate an NFC tag.
By following https://developer.android.com/guide/topics/connectivity/nfc/hce, I successfully create an app to send and receive APDU command. However, it just worked when we use own reader app. When using other NFC reader app, I found that processCommandApdu(byte[] apdu, Bundle extras) didn't work, so we cannot emulate NFC tag.
So anyone can tell me how to create an HCE app that can be read by other NFC reader. Thanks

Setting Flutter project: iOS and Android languages

When I create a new Flutter project, it asks me to choose between Java/Kotlin for Android and Objective-c/Swift for iOS. But, what does this mean? Is it in case I want to write something for Android or iOS specifically?
Yes that is correct. In Flutter you have the option to call into platform-specific APIs. This is especially useful if you need to access functionality that is not available in Flutter directly (e.g. accessing the keychain on iOS or the keystore on Android).
To do so you can open up a message channel which bridges the Dart world with the platform-specific world. You can use this message channel to send a message from Dart to you platform-specific code. This platform-specific code is either Java/Kotlin for Android or Objective-C/Swift for iOS, depending on your selections during the creation of the project.
More detailed information can be found in the Flutter documentation here: https://flutter.dev/docs/development/platform-integration/platform-channels
Just a heads up, the Flutter team and the Flutter community already wrote a lot of OSS packages and plugins that will take care of the platform-specific stuff and offer you an easy Dart API. You can search for these packages in the Pub: https://pub.dev

How to implement sms retrieve api in flutter

I want my app to take OTP automatically, In android, we have the SMS retrieval API for that, so how to implement the same thing for IOS and android using flutter
Currently, there is no official Flutter plugin developed by the Flutter team for this. You have two options for this:
Use plugins created by the developer community. Try sms_retriever.
Write your own platform-specific code (e.g. your Android code in Java), and invoke it from Flutter. Read more about this here.

Flutter - Android Native Platform Integration

When an external component such as a Camera or File picker is needed, the Flutter for Android Developers documentation (currently in the works) states that we would have to build a native platform integration.
I currently have a device that has a built-in barcode reader with a manufacturer-provided Android API. So, for that I would need to pursue this native platform integration method - or even for playing videos or using the camera for that matter I would think.
Is there an example repo that demonstrates how a well-integrated app should be? ..a project that integrated ExoPlayer for example?
You can use platform channels to call native APIs that aren't exposed by the Flutter platform.
There is an example in the Writing custom platform-specific code docs:
The full, runnable source-code for this example is available in /examples/platform_channel/ for Android with Java and iOS with Objective-C.
If you want to make your code reusable by others, you can publish it as a package, but this is optional. There is a repo of plugins maintained by the Flutter team that you can use for inspiration.