Quantcast
Channel: Recent Threads — Xamarin Community Forums

MessagingCenter.Subscribe exceptions

0
0

Hello,
What are the circumstances that would cause the following call to throw an exception?

MessagingCenter.Subscribe<MyClass>(this, "testmessage", OnTestMessage);

I'm getting "Index was outside the bounds of the array" on this and having a hard time understanding why? I would assume this is a threadsafe operation, but maybe not?

Any insight into this would be appreciated.
Thanks,
Dean


xamarin build error

0
0

I have open 2017 project from 2019. Now i am getting this error. my Xamarin.Android.Support.Core.Utils version is 27.0.2 and Xamarin.Android.Support.v4 is 23.4.0.1

The type 'FileProvider' exists in both 'Xamarin.Android.Support.Core.Utils, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' and 'Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

Trying to connect to remote Mac

0
0

I am trying to connect to my remote Mac. It says that connection finished but get an error on list that says: "a remote error occured on the connected Mac" on the log I get this error:
System.NullReferenceException: Object reference not set to an instance of an object.at Xamarin.Messaging.Windows.ErrorsManager.<>c__DisplayClass3_0.b__0(IErrorItem item) in E:\A_work\963\s\src\Core\Xamarin.Messaging.Windows\ErrorsManager.cs:line 24at Clide.ErrorsManager.<>c__DisplayClass7_0.b__0(Object sender, EventArgs e) in E:\A_work\349\s\src\Clide.Core.Windows\Errors\ErrorsManager.cs:line 55at Microsoft.VisualStudio.Shell.Task.OnNavigate(EventArgs e)at Microsoft.VisualStudio.Shell.Task.Microsoft.VisualStudio.Shell.Interop.IVsTaskItem.NavigateTo()at Microsoft.VisualStudio.ErrorListPkg.Shims.ErrorListPackageEventProcessor.PreprocessNavigate(ITableEntryHandle entryHandle, TableEntryNavigateEventArgs e)at Microsoft.VisualStudio.Shell.TableControl.Implementation.TableControlEventManager.<>c__DisplayClass40_0.b__2(ITableControlEventProcessor p, ITableEntryHandle entry)at Microsoft.VisualStudio.Shell.TableControl.Implementation.TableControlEventManager.<>c__DisplayClass60_1`1.b__0()at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Any help with this?

When I start my emulator it opens but won´t start

0
0

If I try to open emulator by Android Device Manager a message appear:
WPHX is not configured.
Turn on "Windows Hypervisor Platform" feature to switch to the Native Hypervisor and accelerate your emulator.
And I search on Internet and almost sites say to enabled Hyper-V but I don´t have these files in my computer

From VS 2019 6.8 recommended way to edit storyboard is by editing them in Xcode on Mac

0
0

Good day,

In VS 2019 for Windows a message is displaying to warn one of the coming changes, namely that in the future storyboards should be edited on the Mac. This page explains how to edit a storyboard on the Mac by having the project open in VS for Mac and then 'calling' Xcode for the editing: https://docs.microsoft.com/en-us/xamarin/ios/user-interface/storyboards/

What remains unclear to me, is how VS for Windows still features in the new approach. We have been using VS for Windows paired with a Mac to edit our storyboards in a Xamarin.iOS project.

Should one completely stop using VS for Windows and now use only VS for Mac?

If one can still use VS for Windows, how do you open the project (sitting on the Windows pc) in VS for Mac in order to use Xcode for the storyboard editing?

And if one should no longer use VS for Windows, how do you migrate a project to Mac?

I'm hoping someone can point me in the right direction. Perhaps there is documentation on this I was unable to find yet.

Visual Studio 2019 16.5.4 iOS Bunde Signing Please wait until the provisioning information is loaded

0
0

I am facing an issue with the provisioning for iOS quit working in Visual Studio and also the Apple Accounts management.
On the bunde signing properties I only get "Please wait until the provisioning information is loaded":

And under Options -> Xamarin -> Apple Accounts I get "Please wait until the local provisioning service is initialized":

Anyone seen or fixed that issue before?

Thanks,
Stephan

Also posted the question here:
https://developercommunity.visualstudio.com/content/problem/990441/xamarin-apple-accounts-please-wait-until-the-local-1.html

FirebaseApp is not initialized on real devices

0
0

Hello! I'm trying to add push notifications in Xamarin.Forms.
On Genymotion it's work fine but on real devices i have an error:
Default FirebaseApp is not initialized.Make shure to call FirebaseApp.initializeApp(Context)

google-services.json is present in Android project with GoogleServicesJson BuildAction

My MainActivity:

     public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
        {
            internal static MainActivity Instance { get; private set; }
            internal static FirebaseInstanceId FirebaseInstance { get; private set; }

            public static int CurrentUserId { get; set; }
            protected override async void OnCreate(Bundle bundle)
            {
                base.OnCreate(bundle);           

                TabLayoutResource = Resource.Layout.Tabbar;
                ToolbarResource = Resource.Layout.Toolbar;

                VideoViewRenderer.Init();
                global::Xamarin.Forms.Forms.Init(this, bundle);
                string dbPath = FileAccessHelper.GetLocalFilePath("LocalDataBase.db");

                LoadApplication(new App());

                Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);
                UserDialogs.Init(this);
                CachedImageRenderer.Init();           

            //on real devices it return  null
                var app = Firebase.FirebaseApp.InitializeApp(this.ApplicationContext);

                Instance = this;
            }

Duplicate 'EmbeddedResource' items were included after migrate to .NET Standard?

0
0

Hi,

Using VS 2017 15.4.0

Following James Montemagno "Upgrading to Xamarin.Forms to .NET Standard" https://channel9.msdn.com/Shows/XamarinShow/Snack-Pack-15-Upgrading-to-XamarinForms-to-NET-Standard?ocid=player

When trying to Clean/Build I am receiving the error:

Severity Code Description Project File Line Suppression State
Error Duplicate 'EmbeddedResource' items were included. The .NET SDK includes 'EmbeddedResource' items from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultEmbeddedResourceItems' property to 'false' if you want to explicitly include them in your project file. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'App.xaml'; 'MainPage.xaml' App5.core C:\Program Files\dotnet\sdk\2.0.2\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.DefaultItems.targets 274

Any solution please?


Asset packs for Xamarin Android in Visual Studio

0
0

Is it possible to add asset packs to your xamarin.android project using visual studio? I've manage to get aab support to work but can't find anything about how to actually add asset packs.

Null reference exception in production at Xamarin.Forms.NavigationPage.GetHasBackButton

0
0

I am facing null reference exception in production at but not able to reproduce in dev. I am not getting any idea where is this coming from. Have anybody faced this?

The whole stack trace is below:

[Message:Value cannot be null.
Parameter name: page]==[StackTrace: at Xamarin.Forms.NavigationPage.GetHasBackButton (Xamarin.Forms.Page page) <0xa9c554 + 0x000a0> in :0
at Xamarin.Forms.Platform.iOS.NavigationRenderer.UpdateLeftBarButtonItem (Xamarin.Forms.Platform.iOS.ParentingViewController containerController) <0xbef714 + 0x0009f> in :0
at Xamarin.Forms.Platform.iOS.NavigationRenderer.<.ctor>b__9_0 (IVisualElementRenderer sender) <0xbf0184 + 0x000af> in :0
at Xamarin.Forms.MessagingCenter+<>c__DisplayClass4_0`1[TSender].b__0 (System.Object sender, System.Object args) <0xab1734 + 0x0009f> in :0
at Xamarin.Forms.MessagingCenter.InnerSend (System.String message, System.Type senderType, System.Type argType, System.Object sender, System.Object args) <0xab0f44 + 0x001b7> in :0
at Xamarin.Forms.MessagingCenter.Send[TSender] (Xamarin.Forms.TSender sender, System.String message) <0xab0a60 + 0x0004f> in :0
at Xamarin.Forms.Platform.iOS.TabletMasterDetailRenderer.HandlePropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs e) <0xc00b30 + 0x0016f> in :0
at (wrapper delegate-invoke) :invoke_void_object_PropertyChangedEventArgs (object,System.ComponentModel.PropertyChangedEventArgs)
at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) <0xa73c50 + 0x0006b> in :0
at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) <0xafaf04 + 0x0002f> in :0
at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindablePropertyContext context, System.Object value, Boolean currentlyApplying, SetValueFlags attributes, Boolean silent) <0xa754e8 + 0x00273> in :0
at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes) <0xa74818 + 0x00357> in :0
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, Boolean fromStyle, Boolean checkAccess) <0xa7531c + 0x0011b> in :0
at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) <0xa73a1c + 0x0003b> in :0
at Xamarin.Forms.MasterDetailPage.set_IsPresented (Boolean value) <0xad4bcc + 0x0005b> in :0
at Xamarin.Forms.Platform.iOS.NavigationRenderer.b__58_0 (System.Object o, System.EventArgs e) <0xbf0460 + 0x00057> in :0
at UIKit.UIBarButtonItem+Callback.Call (Foundation.NSObject sender) <0x1b4c54 + 0x0005f> in :0
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) <0x1b2108 + 0x00033> in :0
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) <0x1b2030 + 0x000cb> in :0

