/r/xamarindevelopers
A space for Xamarin developers to ask questions or discuss their latest projects.
Welcome to the Xamarin subreddit!
/r/xamarindevelopers
Hey while I am technically using Maui I was wondering what is the best way to get write access to the user’s calendar and write to it for iOS and Android.
Hi,
I've developed an Android app with Xamarin which sends out an email to a customer address. This works fine so far by using SmtpClient through servers which accept older TLS protocols like 1.0 or 1.1. But it fails when connecting to i.e. smtp-mail.outlook.com .
So far I tried to set the following but still no luck with TLSv1.2:
//Enable suport TLS1.2
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
SmtpServer.EnableSsl = true;
Any ideas? My app targets Android 13 with a minimum of Android 6.0. This should activate TLSv1.2 automatically by default but it doesn't.
I'm trying to run my app on an Android 14 phone and the splash screen appears, but it just hangs there and does nothing else until I force it closed. The app doesn't crash and there is no exception in Visual Studio.
I've done the following:
Added this permission to the manifest:
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
Added this to BackgroundService.cs
StartForeground(NOTIFICATION_SERVICE_ID, builder.Build(), Android.Content.PM.ForegroundService.TypeLocation);
Added this within <application> in the manifest:
<service android:name=".BackgroundService" android:foregroundServiceType="location" android:exported="false"></service>
Location always permission has been allowed in the app settings.
Can anyone help?
I'm having an issue with building Xamarin Forms apps through Azure Piplines. When it gets to the step to install Xamarin in the build agent the URL requested returns at 404. software.xamarin.com Is anyone else experiencing this and found a workaround? I'm afraid that Microsoft has killed the ability to build through Pipelines.
Querying
https://software.xamarin.com/Service/Updates?v=2&pv964ebddd-1ffe-47e7-8128-5ce17ffffb05=0&pv4569c276-1397-4adb-9485-82a7696df22e=0&pvd1ec039f-f3db-468b-a508-896d7c382999=0&pv0ab364ff-c0e9-43a8-8747-3afb02dc7731=0&level=Stable
Retry attempt 1: System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
I'm experiencing a freeze issue in Xamarin.Forms iOS SDK version 14.0 after updating to iOS 18. When I open the app, a modal for notifications appears. I can interact with the modal just fine, but once I close it, the app freezes and becomes unresponsive. I can't click anywhere. The only workaround I've found is switching to landscape mode and back to portrait, which unfreezes the app. However, the issue persists each time I relaunch the app. Has anyone else encountered this, or know of a fix?
why is Xamarin not as popular as React native and Flutter?
basically it does same as React native and Flutter and was on market before them
but somehow market share is very less for xamarin
Working on a xamarin project in .net 7 and i'm getting this error
The TargetFrameworkVersion (Android API level 33) is lower than the targetSdkVersion (34). Please increase the `$(TargetFrameworkVersion)`
Attempted to add targetSdk as 34 in my manifest file but it didn't work
I have a xamarin project that im trying to update to Android 14 to release to the google play store. In the AndroidManifest editor i can quite happily select android 14. But in the Android.csproj properties, it only goes up to Android 13 - any ideas why? my SDK manager is all up to date, and has Android 14 installed.
Over the weekend we migrated our firewall and security to Cloudflare. Ever since, on Android devices running Android OS 13 or older, requests to the backend from my Xamarin Forms app drop immediately. Switching networks, uninstall/ reinstall, and restarting device does not help.
Upon sending the request, it throws a System.Net.HttpException with the message “the SSL connection could not be established, see inner exception. Full stack trace below.
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception. ---> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED at /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/boringssl/ssl/handshake_client.c:1132 at Mono.Btls.MonoBtlsContext.ProcessHandshake () [0x00042] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System/Mono.Btls/MonoBtlsContext.cs:220 at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status, System.Boolean renegotiate) [0x000da] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:715 at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus,bool) at Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x00000] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:289 at Mono.Net.Security.AsyncProtocolRequest.ProcessOperation (System.Threading.CancellationToken cancellationToken) [0x000fc] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs:223 --- End of inner exception stack trace --- at Mono.Net.Security.MobileAuthenticatedStream.ProcessAuthentication (System.Boolean runSynchronously, Mono.Net.Security.MonoSslAuthenticationOptions options, System.Threading.CancellationToken cancellationToken) [0x0025c] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:310 at System.Net.Http.ConnectHelper.EstablishSslConnectionAsyncCore (System.IO.Stream stream, System.Net.Security.SslClientAuthenticationOptions sslOptions, System.Threading.CancellationToken cancellationToken) [0x0007b] in /Users/builder/jenkins/workspace/archive-mono/2020-02/android/release/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectHelper.cs:165 --- End of inner exception stack trace ---
I have taken over maintenance of a B2B Xamarin app. as far as I can see, not much work has been done on it for 3 years or so.
Running on Android (or at least an android emulator) works like a dream.
When I try to run/debug this on my iPhone, it goes quite weird in a number of places.
One specific issue - theres an if check:
if(Uri != null) {...}
When I get to that point, Uri is definitely null, according to my debugger, so it should skip this block. It doesnt, it goes straight in there. Does anyone have any ideas at all why this would happen?
hello, i have a problem with ios badge notifications. it regular show the badge when a notification arrives but when there's no notification it still show the badge "1"
what is the problem and how can i handle it?
I'm converting my Xamarin app (for Android) to .NET 8. The app source code in Resources/values has these files:
colors.xml:
<resources> <color name="colorPrimary">#DD5706</color> <color name="colorPrimaryDark">#1B3147</color> <color name="colorAccent">#8167E6</color> <color name="white">#ffffff</color>
<color name="darkwhite">#EFFFFE</color>
<color name="transparent">#00ffff</color>
<color name="semitransparent">#880000</color>
<color name="orange">#ff8800</color>
<color name="light_orange">#e27d18</color>
<color name="light_blue">#87CEEB</color>
<color name="black">#000000</color>
<color name="menuButtonColor">#ea8e44</color>
<color name="btn_normal">#ea8e44</color>
<color name="pressed_color">#e27d18</color>
<color name="default_color">#f8f1e7</color>
<color name="selected">#f8dcd3</color>
</resources>
And in the drawable folder is background.xml:
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@android:color/background_light" android:state_pressed="false" android:state_selected="false"/> <item android:drawable="@color/orange" android:state_pressed="true" android:state_selected="true"/> <item android:drawable="@color/light_blue" android:state_pressed="false" android:state_selected="true"/> </selector>Yet when I build the app I see a series of errors like this:
resource color/orange (aka com.xyz.MyApp:color/orange) not found.
Any help is greatly appreciated.
Hello devs, just looking to hear your experiences migrating a cross platform xamarin forms app to .net Maui
I have an application in Xamarin for android. When I try to start the android emulator in debug mode from Visual Studio in debug mode, the application is launched on the emulator after a few minutes of build. But it shows a screen showing "Waiting for debugger to attach", and after some time the debug session ends abruptly with the following message in the output window:warning: could not connect jdwp. system.exception: process not found.
Can someone please help me figure out the issue?
I'm really new to .NET and Xamarin and I need to migrate an app that was written (not by me) for Xamarin.iOS and Xamarin.Android to something that's still supported. Right now there's a Visual Studio solution with a project for shared classes, and Xamarin.iOS and Xamarin.Android projects for platform specific code. It's a native Xamarin project but a lot of classes still have using Xamarin.Forms. I don't even know what I'm supposed to upgrade to, apparently .NET for android and .NET for iOS is what you're supposed to migrate to from native Xamarin, but also Maui is what you're supposed to migrate to if you're using Xamarin.Forms, but also Maui is hard to migrate to from native Xamarin? Does anyone know what I'm supposed to migrate to and how to do that?
Hi everyone, I just wanted to let you know that I have released a new stable version of the Plugin.Maui.AppRating package.
FakeReviewManager
to Android.Check it out!
Hello all I am a college student who has been tasked with learning Xamarin, this is my first mobile/crossplatform language how would uou go about learning it?
I’m working on a project in my company, but a difficulty arose in creating threads to verify communication with WebService and update the UI. Currently, this thread is hindering the proper functioning of the application. Has anyone ever had a similar problem? If so, how can I solve it?
Im considering porting some of my XF apps over to Blazor Hybrid. Is it possible to do so on a Mac with Visual Studio code? I don't see anything about Blazor Hybrid with visual studio code when I google.
thanks in advance
Does anyone know what will happen with my Xamarin Forms app when Apple are ending support for Xcode 15 next year? Will my app still be available on App Store for devices above IOS 17? Since a lot of people mention that Maui is still not ready for production, I was hoping to wait 8-12 months before converting, but if my app will be unusable when a new IOS version is released, I have to start researching for alternatives.