Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all 89864 articles
Browse latest View live

Hamburger menu icon color

$
0
0

Hello i use custom render to change Hamburger menu icon color
like this

 [Obsolete]
    public class CustomNavigationPageRenderer : MasterDetailPageRenderer
    {
        private static Android.Support.V7.Widget.Toolbar GetToolbar() => (CrossCurrentActivity.Current?.Activity as MainActivity)?.FindViewById<Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

        protected override void OnLayout(bool changed, int l, int t, int r, int b)
        {
            base.OnLayout(changed, l, t, r, b);
            var tintColor = Color.Black;
            var toolbar = GetToolbar();
            if (toolbar != null)
            {

                for (var i = 0; i < toolbar.ChildCount; i++)
                {
                    var imageButton = toolbar.GetChildAt(i) as Android.Widget.ImageButton;

                    var drawerArrow = imageButton?.Drawable as DrawerArrowDrawable;
                    if (drawerArrow == null)
                        continue;

                    imageButton.SetColorFilter(tintColor.ToAndroid());
                    //imageButton.SetImageDrawable(Forms.Context.GetDrawable(Resource.Drawable.hamburger));
                }
            }
        }

but when i navigate to home page from click button like this :

    await Navigation.PushModalAsync(new MasterDetailPage1()
                {
                    Detail = new NavigationPage(new MainPage()) {  }
                });

the icon change agine to old color please help


Xamarin.Forms 4.2 incompatibility?

$
0
0

Hello,

when I update Xamarin Forms from v4.1.0.709244 to v4.2.0.709249 the app started crashing right away on launch with this exception:

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object.

at Xamarin.Forms.Platform.Android.AppCompat.Platform.op_Implicit (Xamarin.Forms.Platform.Android.AppCompat.Platform canvas) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:491
at Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnDestroy () [0x0002f] in D:\a\1\s\Xamarin.Forms.Platform.Android\AppCompat\FormsAppCompatActivity.cs:221
at Android.App.Activity.n_OnDestroy (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in :0
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.9(intptr,intptr)

It crashes before it hits any line of code, so i am clueless.
Any ideas?

Thank you!

Strange performance issue with AndroidManifest.xml and minSdkVersion positioning

$
0
0

Hi all,
I want to share with you an issue that got me stuck for a whole day, finally I could solve it but afterall, I cannot understand the reasons of the failure, the real cause of the problem.
I added adMob integration on my MasterDetail xamarin forms project, worked perfectly on iOS, but on Android it turned out to be a performance problem. The animations and page transitions were laggy, freezing in slowness, resulting on an inaceptable user experience, especially when opening/closing the menu page (IsPresented=true).

After dozens of tests I realized the problem were in the AndroidManifest.xml, when declaring the new admob activity inside the "application" tag.

 <application android:label="XXXXX" android:icon="@drawable/icon">
  <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>
  <uses-sdk android:minSdkVersion="17" /><!--this line after the application declaration makes the whole app laggy-->

The performance problem disappears when moving the "uses-sdk" line before the application tag.

  <uses-sdk android:minSdkVersion="17" /><!--this line before the application declaration solves the issue-->
   <application android:label="XXXXX" android:icon="@drawable/icon">
     <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>

Yeah, I know it sounds crazy but is the way I solved the performance problem and It concerns me a lot... is there any rule I didn't know about the items positioning on the AndroidManifest?... maybe a bug? It should throw a warning or an error then...
I use FormsAppCompatActivity, It gave me some problems before, maybe is this the cause?

Regards

Messaging Center called twice in xamarin forms

$
0
0
MessagingCenter.Subscribe<string>(this, "LocationName", (value) =>
                {
                    FullPathName.Text = value;
                });

While I set a break point and notice that This MessagingCenter.Subscribe called twice.
How to solve this?

How to implement Horizontal ListView in Xamarin Forms.

$
0
0

We want to implement horizontal listview in our xamarin forms application, How it is possible?
Any other solution for this, please share.
Thanks in advance...

ViewBox implementation for Xamarin Forms!

$
0
0

Coming from WPF, I was pretty desperate for a ViewBox control in order to scale things like Labels and custom groups of controls into a given arbitrary space and have it still get respected by the layout system (the Scale property is post-layout, so doesn't quite cut it).

I managed to implement my own ViewBox for Xamarin Forms.

Here is the implementation below:

using System;
using Xamarin.Forms;

[ContentProperty(nameof(Content))]
public class ViewBox : Layout<View>
{
    public static readonly BindableProperty ContentProperty = BindableProperty.Create(
        propertyName: nameof(Content), returnType: typeof(View), declaringType: typeof(ViewBox), propertyChanged: OnContentChanged);

    public static void OnContentChanged(BindableObject bindable, object oldVal, object newVal)
    {
        var vb = (ViewBox) bindable;

        vb.Children.Clear();
        vb.Children.Add((View) newVal);
    }

    private SizeRequest? ContentMeasurementCache { get; set; }

    public View Content
    {
        get { return (View) GetValue(ContentProperty); }
        set { SetValue(ContentProperty, value); }
    }

    protected override void OnAdded(View view)
    {
        if (Children.Count > 1)
            throw new InvalidOperationException("ViewBox can only contain a single child. Use Content property.");
    }

    protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
    {
        var zero = new SizeRequest(Size.Zero);

        var content = Content;

        // if content is not set or constraints don't make sense, return zero
        if (content == null ||
            double.IsNaN(widthConstraint) || double.IsNegativeInfinity(widthConstraint) ||
            double.IsNaN(heightConstraint) || double.IsNegativeInfinity(heightConstraint))
            return zero;

        // measure the content without constraints and cache it for later
        ContentMeasurementCache = MeasureFull(content);

        var request = ContentMeasurementCache.Value.Request;

        var rw = request.Width;
        var rh = request.Height;

        // if we have infinite space, request content at full-scale
        if (double.IsPositiveInfinity(widthConstraint) && double.IsPositiveInfinity(heightConstraint))
            return new SizeRequest(request);

        // if we only have infinite width, request content scaled to fit heightConstraint (or zero, if impossible)
        if (double.IsPositiveInfinity(widthConstraint))
            return new SizeRequest(request * DivideOrZero(heightConstraint, rh));

        // if we only have infinite height, request content scaled to fit widthConstraint (or zero, if impossible)
        if (double.IsPositiveInfinity(heightConstraint))
            return new SizeRequest(request * DivideOrZero(widthConstraint, rw));

        // Otherwise, request content scaled to fit minimum constraint ratio (or zero, if impossible)
        return new SizeRequest(request * Math.Min(DivideOrZero(widthConstraint, rw), DivideOrZero(heightConstraint, rh)));
    }

    protected override void LayoutChildren(double x, double y, double width, double height)
    {
        var content = Content;
        var requestCache = ContentMeasurementCache;

        if (content == null)
            return;

        if (requestCache == null)
            requestCache = ContentMeasurementCache = MeasureFull(content);

        var request = requestCache.Value.Request;

        var rw = request.Width;
        var rh = request.Height;

        // scale from center (we could add LayoutOptions detection so that we could have start/end/center scaling)
        content.AnchorX = content.AnchorY = 0.5;
        content.Scale = Math.Min(DivideOrZero(width, rw), DivideOrZero(height, rh));
        content.Layout(new Rectangle(x + ((width - rw) / 2), y + ((height - rh) / 2), rw, rh));
    }

    private SizeRequest MeasureFull(View view) => view.Measure(double.PositiveInfinity, double.PositiveInfinity, MeasureFlags.IncludeMargins);

    private double DivideOrZero(double top, double btm) => btm == 0 ? 0 : top / btm;
}

The above approach is a little 'hacky' with respect to Children and Content. It derives from Layout<View>, but ideally I would have liked to derive from Layout and used InternalChildren, which is internal instead of protected (not sure why). I considered deriving from ContentView or TemplatedView, but they seem to live under the assumption that their Content property's size is respected as is (and a ViewBox's shouldn't be), so I didn't want to risk any unwanted behavior slipping by any of my overrides.

Other than that, nothing fancy here; this code was drawn up to closely imitate the WPF ViewBox source (here if you're interested: https://referencesource.microsoft.com/#PresentationFramework/src/Framework/System/Windows/Controls/ViewBox.cs,22e476b746489c42), the only difference being that options for uniform stretching and whatnot are not possible in Xamarin at the moment since we only have Scale and not ScaleX and ScaleY (I read somewhere that this feature is in the pipeline though).

I think this would make a great addition to the Xamarin.Forms out-of-the-box features, and think it would be awesome if something similar to the above was added in a future release.

I'm pretty sure any code posted on a public forum is automatically public domain or something, but just to be sure, the above code is definitely free for anyone to use!

Feedback on the code also welcome.

Cheers! :)

ProGuard Problem

$
0
0

Hello, I'm having a problem when generating the apk file. This happens when I activate the proGuard. What I've done so far:

  • Reinstalling the SDK files;
  • Downloading the latest proGuard and updating the folder;

What is weird is that in a new project I don't have this problem. But in the project I'm working I have this issue, so maybe is something related to the project and not the interface. I an still a newbie to Xamarin and C# and I'm learning on the go. I thought about recreating the project, but I don't now the proper way to do it. I know I probably didn't get the necessary info in the question but please let me know what information is required.

Thanks a lot.

Is it possible to use Fonts for images in Shell.BackButtonBehavior?

$
0
0

I want to be able to use FontAwesome icons for the IconOverride in the Shell.BackButtonBehavior but I don't see a way to do it. Is it possible?


Hitting TabbedPage back button too fast on Android displays blank page bug

$
0
0

Hello,

I am using TabbedPages in my Xamarin.Forms app which contain a navigation back button built into the pages. The back navigation works fine, however I noticed only on Android if you are in nested TabbedPage views and hit the back button too fast it will bug out and the page will be blank. Has anyone else ran into this issue and is there some work around? I've also tried latest Xamarin.Forms and such and it happens still.

No valid iOS code signing keys found in keychain. You need to request a codesigning certificate

$
0
0

Hi guys

So I have build a Xamarin Forms application, that I now want to test on a physical iOS device. The debugger successfully run my program, but unfortunately I run into problems when I deploy my program on a physical iPhone.

I did the following in order to deploy my app:

  1. Followed this tutorial in order to create a Free provisioning profile for my app (https://docs.microsoft.com/en-us/xamarin/ios/get-started/installation/device-provisioning/free-provisioning?tabs=windows) (successfully runs xcode 1 view app, and installs provisioning profile on phone)
  2. Switched xamarin to debug on a phyiscal device

The bundle identifier naturally matches, and I have done the following to solve the issue:

  1. Deleted "CodesignEntitlements" from the .csproj

Still no success. I'm curious why Xamarin asks for a code signing key, while I'm still just debugging..

any help is much appreciated

Issue with navigation on iOS 13 update in Xamarin Forms

$
0
0

Since I updated a Xamarin Forms projects I noticed when I use Navigation.PushModalAsync(new Countries()); that it creates a stacking effect. Meaning I can still see the previous page behind the page pushed on top. I am then allowed to swipe down and navigate back to the previous screen. Is anyone experiencing this issue and if so how do I prevent this?

Pre-Release: Xamarin.Forms 4.3.0-pre2

$
0
0

We have a new pre-release with some exciting features for you. Please take a moment to upgrade a few projects and take things for a spin.

Release Notes

Highlights

  • CollectionView: Vertical, Horizontal, Grid, Custom. No more ViewCell wrapping.
  • CarouselView: based on the same foundation as CollectionView. AND join our challenge to get some swag!
  • HTML content type support for Label
  • Character spacing
  • Label padding
  • Entry clear button mode
  • ListView scrolled event
  • Display prompts (take entry on an alert modal)
  • Source link support
  • Android Support 28.0.0.3
  • Shell support for UWP (Preview)
  • And lots more!

Give it a look. Please file issues as you encounter them.

Xamarin Shell Tabbar inner navigation don’t reset the stack navigation

$
0
0

Hi All, I have a problem with the new Shell Project Template.
I have an app with 4 Tabs, each tabs can do inner navigation, for example: Tab1->Page1->Page2->Page3
My problem is that if I select another Tab and then return to previous Tab1 the navigation don’t start from Tab1 Page declared in Shell.xaml.cs but is on the last page visited, also if I clicked again on Tab1 the Tab1 Page is visible but all Command don’t work, via debug is hit correctly but nothing happen.

Navigating away fom modal screen causes a crash.

$
0
0

Hi all -

This is my first post as a newbie Xamarin Forms programmer.

I am trying to do the following:
1. Load a page (FooStart.xaml)
2. When I tap a button on that page, a modal window (FooModal.xaml) should load. I want this modal page to act like a pop-up menu for FooStart.
3. When I tap one of the buttons/labels in the modal window that forwards to other pages, I want the modal window to disappear and I want to be forwarded to the new page (FooEnd.xaml, for example), such that the back button on FooEnd.xaml will take me back to FooStart.xaml.

I am trying the code below, as well as various configurations, but the code that runs when the button in the modal is tapped causes the application to crash. Can anyone tell me how to accomplish this using the navigation stack? (I know there are pop-up packages out there, but this is the preferred way at this time, if it can be made to work.)

FooStart.xaml

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             x:Class="SMS.FooStart"
             Title="FooStart">
    <ContentPage.Content>
        <StackLayout>
            <Button Text="Open FooModal" Clicked="Button_Clicked" />
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

FooStart.xaml.cs

using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace SMS
{
    public partial class FooStart : ContentPage
    {
        public FooStart()
        {
            InitializeComponent();
        }
        async private void Button_Clicked(object sender, EventArgs e)
        {
            await Navigation.PushModalAsync(new FooModal());
        }
    }
}

FooModal.xaml

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             x:Class="SMS.FooModal">
    <ContentPage.Content>
        <StackLayout>
            <Button Text="Go to FooEnd" Clicked="Button_Clicked" />
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

FooModal.xaml.cs

using System;
using Xamarin.Forms;

namespace SMS
{    public partial class FooModal : ContentPage
    {
        public FooModal()
        {
            InitializeComponent();
        }

        async private void Button_Clicked(object sender, EventArgs e)
        {
            Navigation.InsertPageBefore(new FooEnd(), this);
            await Navigation.PopModalAsync();
        }
    }
}

FooEnd.xaml

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             x:Class="SMS.FooEnd"
             Title="FooEnd">
    <ContentPage.Content>
        <StackLayout>
            <Label Text="This is FooEnd" />
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

FooEnd.xaml.cs

using Xamarin.Forms;

namespace SMS
{
    public partial class FooEnd : ContentPage
    {
        public FooEnd()
        {
            InitializeComponent();
        }
    }
}

Grid Layout ColumnSpacing Is Not Consistent?

$
0
0

Hi!

Sorry - another question from a relative newbie to mobile development and Xamarin.

I am experimenting with creating a custom popup keypad, and I am working with an example from https: //docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/layouts/grid* (slightly modified). As the ultimate keypad will be dynamic in layout/content, I am using the code-behind cs file for layout (yes, I know this is not recommended...but I am unsure how to do dynamic layout within xaml).

Anyway, I am having difficulty with the (standard) rendering of the Grid. When I use ColumnSpacing = 1, the spacing between cells in columns 1 & 2 (except for row 5, following a column span) does not appear, and none of the spacing between columns 2 & 3 shows, as seen in this screenshot (using the VS Android emulator):

I cannot understand why, apparently, the spacing shown there is one less than specified. To prove this, I changed ColumnSpacing (and RowSpacing) to 2, and (as you can see) the spacing now shows, but is narrower than the other spacings:

I have searched online to no avail. All I can find are questions related to removing the column and row spacing.

Here is the class definition (again, as modified from the referenced sample):

public partial class CalculatorGridCode : Grid
{
    public CalculatorGridCode()
    {
        // Title = "Calculator - C#";
        BackgroundColor = Color.FromHex("#404040");
        RowSpacing = 1; ColumnSpacing = 1;

        var plainButton = new Style(typeof(Button))
        {
            Setters = {
              new Setter { Property = Button.BackgroundColorProperty, Value = Color.FromHex ("#eee") },
              new Setter { Property = Button.TextColorProperty, Value = Color.Black },
              new Setter { Property = Button.CornerRadiusProperty, Value = 0 },
              new Setter { Property = Button.FontSizeProperty, Value = 40 }
            }
        };
        var darkerButton = new Style(typeof(Button))
        {
            Setters = {
              new Setter { Property = Button.BackgroundColorProperty, Value = Color.FromHex ("#ddd") },
              new Setter { Property = Button.TextColorProperty, Value = Color.Black },
              new Setter { Property = Button.CornerRadiusProperty, Value = 0 },
              new Setter { Property = Button.FontSizeProperty, Value = 40 }
            }
        };
        var orangeButton = new Style(typeof(Button))
        {
            Setters = {
              new Setter { Property = Button.BackgroundColorProperty, Value = Color.FromHex ("#E8AD00") },
              new Setter { Property = Button.TextColorProperty, Value = Color.White },
              new Setter { Property = Button.CornerRadiusProperty, Value = 0 },
              new Setter { Property = Button.FontSizeProperty, Value = 40 }
            }
        };

        RowDefinitions.Add(new RowDefinition { Height = new GridLength(150) });
        RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
        RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
        RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
        RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
        RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });

        ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
        ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
        ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
        ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });

        var label = new Label
        {
            Text = "0",
            HorizontalTextAlignment = TextAlignment.End,
            VerticalTextAlignment = TextAlignment.End,
            TextColor = Color.White,
            FontSize = 60
        };
        Children.Add(label, 0, 0);

        Grid.SetColumnSpan(label, 4);

        Children.Add(new Button { Text = "C", Style = darkerButton }, 0, 1);
        Children.Add(new Button { Text = "+/-", Style = darkerButton }, 1, 1);
        Children.Add(new Button { Text = "%", Style = darkerButton }, 2, 1);
        Children.Add(new Button { Text = "div", Style = orangeButton }, 3, 1);
        Children.Add(new Button { Text = "7", Style = plainButton }, 0, 2);
        Children.Add(new Button { Text = "8", Style = plainButton }, 1, 2);
        Children.Add(new Button { Text = "9", Style = plainButton }, 2, 2);
        Children.Add(new Button { Text = "X", Style = orangeButton }, 3, 2);
        Children.Add(new Button { Text = "4", Style = plainButton }, 0, 3);
        Children.Add(new Button { Text = "5", Style = plainButton }, 1, 3);
        Children.Add(new Button { Text = "6", Style = plainButton }, 2, 3);
        Children.Add(new Button { Text = "-", Style = orangeButton }, 3, 3);
        Children.Add(new Button { Text = "1", Style = plainButton }, 0, 4);
        Children.Add(new Button { Text = "2", Style = plainButton }, 1, 4);
        Children.Add(new Button { Text = "3", Style = plainButton }, 2, 4);
        Children.Add(new Button { Text = "+", Style = orangeButton }, 3, 4);
        Children.Add(new Button { Text = ".", Style = plainButton }, 2, 5);
        Children.Add(new Button { Text = "=", Style = orangeButton }, 3, 5);

        var zeroButton = new Button { Text = "0", Style = plainButton };
        Children.Add(zeroButton, 0, 5);
        Grid.SetColumnSpan(zeroButton, 2);
    }
}

I am using Microsoft Visual Studio Community 2019
Version 16.2.5
VisualStudio.16.Release/16.2.5+29306.81
Microsoft .NET Framework
Version 4.7.03190

Installed Version: Community

Visual C++ 2019 00435-60000-00000-AA475
Microsoft Visual C++ 2019

Application Insights Tools for Visual Studio Package 9.1.00611.1
Application Insights Tools for Visual Studio

Azure App Service Tools v3.0.0 16.2.292.25104
Azure App Service Tools v3.0.0

C# Tools 3.2.1-beta4-19408-03+2fc6a04980f800c59e8ede97e6ae294ff47d666e
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Devart Code Compare 5.1.183
Devart Code Compare
Copyright (c) 2012-2019 Devart. All rights reserved.
http: //www.devart.com/codecompare/*

Extensibility Message Bus 1.2.0 (d16-2@8b56e20)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

IntelliCode Extension 1.0
IntelliCode Visual Studio Extension Detailed Info

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 16.2.6 (4cfc7c3)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 5.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https: //docs.nuget.org/*

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

Visual Basic Tools 3.2.1-beta4-19408-03+2fc6a04980f800c59e8ede97e6ae294ff47d666e
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.4 for F# 4.6 16.2.0-beta.19321.1+a24d94ecf97d0d69d4fbe6b8b10cd1f97737fff4
Microsoft Visual F# Tools 10.4 for F# 4.6

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

Xamarin 16.2.0.95 (d16-2@37df81894)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 16.2.0.375 (remotes/origin/d16-2@357d38ef4)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 16.3.117 (59a59e8)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 9.4.1.1 (d16-2/cec9eb4)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: mono/mono/2019-02@e6f5369c2d2
Java.Interop: xamarin/java.interop/d16-2@d64ada5
LibZipSharp: grendello/LibZipSharp/d16-2@caa0c74
LibZip: nih-at/libzip/rel-1-5-1@b95cf3f
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.27.1@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-2@6f6c969

Xamarin.iOS and Xamarin.Mac SDK 12.14.0.114 (c669116)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Any ideas?
Thank you in advance for your input!

*I am new to this forum, so it won't let me post links. Therefore I have inserted a space between "https:" and the rest of each address, should you care to explore the references...


Plugin InAppBilling - Android : You are not connected to the Google Play App store #195

$
0
0

Hello,

I tried to implement the plugin InAppBilling (github.com/jamesmontemagno/InAppBillingPlugin) on Android but I have an exception for each connection to the play store : Plugin.InAppBilling.Abstractions.InAppBillingPurchaseException: You are not connected to the Google Play App store.

The plugin is installed via Nuget, the apk is published on the play store in the same version as the development. I don't understand where the worry comes from?

Have you ever had this problem ?

Thank you

Label bindig in MVVM

$
0
0

how to save this number that I bring in a ListView in a variable in my viewModel

what is your experience with IAP plugin for Android? Something doesnt seem to be correct for me!

$
0
0

I think that we all use https://github.com/jamesmontemagno/InAppBillingPlugin for Android and IOS. I havent implemented IOS indeed but on Android, I am disturbed about in app purchase implementation. I dont know about if that is the way it is for Google or it is the problem with the plugin. I have also seen issues created for that bu they are closed without solution.
When I check my app center logs, I am seeing more than 50% even though 70% probably in app purchase attempts are failing. here are 2 messages,
- You are not connected to the Google Play App store.
- Unable to process purchase.

It was said that if user is not connected to google play store or if user doesnt have a valid gmail for purchase, you get either of these messages. I mean that I cant believe it, because everybody is using his/her android with gmail. in order to download an app, you need to be connected with gmail. I know that if there is no payment method attached, it also throws this exception. But it cant be google doing this by design.
I have experience with UWP and Microsoft will show a popup for user to enter email address and password to login in such case.
Can somebody bring some experience either from xamarin forms or xamarin android native?

Setting Max Value on Progress bar

$
0
0

How does one set the max value on the progress bar say I am looping a set of files like winforms used to have it had min and max values

