Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all 204402 articles
Browse latest View live

ObjCRuntime Exception On Binding Library that used to work

$
0
0

It's been a while since I used the code but the binding library used to work without any issues. Now I'm getting this exception:

{ObjCRuntime.RuntimeException: Can't determine if Grabba_v2.GRGrabbaBarcode is a custom type when the dynamic registrar has been linked away.
at ObjCRuntime.Class.IsCustomType (System.Type type) [0x0001d] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.11/src/Xamarin.iOS/ObjCRuntime/Class.cs:511
at Foundation.NSObject.get_IsCustomType () [0x00017] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.11/src/Xamarin.iOS/Foundation/NSObject2.cs:112
at Foundation.NSObject.MarkDirty (System.Boolean allowCustomTypes) [0x00009] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.11/src/Xamarin.iOS/Foundation/NSObject2.cs:186
at Foundation.NSObject.MarkDirty () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.14.0.11/src/Xamarin.iOS/Foundation/NSObject2.cs:178
...

I tried setting the Grabba assembly as preserve="all"

I've also set the mtouch flag to -nolinkaway

Not sure where to go from here and a Google search hasn't yielded much.


Label text clipping bottom or top in xamarin forms uwp

$
0
0

While using the label the bottom or top of the text is cutting slightly. Even I have given enough height it's still there. You could see in the following
screenshot the word is slightly cut in the bottom.

Have anyone faced this issue, please help. Thanks in advance.

As for the Webview to allow authentication when you log on the website ?

$
0
0

Пожалуйста, помогите решить эту проблему.
Я использую WebView для открытия веб-сайта.
Сайт использует авторизацию через AD.
При использовании Chrome открывается диалоговое окно авторизации.

При использовании приложения учетные данные не запрашиваются.

Как решить ?

Implementing Print on a bluetooth printer in Xamarin Forms App

$
0
0

Any one can you please share with us how to working on bluetooth printer and how to print with help of bluetooth printer in xamarin forms xamarin forms? I wasted for days to find a way to work with bluetooth printer.

Thanks,
sudheer G

Google Tag Manager & Google Analytics on Xamarin Forms using UWP

$
0
0

We have a website where Xamarin Forms is deployed on the Universal Windows Platform. Can we deploy Google Tag Manager & Google Analytics in this instance and if so how?

When NUnit 3 Will be Supported, What is the future of Xamarin.UITest Vs. Other Automation Tools?

$
0
0

I have two questions in single quote.

  1. When NUnit 3 will be supported to Xamarin.UITests?
  2. What is the Future of Xamarin.UITest? As there is no improvement and interesting releases for Xamarin.UITest against other Mobile automation tools in the market (lets say Appium). Here NUnit 3 is also not being supported by Xamarin. We have already started and reached 60% completion of Mobile Automation using Xamarin.UITest, so now question is what is the future (plan) of Xamarin.UITest? Are we on right path by selecting Xamarin.UITest for Automation?

How to subscribe an event without setting Control.Delegate to null in a Xamarin.iOS custom renderer

$
0
0

I need to extend the Xamarin.Forms ListView to have an async method for scroll the list view to top. Create a control and the custom renderer to subscribe the scrolling ended event inside the OnElementchanged override.

Major code:
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.ListView> e)
{
...
//Without settings Delegate to null, I am getting "Event registration is overwriting existing delegate..." error

Control.Delegate = null;

//Below line is actually override the Delegate, and cause some problems (for example the Grouping for the list view is not working )
Control.ScrollAnimationEnded += OnScrolledToTop;
...

}

My questions is how should I do in the custom renderer without setting Control.Delegate to null in this Xamarin.iOS custom renderer?

Many thanks.
Kevin Hu

No template to add Class to Xamarin Forms ios project

$
0
0

I have added a new xamarin forms project on visual studio 2017 community version. I want to add a class in ios project but there is no template to add class. I had same issue with my previous project. I am unable to add class file to ios project.


Xamarin.Android remove compiler warnings

$
0
0

Hi,

I'm getting a lot of warnings when compiling Xamarin.Android project, for example:

Severity Code Description Project File Line Suppression State
Warning Skipping F1Mobile.Droid.Resource.Style.TextAppearance_StatusBar_EventContent_Time. Please check that your Nuget Package versions are compatible. F1Mobile.Droid

Severity Code Description Project File Line Suppression State
Warning Skipping F1Mobile.Droid.Resource.Style.TextAppearance_AppCompat_Notification_Time_Media. Please check that your Nuget Package versions are compatible. F1Mobile.Droid

Does anyone know how to remove them?

thanks.

how to add user's location marker on custom map

$
0
0

Hellow! How to add user's location marker on my custom map?

I have made my map by the toutorial

docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/map/customized-pin

It's work correctily with my custom pin, but the property
IsShowingUser=true
doesn't work

This app is incompatible with all of your devices

$
0
0

Hi,
I have published my first app and it is working well on my mobile. But I can't find it from play store search as well as other people. When I open it directly from the link I can see the message: This app is incompatible with all of your devices. Probably this is why I can't find it.
Can you help me fix it?
This is my manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http -removed ://- schemas.android.com/apk/res/android" android:versionCode="5" android:versionName="1.0" package="dillos.taxcalculator.android" android:installLocation="auto">
    <uses-sdk android:minSdkVersion="22" android:targetSdkVersion="27" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <application android:label="Kalkulator Przedsiębiorcy 2019" android:icon="@drawable/iconcalc">
        <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" />
    </application>
    <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-9289439137782734~6416628524" />
</manifest>

How can I use App Center to send push notifications?

$
0
0

I spent already a few hours with Visual Studio App Center in order to send push notifications to my Xamarin iOS application. But it's never working. I tried it with Sandbox and Production but none of them worked. App Center never sends my notifications, the result is always 0/0 sent.
I don't know what I'm doing wrong and I couldn't find a tutorial for Xamarin iOS that treats my issue. Maybe somebody could do a (video) tutorial on how to send push notifications with App Center to Xamarin iOS devices?

Do you know what I'm doing wrong?

ISetting

$
0
0

Hello Developers,
Now I use ISettings for saving User setting.
When user login, I keep user Id, Password and the current working process for this user.
When this user logs out I want to clear this(not delete).
When another user login I want to show Setting relating to this user.

Now I have a problem with User1 can see User2 app setting.
How can I solve that

Binding to a toolbar button not working

$
0
0

Hi there,

i have a problem with a toolbar button and its binding.

First, I have created some entries and a button to save the users input.

Class AddReportPage

    <Button Text="OK" Command="{Binding SaveCommand}"></Button>

The button is working as expected.

But I want to save the data by hitting a button in the toolbar instead. So I put a toolbar item into my CustomPage, which includes the basic layout for all my pages.

Class AddSystemPage : CustomPage

XAML:

    <local:CustomPage.ToolbarItems>
        <ToolbarItem x:Name="btnOk" Text="OK" Command="{Binding SaveCommand}"/>
    </local:CustomPage.ToolbarItems>

For any reason, the binding of the SaveCommand to the toolbar item is not working.
I tried to do the binding in the ViewModel like this:

Class AddReportViewModel : BindableBase, INavigationAware, INotifyPropertyChanged

    public AddReportViewModel()
    {
        SaveCommand = new Command(Save, CanSave);
    }


public Command SaveCommand { get; set; }

    private void Save()
    {
        var item = new ReportItem()
        {
            subject = Title,
            description = Body,
            created = DateTime.Now

        };

    // save the item to database ...

    }

    private bool CanSave()
    {
        return !string.IsNullOrEmpty(Title) && !string.IsNullOrEmpty(Body);
    }

The toolbar item is definitely existing - but the command will not be executed.
Can anyone help me please?

Custom Renderer for tabs at the bottom of the page + icon font -> Icons invisible at clicking a tab?

$
0
0

Hey there,

in my project, I am trying to display tabs at the bottom of the page, as well as on Android as on iOS.
I found out that I can achieve it by adding this line to the xaml.cs:

On().SetToolbarPlacement(ToolbarPlacement.Bottom);

In addition, I want to use icon font for the tab's icons. Therefor, I'm using the FlatTabbedRenderer from this post/example:

(For some reason, I am not able to post the link)

The first problem was, that the example renderer works with TabLayout to set the new drawable icon to it. But when I use toolbar placement at the bottom, the tab elements are not TabLayout elements any more, they are changed to BottomNavigationItemView.
So I had difficulties to address the correct view to change the icons, and I had no idea, which one is the correct Resource Id of the BottomNavigation.
I solved this by writing a workaround, which iterates through all views of the RootView and returns the one of type "BottomNavigationItemView".
Then I changed the UpdateTabbedIcons method to work with those menu items, and everything is fine....

...... until I click one of the tabs. Then, for any reason, the icons of all tabs are not visible anymore.

Has anyone an idea, why the tab's text and icon are disappearing on click?

I will try to upload a sample project that shows this behaviour.

Thanks in advance!


Xamarin Designer replaces constraints to Superview with constraints to Safe Area

$
0
0

We are trying to create a custom header following the steps described here:
https://medium.com/@kahseng.lee123/creating-custom-navigation-bar-tab-bar-for-iphone-x-f03b1e1827d3

Everything works fine and background view snaps to superview leading and trailing ages as expected. It does it correctly in both landscape and portrait mode and on both iPhone X as well as on iPhone 8.

However, if we close the storyboard and open it again, the background view constraints that were set to leading and trailing ages of superview get replaced with constraints to Safe Area. This breaks the design where the background view would not extend all the way to the edges on iPhone X.

We reproduced this behavior with a simple view on both Visual Studio Mac and Microsoft Visual Studio for Windows

Is this a bug or expected behavior? If later, what would be the correct way to extend the background view to the edges of the screen on both iPhone 8 and iPhone X?

CompaNova LLC

any Xamarin Chat SDK that you recommend?

$
0
0

Hello,

we would like to implement a one-to-one and group chat feature, do you know any Xamarin SDK that you recommend?

Thanks,
Charbel

Xamarin.IOS Always process during background. And UWP Screen transition when tapping notification.

$
0
0

IOS
I want to process during the background.
I would like to do this until the user manually terminates the application.
I do not want background fetch.
I do not want to enable GPS.
I do TCP/IP communication with the PC in the background.
I will notify you after TCP/IP communication.

Is there a good way to do it?

UWP
Screen transition when tapping notification.

How do you do?

Xamarin page back pressesd

$
0
0

I call new page from Main Page with this.PushAsync(new Page1());
and in Page 1 call Page2 with this.PushAsync(new Page1());
When clicking back key or from the back button at Page1.I want to go back to Main Page, not Page1. How can I?

Example to integrate firestore in Xamarin.Forms Andriod/IOS?

$
0
0

So, im trying to implement this libraries inside my project:
Firestore Android:
https://www.nuget.org/packages/Xamarin.Firebase.Firestore/60.1142.0-beta2

Firestore IOS:
https://www.nuget.org/packages/Xamarin.Firebase.iOS.CloudFirestore/

And I've only found 1 example of how to use them both:
https://github.com/yamachu/Sample-Firebase-Cloud-Firestore-Xamarin.Forms

Since I'm having problems when adding/updating in the mapping of .NET objects to Java/NSObject respectively. Does anyone know a library that provides an example of that?
Thanks!

Viewing all 204402 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>