Add Image.file to Photos Favorites album from within Flutter app - image

Is it possible to favorite an image in the Apple and Android photo app within my flutter app?
For example, if my app accesses many images from the camera roll/gallery using the multi_image_picker plugin and I have the Image.file location can I add it to the Favorites album in Apple Photos for inside my app? Same for Android or Google photos?

Accessing native gallery app features isn't possible as those features are built for the specific app only. You can create all of those features for your app but you can't access features of other apps into your flutter app.

Related

Is it possible to use asset catalog from an iOS class library in a Xamarin Forms iOS app?

Could not find any answers to this specific problem anywhere online.
I've had to factor a Xamarin forms project as there was a requirement to have multiple android/iOS apps that use the same code. Current set up is:
Standard Library
Android App 1
Android App 2
iOS App 1
iOS App 2
Android Class Library
iOS Class Library
For android, the images are in the resources folder in the android class library and the images display fine in the app.
For iOS I have put the images in a Asset Catalog in the iOS class library. These however, do not show in the app. I created an asset catalog in one of the iOS app projects and tested that an image would load from there - and it did. Is it not possible for images to load from an asset catalog in a iOS class library? I have other items in the iOS class library (such as custom renderers, which work fine). If the latter is not possible, is there a different way I keep the images in one place for iOS, without having to change my xaml? This is an existing project, with loads of images already being referenced by name in xaml (e.g. Source="image.png") that are used for both iOS and android. If possible, I don't want to have to maintain an asset catalog per app, although I do know of a way it could be automated, but I want to avoid having to do that if possible.
Using .NET Standard 2.1 and Xamarin Forms 5.0.0.2401
Thanks in advance.

iOS 11 Simulator native apps location

I'm using Xcode 9 and would like to find where are located the native iOS apps (Contacts, Maps, Photos, News, etc) that run inside the Simulator.
According to the answer at iOS Simulator App Location, they used to be at
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications
but this is not the case anymore.
Any ideas where I can find them now?
In Xcode 9, they are now located here:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Applications
The applications in this folder are the following:
AccountAuthenticationDialog
ActivityMessagesApp
AdSheet
AirMusic
AirPodcasts
AppStore
AskPermissionUI
Bridge
BusinessExtensionsWrapper
Calculator
Camera
ChargingViewService
CheckerBoard
Contacts
CoreAuthUI
CTCarrierSpaceAuth
DataActivation
DDActionsService
Diagnostics
DiagnosticsService
DNDBuddy
FaceTime
Family
Feedback Assistant iOS
Files
FindMyFriends
Fitness
Game Center UI Service
HashtagImages
Health
HealthPrivacyService
HomeUIService
iAdOptOut
iBooks
iCloud
iTunes
Jellyfish
LoginUI
Magnifier
MailCompositionService
Maps
MessagesViewService
MobileCal
MobileMail
MobileNotes
MobileSafari
MobileSlideShow
MobileSMS
Music
MusicUIService
News
Passbook
PassbookUIService
Photo Booth
PhotosViewService
Podcasts
PreBoard
Preferences
Print Center
Reminders
SafariViewService
ScreenSharingViewService
ScreenshotServicesService
ServerDocuments
SharedWebCredentialViewService
SharingViewService
Siri
SLGoogleAuth
SLYahooAuth
SoftwareUpdateUIService
StoreDemoViewService
TrustMe
TV
Videos
VideoSubscriberAccountViewService
Web
WebApp1
WebContentAnalysisUI
WebSheet
WLAccessService

Xamarin forms iCloud drive delete an item

I am developing a Xamarin forms application.User can save images from the app to iCloud.Is it possible to delete a document by it's name in the iCloud drive from an app.
Yes it should be possible according to Apples Documentation on iCloud API on iOS only.
See Xamarin's introduction to developing with iCloud on iOS. Note that this will only work with iOS since the API is designed around the Mac and iOS APIs. Since you said this is a Forms application, you will have to figure something else out for the other platforms. There are many options and that is up to you to decide (OneDrive, Google Drive, DropBox etc.).
Disclaimer: I work for Xamarin/Microsoft

How to identify some particular app is installed or not in my device using xamarin forms (Android and ios)

How to identify whether some particular application is already installed in my device or not through xamarin forms? (I want to achieve in android and ios).
Explanation :
In native windows application I have used one service which give me following data (App Name, App Icon Image, App Id, Publisher Id, Version name).
I have checked whether particular application is already installed in my device or not through App Name, App Id, Publisher Id.
Suppose app is installed then I checked version of the application if its fully updated then "Launch" button display and if it is not then "Update" button display.
If application is not installed then "Install" button display and this button redirect me directly through play store.
Same thing I want achieve in android and ios through xamarin forms.
which things are required through service for android and ios?
How to redirect directly to play store in android and ios?
Method 1:
Try using App Links. You need to install the Rivets component from the Component Store. You can handle the navigation to play store if not installed and else browser based on your URL.
Rivets.AppLinks.Navigator.Navigate("http://any.old.url");
Your app will now attempt to Navigate to another installed app for the URL using App Links, or will fall back to usingUIApplication.OpenUrl in ios/or will fall back to using an intent with a view action in Android, if no App Link meta data is found, or no apps for the metadata are installed.
Method 2:
For example I have handled the situation for facebook app to open a page from my xamarin app but not by using App Links.
Device.OpenUri(new Uri("fb://page/page_id")); // Launch the page in facebook app (if facebook app is installed) from my application.
The above code line when executed, will open the specified facbook page in facebook app. Notice "fb://page/page_id" this is the intent with specific uri provided from facebook. You can read more about it here.
Use Plugin.Share to use CrossShare to open a browser cross-platform from your xamarin app. This I have used below.
The above code will throw an exception if facebook app is not installed, then you probably need to redirect to the play store of Android or the app store of Apple.
For Android:
CrossShare.Current.OpenBrowser("https://play.google.com/store/apps/details?id=com.facebook.katana");
Here com.facebook.katana is the package name of facebook app in android. You can replace with your application's package name if registered on playstore. This will automatically launch in playstore not in browser.
In case of IOS redirect to App store:
CrossShare.Current.OpenBrowser("https://itunes.apple.com/us/app/facebook/id284882215/");
Here id284882215 is the app id of facebook on Apple's app store.

Unable to access WatchKit app assets

I need to use some images in my WatchOS app and its complications. If I put them in the assets catalog inside the watchkit app target group I can't access them from my WatchOS app, but in the extention assets catalog I can.
This is the test image:
This is how I tested the accessibility:
I dropped a png file into watchkit app assets. XCode created an image set ad put the image in the 2x slot.
I copied the name CircularSmallRingImage42mm from Attribute Inspector.
I added the following code in the awakeWithContext() method in my initial InterfaceController:
if let image = UIImage(named: "CircularSmallRingImage42mm") {
NSLog("works")
} else {
NSLog("doesn't work")
}
I reset content and settings on the Apple Watch Simulator.
I cleaned and ran the watchkit app scheme on iPhone 6s Plus + Apple Watch 42mm simulator. Doesn't work.
I deleted the image set and repeated the procedure, except for this time I dropped the image in app extension's asset catalog. Works.
The assets catalog in my watchkit app group is targeted only on watchkit app. The assets catalog in my watchkit app extension group is targeted only on watchkit app extension. Everywhere I look people seem to recommend putting static content into an asset catalog bundled with the Watch App target so it gets stored on the watch itself.
Why can't I access the image? Am I doing something wrong? Is the watchkit app bundle not the recommended place for storing static files?
Based on the name of the image, it sounds like it's related to a complication.
Complication images belong in the WatchKit Extension Asset Catalog, since the complication is an "extension" of your app. Your app doesn't have to be loaded or running for the complication to function.
You also need to refer to complication images by their group name if they're stored in the Complication group. E.g.,
UIImage(named: "Complication/Circular")
For more details, see this thread at the Apple Developer forum.
The Assets for iphone app and for watch app is totally different you can't access the images into app asset folder to watch extension. You have to add new images which compatible with the watch kit

Resources