Remove navigation bar from Tabbed Page

0
0

Hi,
I'm trying to remove the navigation bar in a tabbed page but without success.

I tried to add in OnAppearing() and in the constructor

NavigationPage.SetHasNavigationBar(this, false);

but the navigation bar still there.

Grid not input transparent?

0
0

So I've got a stack layout with a whole bunch of stuff in it including some buttons. Everything works fine. But on some devices, some of the information can get pushed off the bottom of the screen. Can't have that. So I change the stack layout to a grid (litteraly, that's all I'm doing) and boom, everything looks right and the information stays at the bottom where it belongs. But then all of the buttons stop working? Like the grid is now capturing the screen presses? I even set InputTransparent=true on the grid for giggles to no avail. Anyone know why a grid wouln't let presses through anymore but it's happy-go lucky with a stack layout? This is in android by the way. I'd try it out in iOS but I can't seem to get VS to connect to the mac anymore since the OS upgraded the other day.

How to access both Photo and video feature from Camera Media Plugin in Xamarin.Forms?

0
0

How to access both Photo and video feature simultaneously from Camera Media Plugin in Xamarin.Forms? Example: Pressing camera would open the camera, but there would be the ability to swipe to select video

Why Glyph property in FontImageSource doesn't bind?

0
0

Hi community.
I have a strange behavior with FontImageSource. I can't get property binded to Glyph.

