thub.users.profile.tabs.comments.personalized


Can I do this so that it will both show the images in the local and show the image returned as a result of the web response?

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

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.

Please create the custom CallService in Android platform project and then replace the SetSpeakerphoneOn method with SetAudioRoute in PhoneCallListener class.

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

Update

The parameter of the SetAudioRoute method should be (VideoQuality)CallAudioRoute.Speaker.

I posted the solution for 11. The key was Task.Delay and restarting phone two consecutive times. When it stops working I rebooted twice.

Do you test the function on other devices? Will the restarting operation work on all Android 11 phones.

I called my carrier to see how I can downgrade the OS to 11 but they have no clue. If you have any suggestion along that line I would rather just go to 11.

Try to check the phone manufacturer's website for this. If the website doesn't provide the method, it's not recommended to do that.

Hi, PiotrekBrzezin-9255. To fix the VS hang problem, try the following tips:

  1. 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

  2. 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.

  3. 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.

Would you mind sharing the related sample code or a basic repo demo? It'll help to reproduce the issue to find out the cause.

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.

Update

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);
    }
}