The pin on ios is called annotation and the function code is different from the Android platform. Here is the related doc, you could refer to it.
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/map-pin#creating-the-custom-renderer-on-ios
Xamarin.Android is only a layer of wrapper for Android native libraries, no extra operations, so if you're seeing the issue in Android 12 but not in Android 11, it's likely an Android potential issue which you can turn to Reporting Bugs | Android Open Source Project for help.
The setSpeakerphoneOn method doesn't work since Android 9, try using SetAudioRoute instead on the higher version. The method is a little different on Xamarin.Android, the parameter is type of VideoQuality enum.
if (Android.OS.Build.VERSION.SdkInt > BuildVersionCodes.P)
{
//CallService.getInstance().SetAudioRoute(VideoQuality.High);
CallService.getInstance().SetAudioRoute((VideoQuality)CallAudioRoute.Speaker);
}
else
{
audioManager.SpeakerphoneOn = !isSpeakerOn;
}
Here is the similar issue case, you could refer to it.
https://stackoverflow.com/questions/61284015/android-10-audio-settings-permission-denial-setspeakerphoneon
The parameter of the SetAudioRoute method should be (VideoQuality)CallAudioRoute.Speaker.
Hi, PiotrekBrzezin-9255. To fix the VS hang problem, try the following tips:
Do you debug the project on an emulator? Please make sure you've enabled the hardware acceleration on your pc. You could refer to this doc: https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/hardware-acceleration?pivots=windows
What's the version of VS on your pc? Try to update it to the lastest stable version and test again. Or open VS installer to repair the VS.
Restart the adb server: open Tools -> Android -> Restart Adb Server
Hi, PiotrekBrzezin-9255. Will the problem occur on a new created project? And try to uninstall the VS and reinstall it to deploy the project. If both doesn't work, this may a potential issue with VS and it's sugggested to report the issue to the VS product team via Visual Studio's "Report a Problem" menu and then follow them on the developer community site. Please see How to report a problem with Visual Studio - Visual Studio | Microsoft Docs
@JassimAlRahma-9056 Sorry for my mistake. Try to create the value JsonSerializer.Serialize first and then pass the value to the StringContent.
string the_content;
if (!string.IsNullOrWhiteSpace(TextBoxNewMessageTitle.Text))
{
the_content = JsonSerializer.Serialize(new
{
app_id = SecureStorage.GetAsync("AppID").Result,
headings = new
{
en = TextBoxNewMessageTitle.Text.Trim()
},
subtitle = new
{
en = TextBoxNewMessageSubtitle.Text.Trim()
},
contents = new
{
en = EditorMessage.Text.Trim()
},
url = "https://www.cnn.com",
included_segments = "All",
};
}
else
{
the_content = JsonSerializer.Serialize(new
{
app_id = SecureStorage.GetAsync("AppID").Result,
subtitle = new
{
en = TextBoxNewMessageSubtitle.Text.Trim()
},
contents = new
{
en = EditorMessage.Text.Trim()
},
url = "https://www.cnn.com",
included_segments = "All",
});
}
var content = new StringContent(the_content), Encoding.UTF8, "application/json");
Hi, SudhanshuSharma-2925. Security checks like are prone to false positives. They just check if there are APIs that might be used in an unsafe way. If you're still concern about these APIs' security, you could open a support ticket at:
https://support.serviceshub.microsoft.com/supportforbusiness/onboarding?origin=%2Fsupportforbusiness%2Fcreate%3FsapId%3D211dd84f-3474-c3c5-79bf-66db630c92a6
Hi, @VaranasiPrasanth-3918 Will the problem occur on another device or emulator? I created a basic demo with Xamarin.Forms 5.0.0.2083 to test the function, it works as expected. Try to empty the bin and obj folders of the shared project and each platform project. Then open the VS to redeploy the project.
And please make sure the Xamarin.Forms package of Android project has also been updated. Xamarin.Forms 5.0 requires to use AndroidX, we need to set the TargetFramework to Android 10 or higher.
It seems the entry lost the focus, you could detect the Unfocused of the entry. Then add a break point to the code to of fetching data to check when the focus is lost.
Do you update the UI in the background process? It may cause the entry to lost the focus.
And you can open a support topic for one on one support if your problem is urgent.
https://support.serviceshub.microsoft.com/supportforbusiness/onboarding?origin=%2Fsupportforbusiness%2Fcreate%3FsapId%3D211dd84f-3474-c3c5-79bf-66db630c92a6
Hi, njsokalski. Could you please share more details about the featur you want to achieve? If you want to scroll to a position and place each corresponding item at the top or end, change the value of the snapPreference property.
Here is the sample code, you could refer to it.
public class CustomSmoothScroller : LinearSmoothScroller
{
public CustomSmoothScroller(Context context) : base(context)
{
}
public override int CalculateDtToFit(int viewStart, int viewEnd, int boxStart, int boxEnd, int snapPreference)
{
return base.CalculateDtToFit(viewStart, viewEnd, boxStart, boxEnd, -1);
}
}
public class MyLinearLayoutManager : LinearLayoutManager
{
private MainActivity mainActivity;
public MyLinearLayoutManager(Context context) : base(context)
{
this.mainActivity = (MainActivity)context;
}
public override void SmoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position)
{
CustomSmoothScroller linearSmoothScroller = new CustomSmoothScroller(mainActivity);
linearSmoothScroller.TargetPosition = position;
StartSmoothScroll(linearSmoothScroller);
}
}
Yes. It's supported to display the images in xamarin.forms from the local images and downloaded images. Here is the related doc, you could refer to it.
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/images?tabs=windows#download-images