<ContentPage.BindingContext>
        <documents:DocumentListViewModel />
    </ContentPage.BindingContext>
    <ContentPage.ToolbarItems>            
        <ToolbarItem Command="{Binding ChangeViewTypeCommand, Mode=OneWay}">
            <ToolbarItem.IconImageSource>
                <FontImageSource Glyph="{Binding ViewTypeGlyph}" Size="26" FontFamily="{x:StaticResource MaterialFontFamily}" Color="{DynamicResource PrimaryColor}"/>
            </ToolbarItem.IconImageSource>
        </ToolbarItem>
    </ContentPage.ToolbarItems>

public string ViewTypeGlyph
        {
            get
            {
                switch (this.ViewType)
                {
                    case ViewType.SmallRows:
                        return MaterialDesignIcons.ViewAgendaOutline;
                    case ViewType.BigRows:
                        return MaterialDesignIcons.CropSquare;
                    case ViewType.Grid:
                        return MaterialDesignIcons.ViewGridOutline;
                }
                return MaterialDesignIcons.ViewAgendaOutline;
            }
        }

I put a break point on the get block and it does not raise.

What am I missing?

Note: setting Glyph to static property works as well

<FontImageSource Glyph="{x:Static icons:MaterialDesignIcons.ViewAgendaOutline}" Size="26" FontFamily="{x:StaticResource MaterialFontFamily}" Color="{DynamicResource PrimaryColor}"/>

is it possible to implement NFC in xamarin forms?

0
0

I have been trying with sample plugin but i am not able to figure out how to implement NFC read/Write for Android/iOS using a plugin.if it is possible share some sample code which would help me


