If you have a long default path, you're going to inevitable hit this error while archiving your Xamarin builds:
The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Actually, your app have already been archived.
Simply close the Archive Manager. And then open it again at Tools > Archive Manager.
Now you can Distribute it like usual.
-------------------------------
And if you're using Windows 10 Anniversary Update, it does not hurt to enable long path inside Windows.
- Press Windows key + R to open the Run dialog. Type gpedit.msc.
- Navigate to: Computer Configuration > Administrative Templates > System > Filesystem
- Double click on "Enable Win32 long paths". Enable it.
- Alternatively, if you don't see this option click on NTFS > Enable NTFS long path.
- Restart Visual Studio 2017. Done!
https://medium.com/@JakobUlbrich/building-a-settings-screen-for-android-part-1-5959aa49337c
https://pioneercode.com/post/authentication-in-an-asp-dot-net-core-api-part-3-json-web-token
However, by default if you do unauthorized request you'll be redirected to /account/login. Whereas for REST API you want to return 401 not authorized instead.
So, you do something like this:
options.Cookies.ApplicationCookie.Events = new CookieAuthenticationEvents
{
OnRedirectToLogin = ctx =>
{
if (ctx.Request.Path.StartsWithSegments("/api") &&
ctx.Response.StatusCode == (int) HttpStatusCode.OK)
{
ctx.Response.StatusCode = (int) HttpStatusCode.Unauthorized;
}
else
{
ctx.Response.Redirect(ctx.RedirectUri);
}
return Task.FromResult(0);
}
};
Ref: https://devblog.dymel.pl/2016/07/07/return-401-unauthorized-from-asp-net-core-api/
https://stackoverflow.com/questions/28929637/difference-and-uses-of-oncreate-oncreateview-and-onactivitycreated-in-fra
https://stackoverflow.com/questions/18051472/how-to-center-the-content-inside-a-linear-layout
android:gravity
handles the alignment of its children,
android:layout_gravity
handles the alignment of itself.
https://github.com/jamesmontemagno/CircleImageView-Xamarin.Android