dotnetco.de

Open App-Settings in Xamarin Forms

Sometimes it’s necessary for the user to grant some access rights, e.g. for camera or photo library. Typically the user is asked on first access, but if he denies he will not be prompted anymore. So you should forward the user to the settings page instead of just saying “Hey, go to your settings page and do the changes”.

For iOS it’s quite easy to do in Xamarin Forms ( Device.OpenUri(new Uri(“app-settings:”));), but there is no such command for Android so you have to use Dependency Service.

Continue reading…

Migrate Xamarin Forms PCL Apps to .net standards

Of course you have already heard of .NET standards , otherwise have a look at the link. So it’s not a question WHETHER you migrate, it’s a question WHEN you migrate. More and more nuget packages are already migrated, so I decided it’s about time to migrate my app. Asking friends before migration, Tobias referenced James Montemagnos short explanation How to Convert a Portable Class Library to .NET Standard and Keep Git History, but I don’t want to migrate a portable class library, I want to convert an App. Glenn proposed to manually migrate it into a new project. That’s of course no bad idea, because there I could exactly see where the errors appear. Additionally I might get rid of some unused packages which I still reference but do not need anymore. So let’s create a new Xamarin Forms App using .netstandard 2.0.

Continue reading…

Setup Continuous Integration with Xamarin Forms and Visual Studio Team Services VSTS

Last week I stumbled upon Luce Carters interesting Youtube Tutorial Setting up VSTS CI for Xamarin Forms. It’s very well explained, so if you prefer to watch it as a video: Switch over to Luces Tutorial! Otherwise here is a written step-by-step guide how to setup continuous Integration (CI) with Visual Studio Team Services (VSTS) for a Xamarin Forms App.

Continue reading…

Check whether Push is enabled in Xamarin Forms iOS and Android

If you have implemented Push Notifications in your Xamarin Forms iOS and Android app (maybe as explained in Setup Xamarin Forms for iOS Push Notifications or Setup Xamarin Forms Android App for Push Notifications), you might also want to know whether user has enabled Push Notifications in his system settings so you could show a warning in case it’s disabled. As this is OS specific, there is no Xamarin Forms implementation but you could create some easy interfaces to check the status. The code is based on Evan Parsons’ code for iOS and Rene Rupperts lines for Android, so thanks to both!

Continue reading…

Mobile business strategy wanted? How to best implement an app for your company

As a result of increased market pressure and a special spirit of optimism, more and more companies are looking for mobile app strategies for their companies. Due to uncertainty or lack of information, however, many people are reluctant to do so. Mobile Strategy Coach Marco Seraphin explains what is important for a professional company app and how to implement it.

For german readers, his article is available on his Xing Coach Site also in german language: Mobile Unternehmensstrategie gesucht? Wie Sie eine App für Ihre Firma am besten umsetzen

Continue reading…

How to read all contacts from local Addressbook using Xamarin Forms

Sometimes it’s a benefit for the user if you could read his contacts and show them in a list so the user could select one or more of them. To read all contacts from a local Addressbook on iOS or Android using Xamarin Forms, James Montemagno has created a Contacts Plugin some time ago.

Be sure to be informed about these information about the Contacts Plugin:

  • James does not actively support it anymore (and therefore the github repository shows a notice “This Plugin is not under Development and not supported”)
  • The Plugin never left alpha status (latest version is 0.77) .
  • It’s not available on nuget anymore.

Nevertheless it does work fine so here are some information how to implement it into your own PCL project. Continue reading…