Can't Open WhatsApp in xamarin ios

0
0

how can I open WhatsApp from my app to a specific number? For Android, the following is working fine

But it didn't work in IOS. What's App Open and then Show Message (This Link couldn't be opened Check the link and try again)

Here is my code for shared Project:

try
{

if (await Launcher.TryOpenAsync(new Uri("whatsapp://send?phone=+" + mobile)))
await Launcher.OpenAsync(new Uri("whatsapp://send?phone=+"+ mobile));
else
await Rg.Plugins.Popup.Services.PopupNavigation.PushAsync(new ShowMessagePage("Install Whatsapp", 5000));

}
catch (Exception ex)
{
await Rg.Plugins.Popup.Services.PopupNavigation.PushAsync(newShowMessagePage(Helpers.TranslateExtension.Translate("Error"), 5000));

}

I Added That in info.plist

LSApplicationQueriesSchemes

whatsapp

Why am I not getting a .dSYM file when I build my iOS app?

0
0

I have an App the has been submitted to Apple Play Store that they are failing because it's crashing on startup.

Works fine here so I need to get the .dSYM file so I can figure out where it's crashing. I have the crash report from Apple, I just need to figure out how to generate the file.

Using VS2019 on Windows, paired with a Mac for builds. Latest version of Xamarin.

I do an Archive of the App in Release Mode

In the build Log I am seeing this:

Directory "bin\iPhone\Debug\CaseCmdrProMobile.iOS.app.dSYM" doesn't exist. Skipping.
_ParseExtraMtouchArgs:
NoSymbolStrip Output: False
NoDSymUtil Output: false

I have to be missing something simple to get it to give the symbol file.

Any Help is greatly appreciated.

Brien King

Clear an Entry form

0
0

Hi,
I have a StackLayout with "Entry" in the layout and I have an Clear button at the bottom. I want to be able to clear out the Values that the users keyed in if they press the "Clear" Button. I'm not sure how to do this.
I'm new to Xamarin
Thank you,

How to vertically center an item in a grid cell?

0
0

I have a ListView item template that contains a grid with 3 columns: an image, a label and another image. All items are have their VerticalOptions set to LayoutOptions.Center. However, the list displays the items vertically aligned to the top, as shown in this image:

ravib.com/download/item.template.vcenter.png

The item template is defined in code as follows:

        // Create list view item template
        this._listOrgs.ItemTemplate = new DataTemplate (() => {

            // Selected indicators
            Image imgSelected = new Image() {
                Aspect = Aspect.AspectFill,
                WidthRequest = 24,
                VerticalOptions = LayoutOptions.Center,
                Source = ImageSource.FromResource("check_yellow_24.png"),
            };
            imgSelected.SetBinding (Image.IsVisibleProperty, "IsSelected");
            imgSelected.SetValue (Grid.ColumnProperty, 0);

            // Label
            Label lblOrgName = new Label() {
                VerticalOptions = LayoutOptions.Center,
                Font = Font.SystemFontOfSize (NamedSize.Large),
                HorizontalOptions = LayoutOptions.StartAndExpand,
            };
            lblOrgName.SetBinding (Label.TextProperty, "Name");
            lblOrgName.SetValue (Grid.ColumnProperty, 1);

            // "Has children" indicator
            Image imgHasChildren = new Image() {
                Aspect = Aspect.AspectFill,
                WidthRequest = 24,
                VerticalOptions = LayoutOptions.Center,
                Source = ImageSource.FromResource("arrow_right_blue_24.png"),
            };
            imgHasChildren.SetBinding (Image.IsVisibleProperty, "HasChildren");
            imgHasChildren.SetValue (Grid.ColumnProperty, 2);

            // Compose view cell
            return new ViewCell {
                View = new Grid {
                    Padding = new Thickness (25.0f, 0, 0, 0),
                    ColumnDefinitions = new ColumnDefinitionCollection() {
                        new ColumnDefinition() { Width=24 },
                        new ColumnDefinition() { Width=GridLength.Auto },
                        new ColumnDefinition() { Width=24 },
                    },
                    Children = { imgSelected, lblOrgName, imgHasChildren }
                }
            };
        });

How do I get the items to display vertically centered? Thanks.

best approach to handle dark theme?

0
0

I'm working on an app for UWP, Android, and iOS using Xamarin.Forms.

I just started testing on my iPhone 8 which is set to dark mode and noticed that text in the ListView controls is not visible. The ListView is bound to an ObservableCollection and the custom data template has 2 label controls in a grid. I don't have any color information specified in the XAML, just using defaults. But on the iPhone with dark mode, the list background is black and the text is apparently black as I can't see it. If I switch my iPhone back to light theme I can read the text.

Note that the other controls in the view (outside the list) do not have any problems. I'm using both labels and buttons and they are all readable. Its just the list view which has a black background and the labels within the list view (in the custom data template) apparently have black text on a black background.

My hope would have been that with defaults (no color info set in the XAML) the result would be readable without me having to do anything. Its looking like I will need to have some sort of platform specific code which is also sensitive to theme and then add conditional coloring based on that.

Anyone know of the best, simplest, cross-platform way to achieve this? I'm guessing this will also be an issue for "dark" android and UWP though I haven't tested those.

How to setup bindingcontext in xaml?

0
0

Hello,

I usualy setup the binding in the view in this way:

_viewModel = new UserPageViewModel(mgr);
BindingContext = _viewModel;

What is the same command in the xaml?

The following is not working:

Can someone help?

How can i make a game in unity and run the game when i run xamarin.forms project?

0
0

Hi, I just came xamarin crash I want to make a game project that should be called from unity, how can I do it, help guide me


Remove gap between cells in ListView

0
0

Hi,

We are having a problem with gaps between cells in a ListView. We set SeparatorVisibility="None" but still there are a 1-pixel high gap in some cases.

On iOS is seems to be connected with the CachingStrategy setting of the ListView. If we set the CachingStrategy to RetainElement there are no gaps, but when using RecycleElement the gap is there.

On Android the gap is there no matter what.

I've filed a bug about this (Bug 39802) and you can use the attached testproject to test it.

Anyone got any input on this? A workaround?

Can any one please can help me with my problem with BindingContext?

0
0

Hi, everyone I need help for my problem. I am trying to bind the context from the viewmodel like this

<ContentPage.BindingContext> <viewModels:BLEConncetViewModel/> </ContentPage.BindingContext>

and also I have a constructor inside my view model that it have some parameters on it, here its starts the problem because when I try to bind it appears this message Type 'Type BLEConnectViewModel' is not usable as an object element because is not public or does not define a public parameterless constructor or a type converter. No default constructor found.

And the constructor is like this: I am using Prism container.

public BLEConncetViewModel(INavigationService navigationService, IAdapter btAdapter)
{
_navigationService = navigationService;
_btAdapter = btAdapter;
_btAdapter.DeviceDiscovered += OnDeviceDiscovered;
OnClickCommand = new DelegateCommand(OnClick);

    }

Thanks.

Share from Xamarin Essentials mysteriously quit working after updates, but only on iPad on iOS13.2

0
0

I updated my iPad to 13.2, updated to latest XCode on my mac, updated VS, updated to XF 4.3.

I know, not smart.

Everything appeared to work, until I tried the SHARE function of my app on iPad. The pop-over does not appear. An older version of my app works OK, and the new version works OK on my iPhone running 13.1.3.

I did try rolling back XF to what I was using (since it was easy), no help there.

Oh, and well there's another part to this mystery. To share multiple files, I wrote my own code using the iOS api, including creating an Activity Vew Controller (the pop-over). This doesn't work either.

Is there some kind of iPad settings or Info.plist thing I'm missing here? Got me very confused.

Error using MySql connector with Xamarin

0
0

Hi,

I am trying to use MySql plugin in Xamarin project.

I have added the pliugin to all my PCL projects and the used:

sql_connection = new MySqlConnection("Server=mysql.mydomain.com; Database=mydb; Uid=myuser; Pwd=mypassword;");

try
{
    sql_connection.Open();
}
catch (MySqlException ex)
{
    DisplayAlert("Error", ex.Message, "Ok");
}

but I am getting below error:

System.TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.Replication.ReplicationManager' threw an exception. ---> System.TypeInitializationException: The type initializer for 'MySql.Data.MySqlClient.MySqlConfiguration' threw an exception. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Configuration.ClientConfigPaths..ctor (System.String exePath, System.Boolean includeUserConfig) [0x00050] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
at System.Configuration.ClientConfigPaths.GetPaths (System.String exePath, System.Boolean includeUserConfig) [0x00018] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
at System.Configuration.ClientConfigurationHost.get_ConfigPaths () [0x0000a] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
at System.Configuration.ClientConfigurationHost.GetStreamName (System.String configPath) [0x0006d] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
at System.Configuration.ClientConfigurationHost.get_IsAppConfigHttp () [0x00000] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
at System.Configuration.Internal.DelegatingConfigHost.get_IsAppConfigHttp () [0x00006] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
at System.Configuration.ClientConfigurationSystem..ctor () [0x00051] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
at System.Configuration.ConfigurationManager.EnsureConfigurationSystem () [0x00024] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
--- End of inner exception stack trace ---
at System.Configuration.ConfigurationManager.EnsureConfigurationSystem () [0x00060] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
at System.Configuration.ConfigurationManager.PrepareConfigSystem () [0x0000a] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x0000a] in <4cd8a957e7664f4a9e27ce43dd1afeb7>:0
at MySql.Data.MySqlClient.MySqlConfiguration..cctor () [0x00000] in <575e720ed6c440559324a6291091586f>:0
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.Replication.ReplicationManager..cctor () [0x0001e] in <575e720ed6c440559324a6291091586f>:0
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.MySqlConnection.Open () [0x000b9] in <575e720ed6c440559324a6291091586f>:0

