@saramgsilva i think you are a little confuse, that screen has nothing to do with authentication. It's @KevinFord showing it's implementation of the ImageButton on Android that he is contributing to the Xforms Toolkit.
0
smsilvaPTInsider, University, Developer Group Leader✭✭
@rmarinho oh really? But the user interface is like the auth page but is a cool feature to have a page for auth
@saramgsilva,
Yes, the page is just a sample page and doesn't do any real authentication. If you do want to do authentication to those four providers I suggest you look at Azure Mobile Services. It works with all those providers and creates a simple, unified and easy to use interface for getting at them. That's what my actual implementation of that screen uses.
0
smsilvaPTInsider, University, Developer Group Leader✭✭
@kevinford i know that solution with Azure Mobile Services, that is very nice!! But for it i need to use and i want a solution for auth without Azure Mobile Services.
0
smsilvaPTInsider, University, Developer Group Leader✭✭
@kevinford i know that solution with Azure Mobile Services, that is very nice!! But for it i need to use and i want a solution for auth without Azure Mobile Services.
@saramgsilva,
Ah that's too bad. You can always go to the API's published by Facebook, MS, Google and Twitter. They are all different so you will need four different implementations and need to maintain them as they change.
Out of curiosity why not Azure Mobile Services. For a low use app you will be unlikely to surpass the "free" threshold. If you have enough usage where you will have to pay for Azure Mobile presumably you have some way to monetize your app and that's not a problem either...
I am playing around porting my existing hybrid web view to Xamarin Forms. This would allow one to run hybrid web controls similar to PhoneGap on Xamarin.
Just to give and update on current state of the XForms Toolkit , incredible work by the community we have 71 commits and 15 forks.
Latest additions are services to get device information and access phone features like dialing a number, hybridwebview and simple IOC by @SKall , and the MvvmHelpers ViewFactory, with this you can register a view and respective view model , and then it automagicly creates your view and binds to the underlying view model, contributed by @JasonASmith . I added also a AutoCompleteControl in xaml that allows you to bind a collection of suggestions to text entry (doesn't work on android yet).
Available controls
Calendar Control (beta)
ExtendedTabbedPage
ImageButton (beta)
ExtendedLabel (alpha)
AutoComplete (doesn't work on android)
HybridWebView
Available services (Beta)
TextToSpeech
Device (battery info, device info)
Phone Service (cellular network info, make phonecalls)
Available Mvvm helpers (Beta)
ViewModelBase
RelayCommand ; RelayCommand< T >
ViewFactory
Using the controls
Add XForms.Toolkit.Controls reference to your projects , main pcl, ios, android, and wp.
Just a quick note on the IDevice interface and their implementations. One of the reasons of creating a IDevice "container" which then exposes interfaces like IPhoneService is to help in determining at runtime if a feature is available. For example if an Android device TelephonyManager.PhoneType is PhoneType.None the phone service is null and it is easy to detect at runtime. Same will apply to sensors once I get a chance to integrate them into the devices.
As for the hybrid webview I still need to refactor some of the code to integrate the code into Xamarin Forms. I believe the WP8 version works but I haven't had a chance to test it yet. If someone is interested in creating PhoneGap compatible interface for it we could provide easy integration for projects migrating from hybrid web apps to Xamarin.
We probably need to add device independent pixel of some sort as the Xamarin.Form layouts tend to be very different sizes on each platform, especially on WP8.
Ouch.... sorry the shell script isn't working at the moment, so your project doesn't open because it doesn't find the nuget? and you are on a mac with xamarin studio?!
the bad way, is editing the csproject for each project.
if you find a better way let me know i still don't know how we can do this work.
In windows the build script works great to bring the packages.
Nuget restore should work , but i found out it doesn't work as expected on Xamarin.Studio, but i m honest i didn't lost a lot of time looking why it wasn't working
Some other updates, XForms also has a simple DI container , as well as plugins for working with NInject, SimpleInjector, Tinyioc and Autofac if you need something else.
We need some help getting up to date with cleaning up the code and releasing public nuget so developers can work with XForms toolkit without the hassle of getting the source code.
Just an updated, we are getting ready to have a beta version and available nugets.
The main features that were added are the Geolocation, and Camera support for all platforms, you can take a picture, or selected from the library.
There's also a new sample for a simple CacheService implemented using SQLite for all platforms.
Is there a chance anyone could post a .pkg for the sample project for the Android version of the xamarin.forms.labs project. I'm trying to test out the AutoComplete widget before I spend any development time implementing it, but the demo doesn't work.
How can I package up the latest version of master to use in my project? The implementation of HybridWebView in version 2.0 is the only one that works well enough for my team.
@AndyM.7096 there would be a few ways to do this and it depends how much you want to dig into the source code. If you just want the latest XLabs then fetch the source and build in Release mode and copy the release assemblies to your dependencies folder. You can also work against the source by referencing the individual projects in the source folder. The latter is more work initially to setup but gives you the benefit of being able to dig into the source in case something doesn't seem right.
That being said we should have 2.0 release in NuGet fairly soon.
I am using Hybridwebview for a hybrid application but I have a problem regarding caching of css / javascript files. I am loading a local html page with the following code:
var Source = new UrlWebViewSource
{
Url = String.Format("{0}/{1}", BaseUrl, "_index.html")
};
HybridWebView webView = new HybridWebView();
webView.Uri = new Uri(Source.Url);
The html page includes references to local css files that can be modified by the user at runtime. My problem has to do with the fact that the changes of the related css files are not reflected to the control since it uses cached files. Is there any way to reload all files of the html page? Although, I have found a workaround using jquery I just wish to know if i could tell the control to reload all related content from local files.
Could someone please add a string field to the ExtendedLabel called "Tag" or something. Why do we need this?
If a user changes the screen rotation landscape, I like to go through the list of labels and place them right aligned to the left of the text box. If the rotation is to portrait, I set the label on top of the text box and left align. Currently we can iterate through the collection of controls and for each one that is a type of Label, make the change; however, what if we have a particular label we don't want to move? For example, some form instructions.
A better solution would be to have a new string field added to the Label control which the developer can set the Tag value to whatever they want. Then when we iterate through the control collection we just look for our tag.
Thanks to who ever can add this feature to the label, or all controls for that matter.
@BrianPeal A potential work around, if they don't get around to this, would be using the x:Name attribute. In the below sample from my code, I set attributes based on the platform, so I have a loginButtonAndroid, loginButtonWinPhone, and loginButtonIOS:
Posts
That would be great, we can use that to make a win8 grid view alike that i was trying for ages ..
I have added you to the contributors @msmith you can just add it , or if you can you can submit a PR.
@KevinFord today i tried to do that screen.... i published a code for WP8.0 (http://code.msdn.microsoft.com/wpapps/Authentication-using-cd382133) if it helps, not sure... In that screen it should be possible to add user/pass for a custom auth
@saramgsilva i think you are a little confuse, that screen has nothing to do with authentication. It's @KevinFord showing it's implementation of the ImageButton on Android that he is contributing to the Xforms Toolkit.
@rmarinho oh really? But the user interface is like the auth page
but is a cool feature to have a page for auth
@saramgsilva,
Yes, the page is just a sample page and doesn't do any real authentication. If you do want to do authentication to those four providers I suggest you look at Azure Mobile Services. It works with all those providers and creates a simple, unified and easy to use interface for getting at them. That's what my actual implementation of that screen uses.
@kevinford i know that solution with Azure Mobile Services, that is very nice!! But for it i need to use and i want a solution for auth without Azure Mobile Services.
@kevinford i know that solution with Azure Mobile Services, that is very nice!! But for it i need to use and i want a solution for auth without Azure Mobile Services.
@saramgsilva,
Ah that's too bad. You can always go to the API's published by Facebook, MS, Google and Twitter. They are all different so you will need four different implementations and need to maintain them as they change.
Out of curiosity why not Azure Mobile Services. For a low use app you will be unlikely to surpass the "free" threshold. If you have enough usage where you will have to pay for Azure Mobile presumably you have some way to monetize your app and that's not a problem either...
I am playing around porting my existing hybrid web view to Xamarin Forms. This would allow one to run hybrid web controls similar to PhoneGap on Xamarin.
SKall, we have Webview control, what functionality will your web view bring to the table?! Interop between web view and code behind ?
Yes, it is a bridge between JS and C#. Same interface for iOS, Android & WP8. There is a small demo on how to control CanvasJS chart from native controls: https://github.com/sami1971/SimplyMobile/tree/master/iOS/Tests/WebClientTests
Just to give and update on current state of the XForms Toolkit , incredible work by the community we have 71 commits and 15 forks.
Latest additions are services to get device information and access phone features like dialing a number, hybridwebview and simple IOC by @SKall , and the MvvmHelpers ViewFactory, with this you can register a view and respective view model , and then it automagicly creates your view and binds to the underlying view model, contributed by @JasonASmith . I added also a AutoCompleteControl in xaml that allows you to bind a collection of suggestions to text entry (doesn't work on android yet).
Available controls
Available services (Beta)
Available Mvvm helpers (Beta)
Using the controls
Add XForms.Toolkit.Controls reference to your projects , main pcl, ios, android, and wp.
Xaml :
Reference the assembly namespace
Render your control:
Or from your codebehind:
Using the Services
TextToSpeechService
Device
PhoneService
Just a quick note on the IDevice interface and their implementations. One of the reasons of creating a IDevice "container" which then exposes interfaces like IPhoneService is to help in determining at runtime if a feature is available. For example if an Android device TelephonyManager.PhoneType is PhoneType.None the phone service is null and it is easy to detect at runtime. Same will apply to sensors once I get a chance to integrate them into the devices.
As for the hybrid webview I still need to refactor some of the code to integrate the code into Xamarin Forms. I believe the WP8 version works but I haven't had a chance to test it yet. If someone is interested in creating PhoneGap compatible interface for it we could provide easy integration for projects migrating from hybrid web apps to Xamarin.
We probably need to add device independent pixel of some sort as the Xamarin.Form layouts tend to be very different sizes on each platform, especially on WP8.
We have added the Geolocator ported from Xamarin.Mobile , check it out to use geolocation in your applications here.
Working in the 3 platforms now.
https://github.com/XForms/XForms-Toolkit/tree/master/src/XForms.Toolkit/XForms.Toolkit/Services/GeoLocation
Hmm...
trying to build from source and all I'm getting is this...
Pauls-iMac:XForms-Toolkit-master PFJ$ ./build.sh
XBuild Engine Version 12.0
Mono, Version 3.6.0.0
Copyright (C) 2005-2013 Various Mono authors
Build started 14/06/2014 22:58:16.
build.proj: error : /Users/PFJ/Downloads/XForms-Toolkit-master/build.proj: Method 'Combine(/Users/PFJ/Downloads/XForms-Toolkit-master, src, XForms.Toolkit, XForms.Toolkit, packages.config)' arguments cannot be evaluated'
Build FAILED.
Errors:
build.proj: error : /Users/PFJ/Downloads/XForms-Toolkit-master/build.proj: Method 'Combine(/Users/PFJ/Downloads/XForms-Toolkit-master, src, XForms.Toolkit, XForms.Toolkit, packages.config)' arguments cannot be evaluated'
Time Elapsed 00:00:00.0964320
Any ideas?
Ouch.... sorry the shell script isn't working at the moment, so your project doesn't open because it doesn't find the nuget? and you are on a mac with xamarin studio?!
Yeah, on a Mac.
don't have very good news to you , simple way is maybe try add this packages directory https://www.dropbox.com/s/fmcdewsup0vonyz/packages.zip
the bad way, is editing the csproject for each project.
if you find a better way let me know i still don't know how we can do this work.
In windows the build script works great to bring the packages.
Nuget restore should work , but i found out it doesn't work as expected on Xamarin.Studio, but i m honest i didn't lost a lot of time looking why it wasn't working
Some other updates, XForms also has a simple DI container , as well as plugins for working with NInject, SimpleInjector, Tinyioc and Autofac if you need something else.
We need some help getting up to date with cleaning up the code and releasing public nuget so developers can work with XForms toolkit without the hassle of getting the source code.
Looks like I'll need to edit each csproj file - adding the projects didn't really help. Dammit....
Grr damit... What files is it complaining in the output?
Did u pasted the packages folder at the Solution level?
Just an updated, we are getting ready to have a beta version and available nugets.
The main features that were added are the Geolocation, and Camera support for all platforms, you can take a picture, or selected from the library.
There's also a new sample for a simple CacheService implemented using SQLite for all platforms.
https://github.com/XForms/XForms-Toolkit
We still need to perform more tests to the toolkit, so feel free to take a look around and submit bugs.
https://github.com/XForms/XForms-Toolkit/issues?milestone=1&state=open
How can I contribute, e.g. extending the ViewModel base class a bit and also puttng in a NotifyPropertyChangedBase class in the chain?
Do a fork from
https://github.com/XForms/Xamarin-Forms-Labs
and then do a pull request.
Is there a chance anyone could post a .pkg for the sample project for the Android version of the xamarin.forms.labs project. I'm trying to test out the AutoComplete widget before I spend any development time implementing it, but the demo doesn't work.
I did the latest pull from github
try the latest source code from github please
The work in XF Labs is awesome. However, do you still have Nuget packages for iOS and Android? It seems they are unlisted
https://www.nuget.org/packages/Xamarin.Forms.Labs.iOS/
https://www.nuget.org/packages/Xamarin.Forms.Labs.Droid/
Therefore, is cloning the project from Github (https://github.com/XForms/Xamarin-Forms-Labs) the best way to use XF Labs?
Thank you.
Hello,
you should install this package
https://www.nuget.org/packages/Xamarin.Forms.Labs/1.1.1-beta92
that contains that you want. You don´t need to clone the project for use it.
How can I package up the latest version of master to use in my project? The implementation of HybridWebView in version 2.0 is the only one that works well enough for my team.
@AndyM.7096 there would be a few ways to do this and it depends how much you want to dig into the source code. If you just want the latest XLabs then fetch the source and build in Release mode and copy the release assemblies to your dependencies folder. You can also work against the source by referencing the individual projects in the source folder. The latter is more work initially to setup but gives you the benefit of being able to dig into the source in case something doesn't seem right.
That being said we should have 2.0 release in NuGet fairly soon.
What happened to 2.0 release in NuGet fairly soon ?
It's been there since January 19.
https://www.nuget.org/packages?q=xlabs
https://www.nuget.org/packages/XLabs.Forms/
My misstake I missed the renaming of the nuget package :-)
Thanks !
@All readers of this thread:
I have implemented XLabs and thereby created a documentation (.pdf).
You will find it here:
forums.xamarin.com/discussion/35991/how-to-install-setup-and-use-xlabs?new=1
@FredyWenger - thanks!
@BruceFranson:
It seems, as the link was broken... therefore a new link:
forums.xamarin.com/discussion/35991/how-to-install-setup-and-use-xlabs#latest
I am using Hybridwebview for a hybrid application but I have a problem regarding caching of css / javascript files. I am loading a local html page with the following code:
String BaseUrl = String.Format("file://{0}/Application", FileSystem.Current.LocalStorage.Path);
var Source = new UrlWebViewSource
{
Url = String.Format("{0}/{1}", BaseUrl, "_index.html")
};
HybridWebView webView = new HybridWebView();
webView.Uri = new Uri(Source.Url);
The html page includes references to local css files that can be modified by the user at runtime. My problem has to do with the fact that the changes of the related css files are not reflected to the control since it uses cached files. Is there any way to reload all files of the html page? Although, I have found a workaround using jquery I just wish to know if i could tell the control to reload all related content from local files.
It seems the source code need to be updated, dependency nuget packages was out of date.
Feature Request:
Could someone please add a string field to the ExtendedLabel called "Tag" or something. Why do we need this?
If a user changes the screen rotation landscape, I like to go through the list of labels and place them right aligned to the left of the text box. If the rotation is to portrait, I set the label on top of the text box and left align. Currently we can iterate through the collection of controls and for each one that is a type of Label, make the change; however, what if we have a particular label we don't want to move? For example, some form instructions.
A better solution would be to have a new string field added to the Label control which the developer can set the Tag value to whatever they want. Then when we iterate through the control collection we just look for our tag.
Thanks to who ever can add this feature to the label, or all controls for that matter.
Scott Peal
Fortune Cookie Software, LLC
@BrianPeal A potential work around, if they don't get around to this, would be using the x:Name attribute. In the below sample from my code, I set attributes based on the platform, so I have a loginButtonAndroid, loginButtonWinPhone, and loginButtonIOS:
<Button x:Name="loginButtonAndroid" Text="Login"/>
You can then manipulate it through the page code, setting whatever attributes are appropriate, i.e.: