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

Your uploaded an APK that is not signed with the upload certificate Xamarin.Forms App

$
0
0

I developed apps using Xamarin.Forms, and I would publish the app to google store, I generated the APK and Store key but when I upload the APK file to Google Play Store, I get the following error

Upload failed You uploaded an APK that is not signed with upload certificate. You must use the same certificate. The Upload certificate has fingerprint...etc


App Settings doesn't remove in Xamarin.Forms

$
0
0

I developing apps using Xamarin.Forms, the app stored some data as App Settings, the issue is when removed the app from the Android phone and installed it again, the old AppSettings doesn't remove.

Live/Hot reloading at runtime that WORKS!

How to share contact data of my app with whtsapp in .vcf /vcard format using xamarin forms

$
0
0

I have a application that creates a .vcf file after you input data. it stores storage provided by the phone, i want to click on a list view item and get the vcf file and share it via email, sms, whats app, Skype etc how do I implement this in IOS and Android.

Thank you

How to share vcf file in through my App with other Apps on the phone like email..

$
0
0

I already created one .vcf file using string data now i want to open app picker in both platform . I am able to open picker in android using Dependency services but unable to open ios . is there any way do this in Forms otherwise in ios

Removing the shade from the bmp image

$
0
0

Heloo,

i want to remove the black shade from the image without affecting the content using basic c# code.

Can you give your suggestion to implement this..

Please find the attached image

VS2019 Error - This ABI is no longer supported.

$
0
0

Existing solution builds fine in VS2017.
Pulled it down from TFS to a new directory for testing in VS2019.
Everything builds including the java binding libraries and all projects.
Until it gets to the droid project that fails.

Doing all the standard things like clean, delete bin and obj and .vs directories to clear up the build problem don't help.

Anyone seen it or have a hint?

How to show iphone calander in Xamarin Forms

$
0
0

I want open the default phone calendar for iPhone, from Xamarin Forms. Can we able to do that? Could not find any reference links could anyone help me on it?

Thanks in advance


How to do a simple InputBox dialog?

$
0
0

I'm struggeling with a simple thing.

How can I display a prompt in a dialog box, thats waits for the user to input text or click a button, and then returns a string containing the contents of the text box with Xamarin.Forms?

With Android or WP8 I was able to create a popup with some controls, but I didn't find any similar in Xamarin.Forms.

Thx, Tom

Error parsing XML: unclosed token (APT0000)

$
0
0

Hey there. I get that error I have wrote in the title. Does anyone know what is wrong and/or how to fix it? iOS works fine. Android does not work.

App.xaml.cs:

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

[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
namespace BookCodeSL
{
    public partial class App : Application
    {
        public App()
        {
            InitializeComponent();

            MainPage = new PlatInfoSap1();
        }

        protected override void OnStart()
        {
            // Handle when your app starts
        }

        protected override void OnSleep()
        {
            // Handle when your app sleeps
        }

        protected override void OnResume()
        {
            // Handle when your app resumes
        }
    }
}

PlatInfoSap1.xaml.cs:

using System;
using System.Collections.Generic;

using Xamarin.Forms;

#if __IOS__
using UIKit;

#elif __ANDROID__
using Android.OS;

#endif

namespace BookCodeSL
{
    public partial class PlatInfoSap1 : ContentPage
    {
        public PlatInfoSap1()
        {
            InitializeComponent();

#if __IOS__

            UIDevice.device = new UIDevice();
            modelLabel.Text = device.Model.ToString();
            versionLabel.Text = String.Format("{0} {1}", device.SystemName, device.SystemVersion);

#elif __ANDROID__
            modelLabel.Text = String.Format("{0} {1}", Build.Manufacturer, Build.Model);
            versionLabel.Text = Build.VERSION.Release.ToString();

#endif
        }
    }
}

PlatInfoSap1.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" x:Class="BookCodeSL.PlatInfoSap1">


    <StackLayout Padding="20">
        <StackLayout VerticalOptions="CenterAndExpand">
            <Label Text="Device Model:"/>

            <ContentView Padding="50,0,0,0">
                <Label x:Name="modelLabel"
                       FontSize="Large"
                       FontAttributes="Bold"/>
            </ContentView>
        </StackLayout>

        <StackLayout VerticalOptions="CenterAndExpand">
            <Label Text="Operating System Version:"/>

            <ContentView Padding="50,0,0,0">
                <Label x:Name="versionLabel"
                       FontSize="Large"
                       FontAttributes="Bold"/>
            </ContentView>
        </StackLayout>
    </StackLayout>

</ContentPage>

abc_primary_text_disable_only_material_light.xml - This is where "Error parsing XML:unclosed token (APT0000)" can be read:

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND

Long label with word wrap doesn't seem to auto calculate height correctly

$
0
0

I have a label within a flex layout that doesnt seem to adjust to the new height of a wrapped label. Is this a bug or am I missing something?

This is within a stack layout

There is still another full sentence after this that wont show up unless I manually enter a HeightRequest larger

Error System.Runtime.InteropServices.WindowsRuntime

$
0
0

Severity Code Description Project Path File Line Suppression State
Error Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'System.Runtime.InteropServices.WindowsRuntime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'System.Runtime.InteropServices.WindowsRuntime.dll'
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Java.Interop.Tools.Cecil.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference)
at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(DirectoryAssemblyResolver resolver, ICollection`1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
at Xamarin.Android.Tasks.ResolveAssemblies.Execute(DirectoryAssemblyResolver resolver) (Projectname.Droid)

How to use DisplayAlert from a viewmodel without additional frameworks

$
0
0

I need to launch a DisplayAlert () from the body of a command in my viewmodel, how can I do this without using additional libraries?
I have the idea that it should be done with the MessagingCenter like all these kinds of things but I would like someone more experienced to confirm it and if possible, indicate the correct way to use it without causing loss of memory.

Opening file with my Xamarin Forms App in iOS

$
0
0

Hi,

I'm developing one app where I created a backup file with the file extension ".backup" inside the file system using my Xamarin Forms application.

If open the .backup file in the file system in Android it is prompting me to select one of the app in which my application is also there in that prompt list.

How can I achieve the same in the iOS application also.

Regards
Sylendra

Method 'Android.Support.V4.View.ScaleGestureDetectorCompat.SetQuickScaleEnabled' not found

$
0
0

Hi,
All I tried to do is implementing PinchGesture. the app compiled and worked fine, the moment i start pinching, it breaks and shows the subject message error exception.
My target is 8.1 Oreo,
Linking Assembly is set to None,
Android.Support.V4 => 27.0.2.
Xamarin.forms V.3.4.0
What could be the reasons for this ???


TapGestureRecognizer not working properly in single click for StackLayout and Grid.

$
0
0

Hi All,

I have used TapGestureRecognizer for stacklayout and grid in my code and when click it works properly in other device except Samsung S6 galaxy. While double click it works fine.

Code Snippet:


<StackLayout.GestureRecognizers>

</StackLayout.GestureRecognizers>

Am using Xamarin Forms- 2.4.0.282 version. Could you please help me to resolve this?

Regards,

Cheran

Xam.Plugins.Messaging, Sending an attachment

$
0
0

I am banging my head against a brick wall with this.

I'm using XF 3.2, XAM plugin 5.2, sending an email with out an attachment is fine.

I have the following code;

        var emailSender = CrossMessaging.Current.EmailMessenger;

        var email = new EmailMessageBuilder()
            .Subject("xyz")
            .Body("redacted")
            .WithAttachment()
            .Build();

        emailSender.SendEmail(email);

Now regardless what I try, local PCL path(string, string) , "content//", i can not get anything other than this Error, when sending the email with attachment.

Java.Lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference

when I watch the "email", the Java.io.file is null still.

I think I need to use a dependency service to send the email, and then i could use the native file formats, but i would still need to know the full correct path to lets say assets or resources on both platforms.

It doesn't help that the documentation seems vastly outdated, poorly structured, and assumes a lot of prior knowledge.

Making use of the APK

$
0
0

Hi All,

Thanks again for all the past help... so now the app is built the icons are set... and the APK is made... (will be trying this for what seems to be a very complicated apple process very soon as I think I understand what xamarin is attempting... but to be honest... I will admit I don't understand the apple deployment process... we have a dev account but I am guessing I need to copy and paste my source code to visual studio on the mac?)

Any way this question is about installing the apk... currently two devices they I have tried here at the company to install the APK on the apk fails to install.
I am guessing I am not understanding the xamarin target framework option and the the min android version...

THe app is built with targeted frame work set at api 27... with the min android version at api 23 so and droid 8.1 thru 6.0....
I am guessing that the min android option is for show?

My users have android 8.0 on their devices so I thought that range would allow them to install and use the apk...

So far on the devices I have tried to install the apk on they have failed... the only device I can install the apk on is the android emulator I have on the development windows machine I made the application on...

When I selected adhoc on the archive from visual studio and gave it a signing password and all of that stuff...
but on the users devices the apk will not install..

Do I need to step down the target frame work and rewrite this basic app to work on each level of android so for example.. set target frame work and write a xamarin forms for that api level and step down and write on for android 6?

Will I need to do some similar for the apple products as well?

Thanks again guys

Listview scrollbar RightToLeft seems not working

$
0
0

Hi,

I'm trying to do a chat app and i want my scrollbar on the right.

So I added the FlowDirectionEnum to my listview. But the scrollbar stay on the left.

I have heard that this feature has been added on XF >=3.0.

Any Idea ?

Hard Disk Space on MAC

$
0
0

How much space does visual studio 2017 (community) + xamarin occupy in a MAC. Is a 128gb MAC Air sufficient to work with Xamarin?
Thank you

Viewing all 91519 articles
Browse latest View live