How to prevent multiple clicks on a button?

0
0

I know there are many ways to prevent multiple clicks on a button in Xamarin, but is there a single solution to prevent it globally? i.e. in every button in my app. Otherwise, what would be the best solution for me to do it to every button I have?

OneSignal HandleNotificationOpened redirect the diffirent page

0
0

Hello in my project I use OneSignal for notifications. How can I redirect the different page from droid or ios project. I used passing parameter to LoadApplication(new App(bool launchFromNotification)), it works if app is working at background but it is not working when app is killed. How can I solve it?

How to choose the right tech stack for the taxi startup?

0
0

Hi,

How to pick the right tech stack to launch the taxi startup?


Which would be the right technologies to build an application similar to a taxi application?

0
0

Hello,

I'm new to the Xamarin community. I salute you all.
Concerning my question, I'm trying to figure out if it's possible to build with Xamarin an application which consists of functionalities such as the following:

  • Identifying in real time the position of a device and displaying on a map
  • Consuming REST APIs

Basically, the requirement is to build a simple taxi application which has some basic functionalities to be available on iOS and Android.
I've never worked with any mobile technologies yet nor with Xamarin and I would like to know which Xamarin platform is more suitable and available for windows in order to develop an application with such capabilities.

Thanks in advance,
Marius

