Posts Tagged Xamarin

Right way to create splash screen for Android in Xamarin Forms app

Usually Splash screen for Android is done with separate activity and even official docs on Microsoft website suggesting this way for Xamarin.Forms but it is not correct as splash screen is needed only to fill the time gap between the moment when user taps the icon to start the app the the moment when app is ready for interaction. Creating separate activity, showing it and then switching to actual activity makes the start even longer.

Below is the correct way of splash screen implementation for Xamarin Forms for Android, the app will start without any delay if you follow the tutorial below.

Read the rest of this entry »

, , , , , , , , ,

Leave a comment

Toast message for Xamarin Forms

toastdemo_androidtoastdemo_ios

Quick and easy solution for toast messages in Xamarin Forms, it supports iOS and Android platforms. Toast message provides simple feedback in a small popup (which is disappearing in some seconds) like on the screenshots on the left (Android) and the right (iOS) sides.


Read the rest of this entry »

, , , , , , , , , ,

3 Comments

Creating geojson file for the app with maps before publishing it on AppStore

I recently published iOS app developed with Xamarin where maps API were used. Using maps API in iOS requires to create .geojson file to show the area which should be covered with routing for your app before publishing this app in AppStore.

Creating this kind of file is quite easy, it was just a square around Minsk city in my case but it was not obvious how to create this file when you never did it before.

The file should look like this:

{
 "type": "MultiPolygon",
 "coordinates": [[[
 [27.32574462890625,53.78036940194483],
 [27.32574462890625,54.00373331851741],
 [27.821502685546875,54.00373331851741],
 [27.821502685546875,53.78036940194483],
 [27.32574462890625,53.78036940194483]
 ]]]
}

I used the website http://geojson.io to create the initial file and the website http://geojsonlint.com to test it with the changes to be appropriate with the sample above (there was an issue with quantity of brackets with the file, geojsonlint helped me to find this error)

 

, , , , , , ,

Leave a comment

Working with Xamarin Android Player from command line

It is possible to start appropriate Android VM in Xamarin Android Player using the following command in command line on Mac

/Applications/Xamarin Android Player.app/Contents/Helpers/Xamarin Android Player.app/Contents/MacOS/Xamarin Android Player --name "Nexus 5 (Lollipop) NEW"

You can pick the information how to start it from command line using the following command (start VM first using usual way, from Xamarin Android Player):

ps -f -x | grep Xamarin

, , ,

Leave a comment

How to solve the issues when building Xamarin solution for Android on Mac

If you are working with Xamarin Studio then you surely had issues building the solution for Android sometimes,  this post and this post can be useful to help solving that issues.

If these advices didn’t help to you and you still failing to build your solution then try to perform some more steps to clear Xamarin caches before applying the changes in the posts mentioned above:

  1. Clean the solution in Xamarin and leave it
  2. Delete all the ‘bin’ & ‘obj’ folders together with their content from your projects
  3. Delete all the content from the folder “~/local/share/Xamarin”

Enjoy

, , ,

Leave a comment

Reference ‘Xamarin.Android.Support.v4’ not resolved

I killed some days to get rid from the error in the topic, it happened when I tried to compile the app for Android, finally I found a way how to solve it, quick manual:

  1. Select Build -> Clean All in your Xamarin project where you have the issue
  2. Close your Xamarin project
  3. Exit from Xamarin Studio
  4. Go to your project in the file system, find the the folder “packages” delete the folder “Xamarin.Android.Support.v4.*” from there and everything what is inside
  5. Go to your Android project, find there the file “package.config”
  6. Find the line where “Xamarin.Android.Support.v4.*” is mentioned and delete this line
  7. Start Xamarin Studio, load your project
  8. Go to Android part of the project, right click on the “Packages” folder and select menu item “Add packages..”
  9. Find in the repository the package “Xamarin.Android.Support.v4” and install it again
  10. Try to build Android project again
  11. Enjoy, now everything should work again.

, , , ,

1 Comment

Xamarin Studio: error retrieving update information (Mac)

If Xamarin Studio does not want to update itself anymore on your Mac, just do the following:

  1. Start Xamarin Studio
  2. Go to menu item Xamarin Studio -> Account
  3. Logout
  4. Login

Usually it should help

,

Leave a comment