Support custom file extension in a flutter app ( Open file with extension .abc in flutter ) - flutter

So I am exporting a file created in my application with extension .abc
Now, if the user shares the file on whatsapp or telegram or any other platform and when other user tries to open the file, the "open with" dialog should appear with my application in the list.
I have tried following approach which does not work plus it is only for Android and I am looking for multi-platform solution to this.
Is it possible to register a Flutter app as an Android Intent Filter and to handle Incoming Intents?
I was able to compile the app using above method but could not populate "Open with" dialog with my app's name
Thank you for your time.
EDIT 1:
So I have successfully added this functionality for android but I am still trying to add the same functionality for my iPhone users.
Can someone please help me with swift code part in iOS ??
I am not familiar with swift language but I want my users to be able to use same functionality on both platforms.

I have found a solution for iOS:
You can use the Uni Links package to get the notifications into your Flutter app.
You then need to manually add the file types in the Info.plist for the XCode project. You can find an explanation for example here.

Related

Create new contact using flutter web

So I have this "Save Contact" button in flutter web and I want when clicking on it either save a vcf on the device laptop/android/ios or open an add new contact default form in the device and add these infos in it I tried some packages but they support only android and ios not web and I also tried to make the vcf manually but I couldn't get the path because path provider only support android and ios
So How can I do that?
Use this package - contacts_service
you can save all necessary user information

How to disable Multi View like instagram on flutter

I have an online test application. so to avoid cheating, I want to make my application unable to use 'multi view'. as in the instagram application. how to do that on flutter framework?
Can't use this app in Multi window view on Instagram
This can be done by adding simple one line in Manifest File
Add below line in AndroidManifest.xml file
android:resizeableActivity="false"
Now check your application it will work as you want.

Uploading files from iOS Files app in another app

I'm looking to add functionality to my app that would allow a user to upload a file within my app from the Files app that was introduced in iOS 11. I would expect that it would work the same way that existing components do now where you can select Upload a Photo or Video on your iOS device and it allows you to select items from within the Photos app. I have been searching and I have not been able to figure out a way to do this. I know Apple's Mail app has this functionality (under "Add Attachment"), but I have not found a way to surface this functionality in my own app.
Since I am using Eureka for my other row inputs, it would be ideal to have this in an Eureka component but right now I am just trying to figure out if it is even possible to select files from the Files app from another app with Apple's existing APIs.
The Framework you are looking for is built in to UIKit in a class called UIDocumentPickerViewController

branch.io sharesheet questions

Im using branch.io's sdk for unity, im having 2 questions im hoping someone could answer:
1: Is it any way to restrict the share sheet from sharing to certain apps? for example some apps that doesn't handle links well and in special the sms service.
The reason we do not want the ability to send by sms is that the app needs permission to access the phone book and thus the google play service will need an "privacy policy" link.
2: If its not then i would like to know if you guys could lead me in the right direction when writing a privacy policy because i do not have any legal education and do not know how to wright it. Is it sufficient to state that we are using your sdk? The demands are things like "you should see to it that the code is secure and encrypted" (Something like that) though i'm using your sdk and do not have a clue about how it works.
Thanks!
There is no way to change the list of apps from the share sheet in Branch's Unity SDK. Although Branch does have an end point to exclude certain apps using the Android SDK.
You will need to export your Unity 3D project to Android Studio. Once you successfully export the project, you can use the Branch Android SDK endpoint to exclude any app by providing the Package name of the App.
This is the sample code to update your Share Sheet:
//define the share sheet style
ShareSheetStyle shareSheetStyle = new ShareSheetStyle(context, shareTitle, shareDescription)
.setCopyUrlStyle(getResources().getDrawable(android.R.drawable.ic_menu_send), "Copy this URl", "Link added to clipboard")
.setMoreOptionStyle(getResources().getDrawable(android.R.drawable.ic_menu_search), "Show more")
.addPreferredSharingOption(SharingHelper.SHARE_WITH.FACEBOOK)
.addPreferredSharingOption(SharingHelper.SHARE_WITH.GMAIL)
.addPreferredSharingOption(SharingHelper.SHARE_WITH.TWITTER)
.addPreferredSharingOption(SharingHelper.SHARE_WITH.PINTEREST)
.setAsFullWidthStyle(true)
.setSharingTitle("Share With");
//to exclude whatsapp from the Share Sheet
shareSheetStyle.excludeFromShareSheet("com.whatsapp");
//to exclude android messages app from the Share Sheet
shareSheetStyle.excludeFromShareSheet("com.google.android.apps.messaging");

Make my xamarin forms app able to open specific file types?

I am building my first app with Xamarin forms, an EPUB reader. The core app is now working well and able to render documents. The question I am trying to answer is how I can register for my app as a handler for the EPUB document type so that if the file is opened from an email app my reader app will be available as a reader?
Ideally this should be a cross platform solution.
Thanks!
Ideally this should be a cross platform solution.
Unfortunately, there is no cross platform solution that you can use to register to read the file types.
You will need to follow the platform specifications for that,
iOS https://developer.xamarin.com/guides/ios/application_fundamentals/working_with_images/custom-document-types/
Android https://gist.github.com/brendanzagaeski/70afe08654927befb26b