Closed abdu292 closed 7 years ago
The plugin is not supported on .Net Standards, yet ...
Thanks @alexrainman. In reality the real "Carousel" functionality works very well, but this is the extra problem I experience. So are you affirming this is because of .NET standard being a "not supported" library yet?
I doubt, because if this is an issue as you say, then the nuget installation should throw a "compatibility" error right a way saving us some time. Now that I integrated this plugin fully on my app and was thinking the errors with "DisplayAlert" are something else. Thank you for your plugin and I understand you are helping the community. Also just wondering if any work around you can think of?
Sometimes PCL plugins install and work well on .net standards. Thanks for letting me know.
About the compatibility problem with DisplayAlert? I recommend you to use Acr.UserDialogs instead. Let me know if that solves the problem.
Thanks @alexrainman . This issue is resolved by downgrading the version of Xamarin.Forms (2.3.3.180 => 2.3.2.127). This works now, however not sure about the future in case I need to use later version of Xamarin.Forms.
Can you share a demo project reproducing the issue?
Thanks @alexrainman . Steps & a project are provided in my first post, if you haven't noticed already. Thanks!
@alexrainman Did you get a chance yet to look on to this? The other option we have is to use Xamarin's official Carousel View but this still has issues. I tried integrating that first but is very sensitive when adding a WebView in it and the vertical scroll doesn't work really well. In their roadmap the official CarouselView will be stable only by Feb 2017 (tentative).
I believe the problem is not the plugin itself but Xamarin.Forms latest version compatibility issue with .Net Standards.
I also believe it's too soon to migrate to .Net Standards. Just a little percent of the libraries and plugins already have support for it and you will encounter this kind of problem very often.
Also, if DisplayAlert doesn't works, i advice to use Acr.UserDialogs as a really great Dialog Service library. You can call it from anywhere, including ViewModels.
To be fare, i never used DisplayAlert myself :)
Thanks @alexrainman . Yeah, I integrated "Acr.UserDialogs" after your advice. However I was already facing another "Activity Destroyed" issue with the latest version or Xamarin plus NavigationPage and that's where I thought to downgrade my Xamarin.Forms. To reproduce - try exiting the app using the back button on an android device or emulator.
I believe its because the plugin is not .Net Standards. I am trying to find the way on how to release the plugin with .Net Standards support and PCL at the same time.
I believe the problem you are having is between .Net Standards and Xamarin.Forms.
I cannot build your project. Lots of errors.
@alexrainman I see. Actually that's a working project. Not sure what error you get. Also, Apologize. I think the activity destroyed issue is with the "NavigationPage" and latest version of Xamarin.Forms, but I don't remember well. I will try re-producing when I get a chance (Updated the above comment as well)
Do you use Windows or Mac?
Ofcourse Windows 10 with Visual Studio 2017 RC
@alexrainman Just confirmed. "Activity destroyed" issue has nothing to do with this plugin, but "DisplayAlert" indeed breaks.
Closed by mistake.
Do you want some advice? I know its tentative using latest software releases, like VS 2017 and .Net Standards, but if you want some stability, dont use RC candidate software. Go back to Stable release of VS 2015 and old PCL. I promise you wont have any issue.
@alexrainman I want to use EF Core, which cannot be used with PCL. Also, I strongly believe VS 2017 is just tooling and has no impact on the library. I still can spin up a VM on my azure with VS 2015 to see if that's not the case. I am unsure if this issue can be closed in this state!
As i said before, the library is not .Net Standards compatible. I dont have any problem with latest Xamarin.Forms and DisplayAlert if i use it from PCL and stable tools, that can introduce compiling anf compatibility issues
Okay. Got it. Thank you! I think I will try for official CarouselView and will try some workaround with it's stability issue as I use .NET standard Libraries.
I am planning to release .Net Standards compatility but for now its not :)
I tested on another Xamarin.Forms project that uses normal PCL and we still have this issue with DisplayAlert. Tested multiple times by installing & uninstalling this plugin. So, I believe this issue is not related to .NET standards.
Let me check it out.
@abdu292 I know why is crashing on you. You are missing calling Init() after Forms.Init()
global::Xamarin.Forms.Forms.Init(this, bundle);
CarouselViewRenderer.Init();
So, the plugin doesn't have any issue. Is up to you to use it or no 👍
@alexrainman I indeed included "Init" method in the droid project as it is pretty clear in the set-up section. I will try re-creating this for you in a small demo project. Thank you for taking time to respond.
I tried and i forgot to include Init method and i was having same issue as you. Once i added Init the issue is gone.
I see. I am unsure what else I am missing. I will try creating a small re-pro.
Ok
@alexrainman It doesn't look like this issue exists any more. All works well now. Thanks a bunch!
If my work is helping you, please help me back: https://xamarinhq.wufoo.com/forms/nominate-a-xamarin-mvp/
This is what i have done that is community visible:
@abdu292 I fixed this issue in Android by only removing "CarouselViewRenderer.Init();" because sometimes it is not necessary to do so, both plugins work well ACR Dialog and CarouselView. Maybe it can work for you too.
I see "DisplayAlert" throws the below error after installing this plugin. I am using .NET Standard 1.4.
To re-produce the issue download this sample project here then install the "CarouselView.FormsPlugin"plugin on to both main client & droid projects. After doing all the steps for the plugin try adding a "DisplayAlert" somewhere.