Thursday 17 December 2015

Xamarin Development Problems And Fixes

Problem

Xamarin.Forms.WebView Control wont display webpage, even thought a web address has been supplied to its source property.
By default application can only communicate with servers that implement best-practice security (ATS).
 
Fix

To fix this, the most simple way is to change the http of an address to https
otherwise read more here
https://developer.xamarin.com/guides/cross-platform/xamarin-forms/user-interface/webview/

 

-------------------------------------------------------------------------------------------------------

Problem


Json retrieved from web service padded with escape characters '\\\', wont de-serialize back to objects;

Json looks like below

"\"{\\\"BeaconId\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\",\\\"BeaconName\\\":\\\"Milk - Cereal Aisle - Ice\\\",\\\"BeaconUuid\\\":\\\"B9407F30-F5F8-466E-AFF9-25556B57FE6D\\\",\\\"FirstName\\\":\\\"Tom\\\",\\\"LastName\\\":\\\"Jones\\\",\\\"ProductAdId\\\":\\\"375b973f-b7b0-49e2-bef1-53cc64f0adc9\\\",\\\"ProductAdUrl\\\":\\\"http:\\\\/\\\\/www.smh.com.au\\\\/lifestyle\\\\/diet-and-fitness\\\\/the-skinny-on-lowfat-20130703-2pd1y.html\\\",\\\"ProductCategoryId\\\":1,\\\"ProductName\\\":\\\"Brownes Low-Fat Milk\\\",\\\"UserId\\\":\\\"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa\\\"}\"";
 

Fix

json = json.Remove(0, 1);

json = json.Remove(json.Length - 1, 1);
json = Regex.Unescape(json);



---------------------------------------------------------------------------------

Xamarin Page Navigation Tutorial using MVVM light

https://mallibone.com/post/xamarin.forms-navigation-with-mvvm-light 


-------------------------------------------------------------------


Gesture API and samples allows you recognize gestures and perform actions, for example has a same that rotates/ zooms into pictures using the pinch gestures

https://github.com/MichaelRumpler/GestureSample
https://forums.xamarin.com/discussion/33214/zoom-on-image



-----------------------------------------

Pin Login Control

http://www.wintellect.com/devcenter/jprosise/writing-cross-platform-mobile-apps-with-visual-studio-2015-and-xamarin-forms-2


--------------------

Authentication saving

https://developer.xamarin.com/recipes/cross-platform/xamarin-forms/general/store-credentials/ 


--------------
Navigation page removing icon

https://forums.xamarin.com/discussion/34871/remove-icon-from-action-bar-from-xamarin-forms-android-project


------------------------------------------------------Splash Screen

http://codeworks.it/blog/?p=294

3 comments:

  1. From your article on Xamarin Development Problems And Fixes, got a lot of tips and advice those solve existing issues in Xamarin app development.

    Helpful for Xamarin Developer


    Thank you for the giveaway!

    ReplyDelete
  2. Nice post. I was checking continuously this blog and I’m
    impressed! Extremely useful info specially the last part
    I care for such info much. I was looking for this particular info for a very long time.
    Thank you and good luck.
    Hire Xamarin Developer
    Hire Xamarin Mobile app Developer

    ReplyDelete
  3. Appbiz360 lets you Hire qualified Xamarin developers. Visit the website or try the app now.

    ReplyDelete