how to do smooth scrolling in collectionview on android and ios

0
0

Hi,
My app has some Collectionview. Items binded when scrolling down but when items bind and scrolling collectionview is jittering on android and iOS. How to do smooth scrolling in collectionview. Anyone have any idea how to do this.

Binding Mode property default value

0
0

I'm seeing documentation about XAML, bindings and MVVM. The documentation about BindingMode says that:

OneWay: Indicates that the binding should only propagates changes from source (usually the View Model) to target (the BindableObject). This is the default mode for most BindableProperty values.

So, having a Entry which Text property binded to Message property of the viewmodel, if I want to update tha value of Message from the view I need this XAML:

<Entry Text="{Binding Message, Mode=TwoWay}"/>

But, I'm testing that and without setting Mode the value of Message is updated:

<Entry Text="{Binding Message}"/>

That works so, is the documentation wrong?

Get counrty code picker or popup

0
0

Hello guy's

my question is , that is there any plugin for get all country code for telephone in xamarin forms.
i'm surfing in google and get one thing CCP (country code picker ) for native android but for native ios i don't found any option,
so if nay solution in xamarin forms for this task please shear it .

See this link:- https://stackoverflow.com/questions/21421313/creating-a-spinner-for-choosing-country-code

Thank's.

integrate an image editor

