My profile
roycornelissen / gmimagepicker.xamarin Goto Github PK
View Code? Open in Web Editor NEWPort of the original GMImagePicker component to Xamarin.iOS
License: MIT License
Port of the original GMImagePicker component to Xamarin.iOS
License: MIT License
Up for grabs: please review and update/complete the translations in the it.lproj/GMImagePicker.strings
file for the language it
(Italian). Use the original labels in Base.lproj
as a starting point.
Contributions are highly appreciated!
Up for grabs: please review and update/complete the translations in the de.lproj/GMImagePicker.strings
file for the language de
(German). Use the original labels in Base.lproj
as a starting point.
Contributions are highly appreciated!
It looks like this control has the same issue as the native iOS version, but I can't figure out what is causing it.
My users take lots of screenshots, and it is causing this crash.
guillermomuntaner/GMImagePicker#88
Thoughts?
Up for grabs: if you find any language missing in this library and are willing to contribute translations for it, please make a PR.
Add a ??.lproj
folder to the GMImagePicker
project, with a file named GMImagePicker.strings
in it and complete the translations for that language. Use the original labels in Base.lproj
as a starting point.
Don't forget to set the build action for the GMImagePicker.strings
file to BundleResource
.
Contributions are highly appreciated!
When take a picture from Camera - crash:
Xamarin.iOS: Received unhandled ObjectiveC exception: NSInternalInconsistencyException threading violation: expected the main thread
I've tried put code inside InvokeOnMainThread and DispatchQueue.MainQueue.DispatchAsync - didn't help.
Up for grabs: please review and update/complete the translations in the pt.lproj/GMImagePicker.strings
file for the language pt
(Portuguese). Use the original labels in Base.lproj
as a starting point.
Contributions are highly appreciated!
GMImagePickerController.cs line 387:
var toolbarHidden = _selectedAssets.Any () && !ShowCameraButton;
Should be:
var toolbarHidden = !_selectedAssets.Any () && !ShowCameraButton;
As soon as a selection is made, the toolbar gets hidden.
Hello.
How can I remove localizations, which my app does not support? I don't want them to appear on App Store. Is the only way is to include this project into my solution, or it could be done with the nuget package?
Unable to install 2.3.3 in a Android project that uses monoandroid81.
I am trying to install your library through NuGet in my Xamarin Forms project. I get this error during the installation process:
Package GMImagePicker.Xamarin 2.1.0 is not compatible with netstandard2.0 (.NETStandard,Version=v2.0). Package GMImagePicker.Xamarin 2.1.0 supports: xamarinios10 (Xamarin.iOS,Version=v1.0)
What should I do to install your package?
The MediaType for the camera button is fixed to Image. So you can't record a new video when you set your MediaType to video.
I already fixed it in my fork and will create a pull request for it.
Is there a way to limit the number of total selectable images?
For example, in my case, I need to limit the selection to five images. Is it achievable in some way?
When the current view is not the GMGridViewController for the "all photos" gallery, a new image captured by the camera is not automatically selected. Also, if current view is GMAlbumsViewController, the picker doesn't automatically navigate to the "all photos" gallery to highlight the changes.
When GridSortOrder == Ascending, the new camera image is not correctly scrolled into view.
I want to clear selected image of last time.
I have try set _preselectedAssets = null at the end of Finished func, It's work BUT what happend when user open picker many time?
I try generate picker onetime in ctor and try clear pre-selected assets by picker.SelectedAssets.Clear(); but it's not working.
Same as in original version: guillermomuntaner/GMImagePicker#45
PR for original fix: guillermomuntaner/GMImagePicker#90
Up for grabs: please review and update/complete the translations in the pl.lproj/GMImagePicker.strings file for the language pl (Polish). Use the original labels in Base.lproj as a starting point.
Contributions are highly appreciated!
Hi,
I want to set back button title is null. But GMImagePickerController Option can't found it. Can you have this option?
Hello roycornelissen,
I have a problem using your ImagePicker, these are the steps to reproduce on our app:
·Select a video from picker that is stored on iCloud and not in the device
·Request to download it
·Everything is ok here
·Open again the imagePicker and try to download another video from iCloud
·Application crashes natively like this:
2018-09-05 12:24:48.373 [308:19476] critical: at <unknown> <0xffffffff> 2018-09-05 12:24:48.384 [308:19476] critical: at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_IntPtr_IntPtr (intptr,intptr,intptr,intptr) <0x0004b> 2018-09-05 12:24:48.392 [308:19476] critical: at UIKit.UICollectionView.PerformBatchUpdates (System.Action,UIKit.UICompletionHandler) [0x0005f] in /Users/builder/data/lanes/5665/db807ec9/source/xamarin-macios/src/build/ios/native/UIKit/UICollectionView.g.cs:552 2018-09-05 12:24:48.395 [308:19476] critical: at iOS.GMImagePicker.GMGridViewController/<>c__DisplayClass28_0.<PhotoLibraryDidChange>b__0 () [0x000c5] in iOS/GMImagePicker/GMGridViewController.cs:378 2018-09-05 12:24:48.404 [308:19476] critical: at CoreFoundation.DispatchQueue.static_dispatcher_to_managed (intptr) [0x0003d] in /Users/builder/data/lanes/5665/db807ec9/source/xamarin-macios/src/CoreFoundation/Dispatch.cs:343 2018-09-05 12:24:48.408 [308:19476] critical: at (wrapper native-to-managed) CoreFoundation.DispatchQueue.static_dispatcher_to_managed (intptr) <0x000e3> 2018-09-05 12:24:48.408 [308:19476] critical: at <unknown> <0xffffffff> 2018-09-05 12:24:48.411 [308:19476] critical: at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <0x0004f> 2018-09-05 12:24:48.412 [308:19476] critical: at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Users/builder/data/lanes/5665/db807ec9/source/xamarin-macios/src/UIKit/UIApplication.cs:79 2018-09-05 12:24:48.413 [308:19476] critical: at UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Users/builder/data/lanes/5665/db807ec9/source/xamarin-macios/src/UIKit/UIApplication.cs:63 2018-09-05 12:24:48.414 [308:19476] critical: at iOS.Application.Main (string[]) [0x00001] in Main.cs:18 2018-09-05 12:24:48.418 [308:19476] critical: at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) [0x0001e] in <d680a8bf3a2a4c8dbbfde665ba81f6f2#A683D333-58E2-40DC-F898-4B3DAA7253C3>:0 2018-09-05 12:24:48.419 [308:19476] critical:
I couldn't find who is calling UIKit.UICollectionView.PerformBatchUpdates on GMGridViewController.
Which I guess is causing the native crash.
Note that this is not happening if the file requested is stored on the device.
Any help will be appreciated,
thanks and congratulations for this component 👍
Hi I want to customize the picker view but i can't find how,
basically i want to completely change the navigation bar and add one button at the bottom. is this possible with this component ?
thanks a lot
After upgrading iPhone to ios 12, It's working but blue tick is not appearing upon selection.
[Export("initWithFrame:frame")]
public GMGridViewCell (CGRect frame) : base(frame)
Should be
[Export("initWithFrame:")]
public GMGridViewCell (CGRect frame) : base(frame)
When a user launches the GMImagePicker and tries to select Albums and they did not give the app permission to photos they are greeted with a NO TRANSLATION error message.
It appears to be an issue with the way we have configured our app. I added the localizations to the plist file, but that doesn't fix it. Is there any specific configuration I need for the translations to work?
Hi, Package works great for multiple selection of images, I want to implement multiple selection of videos but I can't find any great example for it, Can you please provide it for all users?
Thanks for great working!
Up for grabs: please review and update/complete the translations in the fr.lproj/GMImagePicker.strings
file for the language fr
(French). Use the original labels in Base.lproj
as a starting point.
Contributions are highly appreciated!
Thoughts on merging this into: https://github.com/jamesmontemagno/MediaPlugin ? I have an older multi-picker on iOS and could use a new updated one. I think that I am fine using your package as a dependency, just need the code to be written up.
Is it possible to change the camera icon tint/color? It's just black now which crashes with the default blue tint used everywhere.
Update
Just had to set the ImagePicker.ToolbarTintColor.
Up for grabs: please review and update/complete the translations in the en.lproj/GMImagePicker.strings
file for the language en
(English). Use the original labels in Base.lproj
as a starting point.
Contributions are highly appreciated!
My app is crashing after iOS 13 update when I tried to use GMImagePicker. It was working fine in the earlier versions.
Doing debug found out that
PHImageManager imageManager = new PHImageManager();
imageManager.RequestImageData()
PhImageDataHandler is returning null data.
As a notice on the iPad version of the app is working as expected, only the iPhone version of the app is having problem
After upgrading to 2.3.3, when building our Xamarin app through TFS 2017, we began to receive these error messages. Has the latest version posted to Nuget been signed?
2019-04-17T18:17:38.2313370Z Installing GMImagePicker.Xamarin 2.3.3.
2019-04-17T18:17:38.2453550Z PackageSignatureVerificationLog: PackageIdentity: GMImagePicker.Xamarin.2.3.3 Source: https://api.nuget.org/v3/index.json PackageSignatureValidity: False
2019-04-17T18:17:38.2507960Z NU3004: Package 'GMImagePicker.Xamarin 2.3.3' from source 'https://api.nuget.org/v3/index.json': This repository indicated that all its packages are repository signed; however, this package is unsigned.
...snipped...
2019-04-17T18:17:38.6266450Z Errors in /Agent/_work/1/s/MyProj.csproj
2019-04-17T18:17:38.6278220Z NU3004: Package 'GMImagePicker.Xamarin 2.3.3' from source 'https://api.nuget.org/v3/index.json': This repository indicated that all its packages are repository signed; however, this package is unsigned.
2019-04-17T18:17:38.6291120Z NU3004: Package 'GMImagePicker.Xamarin 2.3.3' from source 'https://api.nuget.org/v3/index.json': This repository indicated that all its packages are repository signed; however, this package is unsigned.
Before upgrading from PCL to .NetStandard, it worked on xamarin forms ios.
But now it is not working and here is my code:
public async Task OpenGallery()
{
var picker = new GMImagePickerController
{
Title = "Custom Title",
CustomDoneButtonTitle = "Finished",
CustomCancelButtonTitle = "Nope",
CustomNavigationBarPrompt = "Take a new photo or select an existing one!",
ColsInPortrait = 3,
ColsInLandscape = 5,
MinimumInteritemSpacing = 2.0f,
DisplaySelectionInfoToolbar = true,
AllowsMultipleSelection = true,
ShowCameraButton = true,
AutoSelectCameraImages = true,
AllowsEditingCameraImages = true,
ModalPresentationStyle = UIModalPresentationStyle.Popover,
MediaTypes = new[] { PHAssetMediaType.Image },
};
// You can limit which galleries are available to browse through
picker.CustomSmartCollections = new[] {
PHAssetCollectionSubtype.SmartAlbumUserLibrary,
PHAssetCollectionSubtype.AlbumRegular
};
if (_preselectedAssets != null)
{
foreach (var asset in _preselectedAssets)
{
picker.SelectedAssets.Add(asset);
}
}
// Event handling
picker.FinishedPickingAssets += Picker_FinishedPickingAssets;
picker.Canceled += Picker_Canceled;
// Other events to implement in order to influence selection behavior:
// Set EventArgs::Cancel flag to true in order to prevent the action from happening
picker.ShouldDeselectAsset += (s, e) => { /* allow deselection of (mandatory) assets */ };
picker.ShouldEnableAsset += (s, e) => { /* determine if a specific asset should be enabled */ };
picker.ShouldHighlightAsset += (s, e) => { /* determine if a specific asset should be highlighted */ };
picker.ShouldShowAsset += (s, e) => { /* determine if a specific asset should be displayed */ };
picker.ShouldSelectAsset += (s, e) => { /* determine if a specific asset can be selected */ };
picker.AssetSelected += (s, e) => { /* keep track of individual asset selection */ };
picker.AssetDeselected += (s, e) => { /* keep track of individual asset de-selection */ };
// GMImagePicker can be treated as a PopOver as well:
var popPC = picker.PopoverPresentationController;
popPC.PermittedArrowDirections = UIPopoverArrowDirection.Any;
await PresentViewControllerAsync(picker, true);
}
Up for grabs: please review and update/complete the translations in the ca.lproj/GMImagePicker.strings
file for the language ca
(Catalan). Use the original labels in Base.lproj
as a starting point.
Contributions are highly appreciated!
When showing the collections in the album view, the totals only show a maximum of 3.
Collections only show 3 images max.
How many images are actually in the collection.
I believe it's because you are calling PHAssets.FetchKeyAssets instead of PHAssets.FetchAssets like you are doing in the "Camera Roll" call, but I don't know what the ramifications of changing that call.
Up for grabs: please review and update/complete the translations in the zh-Hans.lproj/GMImagePicker.strings
file for the language zh-Hans
(Chinese). Use the original labels in Base.lproj
as a starting point.
Contributions are highly appreciated!
Up for grabs: please review and update/complete the translations in the es.lproj/GMImagePicker.strings
file for the language es
(Spanish). Use the original labels in Base.lproj
as a starting point.
Contributions are highly appreciated!
I've implemented the picker in iOS13, which works well, however it doesn't pick up the system typeface and gives me Times New Roman as a substitute. I tried using the PickerFontName option to change the typeface but this also fails if I use a system font style. Trace shows as follows:
CoreText note: Client requested name ".SFUIDisplay", it will get TimesNewRomanPSMT rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[UIFont systemFontOfSize:].
Should note that this works correctly when using non-system fonts so for the time being I have opted to use 'Helvetica' rather than the SFFont family.
NullReferenceException crash in at GMImagePickerController.FinishPickingAssets happens in NuGet package 2.1.0 when a user after picking an image decides to take a screenshot of the app.
Happens on iOS 11, any real device.
{System.NullReferenceException: Object reference not set to an instance of an object at GMImagePicker.GMImagePickerController.FinishPickingAssets (System.Object sender, System.EventArgs args) [0x00028] in /Users/roy/Projects/GitHub/GMImagePicker.Xamarin/src/G…}
Detailed stack:
{System.NullReferenceException: Object reference not set to an instance of an object
at GMImagePicker.GMImagePickerController.FinishPickingAssets (System.Object sender, System.EventArgs args) [0x00028] in /Users/roy/Projects/GitHub/GMImagePicker.Xamarin/src/GMImagePicker/GMImagePickerController.cs:369
at GMImagePicker.GMImagePickerController.SelectAsset (Photos.PHAsset asset) [0x000d7] in /Users/roy/Projects/GitHub/GMImagePicker.Xamarin/src/GMImagePicker/GMImagePickerController.cs:331
at GMImagePicker.GMGridViewController+GMGridViewCollectionViewSource.ItemSelected (UIKit.UICollectionView collectionView, Foundation.NSIndexPath indexPath) [0x0001c] in /Users/roy/Projects/GitHub/GMImagePicker.Xamarin/src/GMImagePicker/GMGridViewController.cs:549
at GMImagePicker.GMGridViewController+<>c__DisplayClass28_2.<PhotoLibraryDidChange>b__1 () [0x00102] in /Users/roy/Projects/GitHub/GMImagePicker.Xamarin/src/GMImagePicker/GMGridViewController.cs:383
at ObjCRuntime.Trampolines+SDAction.Invoke (System.IntPtr block) [0x00016] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.10.1.178/src/Xamarin.iOS/ObjCRuntime/Trampolines.g.cs:12074
at (wrapper native-to-managed) ObjCRuntime.Trampolines+SDAction.Invoke(intptr)}
After importing photos EXIF data is missing from the photos. This is one of the important requirement of the app. Could you please advice?
Getting a crash on IPad air 2 ios 10.2.1
Steps:
1.) select the album. (14 photos inside album)
2.) select < Select photo (back to album)
repeat around 8 times or more and it will hard crash.
When bouncing around and selecting photos the app will crash. Im confident this is a memory issue with the picker. There are two instances in which our app is crashing due to this. If anyone has this problem or can look into fixing it that would be great.
Case 1:
Expected result: Should not crash app
Actual result: Crash app
Case 2:
Expected result: Should not crash app
Actual result: Crash app
Up for grabs: please review and update/complete the translations in the ru.lproj/GMImagePicker.strings
file for the language ru
(Russian). Use the original labels in Base.lproj
as a starting point.
Contributions are highly appreciated!
Up for grabs: please review and update/complete the translations in the no.lproj/GMImagePicker.strings file for the language no (Norwegian). Use the original labels in Base.lproj as a starting point.
Contributions are highly appreciated!
Some Images are showing blur in the picker...If i select the blurred image my application is crashing? #56
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.