Xam.Plugin.Media ....Manifest file is failing to build/debug (Droid)

$
0
0

Everything was working. Updated VS (to fix iOS error)....now my Manifest is giving me an error:

unexpected element <provider> found in <manifest>.

Figured out the issue real quick. My manifest file goes from this:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.myApp" android:installLocation="auto">
    <uses-sdk android:minSdkVersion="23" android:targetSdkVersion="28" />
    <application android:label="MyApp" android:icon="@drawable/Logo"></application>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.CAPTURE_SECURE_VIDEO_OUTPUT" />
    <uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" />
    <!--- this is where the "magic" will happen below --- comment not in code -->
    <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.myApp.fileprovider" android:exported="false" android:grantUriPermissions="true">
        <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"></meta-data>
    </provider>
</manifest>

To adding an "application" child and excludes the "provider".....

  <uses-permission android:name="android.permission.CAPTURE_VIDEO_OUTPUT" />
  ...
  <application android:label="MyApp" android:icon="@drawable/logo" android:name="android.app.Application" android:allowBackup="true" android:debuggable="true">
    <activity android:configChanges="orientation|screenSize" android:icon="@mipmap/icon" android:label="MyApp" android:theme="@style/MainTheme" android:name="md5a8c6c68a1c8ff1337a1f00940961e4a2.MainActivity">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
    <activity android:configChanges="orientation|screenSize" android:name="md54fe4aef201482be7d95d72c0c9bf0b33.FilePickerActivity" />
    <activity android:configChanges="orientation|screenSize" android:name="md54cd65ac53ae710bff80022afc423e0f3.MediaPickerActivity" />
    <service android:name="md5dcb6eccdc824e0677ffae8ccdde42930.KeepAliveService" />
    <receiver android:enabled="true" android:exported="false" android:label="Essentials Battery Broadcast Receiver" android:name="md5d630c3d3bfb5f5558520331566132d97.BatteryBroadcastReceiver" />
    <receiver android:enabled="true" android:exported="false" android:label="Essentials Energy Saver Broadcast Receiver" android:name="md5d630c3d3bfb5f5558520331566132d97.EnergySaverBroadcastReceiver" />
    <receiver android:enabled="true" android:exported="false" android:label="Essentials Connectivity Broadcast Receiver" android:name="md5d630c3d3bfb5f5558520331566132d97.ConnectivityBroadcastReceiver" />
    <provider android:authorities="com.myApp.fileProvider" android:exported="false" android:grantUriPermissions="true" android:name="xamarin.essentials.fileProvider">
      <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/xamarin_essentials_fileprovider_file_paths" />
    </provider>
    <receiver android:enabled="true" android:exported="false" android:name="md51558244f76c53b6aeda52c8a337f2c37.PowerSaveModeBroadcastReceiver" />
    <provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="1999999999" android:authorities="com.myApp.mono.MonoRuntimeProvider.__mono_init__" />
    <!--suppress ExportedReceiver-->
    <receiver android:name="mono.android.Seppuku">
      <intent-filter>
        <action android:name="mono.android.intent.action.SEPPUKU" />
        <category android:name="mono.android.intent.category.SEPPUKU.com.myApp" />
      </intent-filter>
    </receiver>
  </application>
...
  <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.myApp.fileprovider" android:exported="false" android:grantUriPermissions="true">
    <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"></meta-data>
  </provider>
</manifest>

I literally have no idea what to do :#

Project/Environment info:
Xamarin.Plugin.FilePicker v.4.0.1.5
Xamarin.Forms v.4.0.0.425677 (otherwise error received - no access to folders XML folders in documentation)

Viewing all 89864 articles
Browse latest View live


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