0
0

Hi,

I want to integrate an image editor (similar to adobe creative SDK or Img.ly SDK) into xamarin.forms app, can anyone please suggest me a cross platform image editor?

is there any Framework or Library for Photo editing ?

0
0

Hey , im looking for a framework or library support PCL for photo editing , i want to develop an app for image editing like drag text and drag photos and icons to the main photo ,
if there is an framework or library please share it , or what is the best practices to do this

How to investigate libmonosgen crash

0
0

Hello,

Since the release of the latest version of my app the users have been complaining about random crashes in the app. It seems they appear randomly and so it's really difficult to get a reproducible example.
In the Google Play Console, I can see a lot of this kind of crashes:

`*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> package_name <<<

backtrace:
#00 pc 0000000000083134 /apex/com.android.runtime/lib64/bionic/libc.so (abort+160)
#01 pc 000000000028ccc4 /data/app/package_name-YTuAFYuF4HNO98PAk4zMrw==/lib/arm64/libmonosgen-2.0.so (monoeg_assert_abort+24)
`

Given the high number of them I suppose those are the crashes that the users are complaining about. Do you have any suggestion about how to investigate this kind of issues?
I tried to look it up here and there, but it seems it can be caused by a huge number of different issues, and I'm lost at the moment.


Problem with colors and themes on MIU12 Xiaomi phones

0
0

Hello,

I'm having a problem with invoking the Light theme in my app. Whatever I tried to do it wasn't working. The phone I'm testing on is Xiaomi Redmi Note 7 and Xiaomi Redmi Note 8.

So basically what I'm trying to do is to force my application to use Light Mode, because in MIU when the system Dark Mode is on, I'm getting all the wrong colors. When I turn off the Dark mode, everything is working fine.

We have tried many examples, such as using different light themes style (AppCompat, Material, etc.) but nothing changes.

Even in the Xamarin theming demo, which demonstrates the appliance of themes, when I choose the light mode, nothing changes.

Is there any way we can force switch off the Dark Mode for application, or use LightMode theme despite devices is using system DarkMode?

TabbedPage Icons

0
0

I have killed many, many hours now trying to make icons appear for Tabbed Pages on iOS. According to all of the forum and blog posts I've seen this is supposed to be super simple.

In fact my page is exactly this simple:

public class MainPage : TabbedPage
{
    public MainPage ()
    {
        Page page = new Page {
            Title = "Title",
            Icon = "clock.png"
        };

        this.Children.Add (page);
    }
}

The tab shows up, the "title" shows up, the icon never does.

The PNG is in the Resources folder of the iOS project and the build action is set to BundleResource.

I've tried:

  • a wide variety of images for the icon - a txt.png that I got from a sample, varying sizes from 30x30 to 48x48.
  • using icons from 3rd parties specifically designed to be beautiful, awesome, iOS icons for my app.
  • ensuring that the filename is all lower case, no spaces, dashes, tildes, acronyms or puns.
  • using a FileImageSource instead.
  • cleaning the project, rebuilding the project, uninstalling the app, killing the emulator.
  • Throwing salt over my shoulder, buying a rabbit's foot and throwing pennies in a fountain.

There is either some secret sauce to this or a bug ... would appreciate any suggestions.

Thanks,

Michael

How to get selected Text?

0
0

Hi, i want to get the selected Text from an Entry. I'm using an EntryRenderer and the methods SelectionStart and SelectionEnd, but the returned value of the methods is identical.

Can you give me a short example how to get the selected Text? I don't know what i'm doing wrong.
Thank you

Open mobile camera in webview

0
0

I'm building an application where i load website in a webview.

On website i open device camera ( take pics etc ) and its working perfectly fine on all browsers but when i load same application in xamarin.forms web view, mobile camera doesn't show up. Any idea what could be the reason ?

Regards
TA



Latest Images