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

Gmail Authentication in Xamarin forms

$
0
0

How to do gmail authentication in xamarin forms apps after shutdown google plus API. I found some of the tutorial on internet but all of are did using google plus api but which is not support now. Other tutorial little bit confusing for me to implement in my apps. Anyone can tell me how can i do this.

Thanks in advance.


Font asset not found Fonts/sans-serif-medium

$
0
0

Idk if it is because of new stable version 4.5.0.530 I updated my project to.
Everything was fine yesterday, now i get error "Font asset not found Fonts/sans-serif-medium" on this line Application.Current.MainPage = new AppShell();

StackTrace:
at Java.Interop.JniEnvironment+StaticMethods.CallStaticObjectMethod (Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0006e] in <26521a5118b44c858c385715922b9d5d>:0
at Java.Interop.JniPeerMembers+JniStaticMethods.InvokeObjectMethod (System.String encodedMember, Java.Interop.JniArgumentValue* parameters) [0x00018] in <26521a5118b44c858c385715922b9d5d>:0
at Android.Graphics.Typeface.CreateFromAsset (Android.Content.Res.AssetManager mgr, System.String path) [0x0004b] in <4ccdb3137d974856b786e1aeebbfbab6>:0
at Xamarin.Forms.Platform.Android.FontExtensions.LoadTypefaceFromAsset (System.String fontfamily) [0x00000] in D:\a\1\s\Xamarin.Forms.Platform.Android\Renderers\FontExtensions.cs:121
--- End of managed Java.Lang.RuntimeException stack trace ---
java.lang.RuntimeException: Font asset not found Fonts/sans-serif-medium
at android.graphics.Typeface.createFromAsset(Typeface.java:839)
at crc643f46942d9dd1fff9.ShellFlyoutRecyclerAdapter.n_onCreateViewHolder(Native Method)
at crc643f46942d9dd1fff9.ShellFlyoutRecyclerAdapter.onCreateViewHolder(ShellFlyoutRecyclerAdapter.java:56)
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6794)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5975)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5858)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5854)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2230)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1557)
at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1517)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:612)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3924)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3641)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4194)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:142)
at android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:41)
at android.support.design.widget.AppBarLayout$ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1556)
at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:888)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1255)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at mono.java.lang.RunnableImplementor.n_run(Native Method)
at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Edit: tried installing different Xamarin.Forms versions, same error.

Visual Material Entry Outlined

$
0
0

Im trying to use visual material style for my XF app. I need to use material entry in outlined mode. Is possible? Is possible also to have a start icon for the entry? thanks

Implement "update and re-install app" functionality programmatically in Xamarin forms

$
0
0

Hello,

I am working in Xamarin forms application.

My application is for in-House distribution purposes. So the latest app will be uploaded in one shared link.

My requirement is to implement "update and re-install app" functionality programmatically in my application. So that in case of an update app can download the latest apk from shared link and install latest version automatically without redirecting to the browser.

Is it possible? If anyone has any idea then please let me know.

Thanks.

Xamarin UI doesnt refresh after Command ( Picker )

$
0
0

Hello, i have a picker wich is binded to a List.
I fill the list with a command. After i invoke the command, still the picker is empty. I tried many things but couldnt solve it. I think there is a issue.
I also shared the code on Github. Thanks in advance.

TheProject

public class StocksModel : BaseViewModel
    {
        public int Stock_Id { get; set; } 

        private string _Stock_Name;
        public string Stock_Name
        {
            get { return _Stock_Name; }
            set
            {
                _Stock_Name = value;
                INotifyPropertyChanged();
            }
        }
    }





 public class HomeVM : BaseViewModel
    {
        public ICommand ShowStocksBtnCommand { get; protected set; }

        public HomeVM()
        {
            ShowStocksBtnCommand = new Command(ShowStockGO);

        }


        private void ShowStockGO(object obj)
        {

            AddStocksMethod(); 
            INotifyPropertyChanged("StockList");

        }



        void AddStocksMethod()
        {
            StockList.Insert(0, new StocksModel { Stock_Id = 0, Stock_Name = "Pencil" });
            StockList.Insert(1, new StocksModel { Stock_Id = 1, Stock_Name = "Computer" });
            StockList.Insert(2, new StocksModel { Stock_Id = 2, Stock_Name = "Computer" });

        }


        private List<StocksModel> _StockList;
        public List<StocksModel> StockList
        {
            get
            {
                if (_StockList==null)
                {
                    _StockList = new List<StocksModel>();
                }
                return _StockList;
            }
            set
            {
                _StockList = value;
                INotifyPropertyChanged();
            }
        }
    }



 <ContentPage.BindingContext>
        <local:HomeVM/>
    </ContentPage.BindingContext>



    <StackLayout>

        <Button Text="Feed the Picker with data" Command="{Binding ShowStocksBtnCommand}"/>


        <Picker  Grid.Row="0"    Grid.Column="3"   TitleColor="Black" Title="Stocks"   ItemsSource="{Binding StockList,Mode=TwoWay}" ItemDisplayBinding="{Binding Stock_Name,Mode=TwoWay}"      />



    </StackLayout>

Pair to Mac

$
0
0

Hello,

I have got problem regarding to Pairing with Mac.
I bought brand new MacBook Air, because I had to, IOS dev roles e.t.c (hate apple).
So I'm Sr. Software Developer with more than 19 years of experience in .NET but can not manage to pair visual studio with mac )))) [nonsense]
last 2 days I have learned almost whole internet, no results.
So what I realized, based on logs, it's mac cant handle ssh properly.
I have played with WinSCP, PuTTY, more or less it's works.
More or less, because transfering max 2.5 KB/s. (nonsense, hate apple).
Tried to upload Broker, Agent manulay e.t.c (saw in logs and tried to do some workarounds)
To be honest I'm tired, you are my last chance, If I will not able to fix hackintosh related issue, I would break the idea to implement app for IOS and will provide for Android and Windows only.

Please feel free and require any kind of info, logs as you wish.

SOME LOG:
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin|Information|0|Xamarin - 16.5.000.528-d16-5+2b54082
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.IOS.Messaging.LocalMessagingInitializer|Information|0|Connecting to Local Broker...
Xamarin.VisualStudio.IOS.XamarinIOSPackage|Warning|0|Initializing Xamarin.VisualStudio.IOS.XamarinIOSPackage.
Xamarin.VisualStudio.Android.Setup.AndroidSdkSetup|Information|0|androidsdksetup: processing ActiveProjectConfigurationChanged event
System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory|Error|0|An error occurred while connecting via TCP to the endpoint address 127.0.0.1 and port 59104, to establish an MQTT connection
System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 127.0.0.1:59104
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory.d__4.MoveNext()
System.Net.Mqtt.Sdk.MqttClientImpl|Error|0|System.Net.Mqtt.MqttException: An error occurred while connecting via TCP to the endpoint address 127.0.0.1 and port 59104, to establish an MQTT connection ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:59104
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory.d__4.MoveNext()
--- End of inner exception stack trace ---
at System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Mqtt.Sdk.PacketChannelFactory.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Mqtt.Sdk.MqttClientImpl.d__39.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Mqtt.Sdk.MqttClientImpl.d__29.MoveNext()
Xamarin.Messaging.Ssh.BrokerCommands|Information|0|Checking Broker 16.5.000.528 installation...
Xamarin.Messaging.Ssh.BrokerCommands|Information|0|Installing Broker 16.5.000.528...
Xamarin.Messaging.Ssh.BrokerCommands|Information|0|Starting Broker 16.5.000.528 in port 59104...
Xamarin.Messaging.Ssh.BrokerCommands|Information|0|Broker 16.5.000.528 started successfully
Xamarin.HotReload|Information|0|2020-04-06 01:15:22.3 Hot Reload IDE Extension Loaded
Xamarin.VisualStudio.IOS.Messaging.LocalMessagingInitializer|Information|0|Starting IDB Local Agent...
Xamarin.Messaging.Ssh.AgentCommands|Information|0|Checking Agent IDB.Local 16.5.000.528 installation...
Xamarin.Messaging.Ssh.MessagingService|Information|0|Installing Agent IDB.Local 16.5.000.528...
Xamarin.Messaging.Ssh.AgentCommands|Information|0|Installing Agent IDB.Local 16.5.000.528...
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting Agent IDB.Local 16.5.000.528...
Xamarin.Messaging.Ssh.AgentCommands|Information|0|Starting Agent IDB.Local 16.5.000.528 in port 59104...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from DisconnectedState to ConfiguringState on 192.168.100.81 (192.168.100.81)
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking host configuration for connecting to '192.168.100.81'...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking SSH configuration...
Xamarin.Messaging.Ssh.AgentCommands|Information|0|Agent IDB.Local 16.5.000.528 started successfully
Xamarin.Messaging.Ssh.MessagingService|Information|0|Agent IDB.Local 16.5.000.528 is running
Xamarin.Messaging.Ssh.MessagingService|Information|0|Agent IDBLocal 16.5.000.528 is running
Xamarin.VisualStudio.IOS.Messaging.LocalMessagingInitializer|Warning|0|The required Apple Support libraries have not been found. Please ensure to have a valid iTunes installation in order to communicate with Apple devices in Windows. Windows Store iTunes installations are not supported right now.
Xamarin.Messaging.Ssh.SshCommandRunner|Warning|0|Failed to execute 'grep "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCkOyYLplDkwpvTmM5NMq5EJsZmRSk1/+ZfV16HWkHmSmss4kN6R3FwoxSQwU8Z8ugZ+lli/FTsu/uGpShFeT0PzkZdEhlolZ6jE2AGqnc735TaBrOF9ZBAIW7KGdtV2tD8beFUaQxdHr0iMeAi769BAhRmG3jbRGrOjuM3dlguMPeZhk7XXzMdOzqoV+1FkDIH3WLZNqwDiQb35JTXvUPkNKASbEclem4LgKrfivs9lHhfcFTeqtc2F4VKC4j3Hb5AzQG/rMxYpcXp5MENzdd4/uVmxPUPfoiMJT9g1zBTri6uqLpSHQuQQZz69sn5cFq8L8RQAWL058O8AW4OfQoj qscrm@quickSales-MacBook-Air.local" "/Users/qscrm/.ssh/authorized_keys"': ExitStatus = 1
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Initializing environment...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking available disk space...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking Mono installation...
Xamarin.Messaging.Ssh.SshCommandRunner|Warning|0|Failed to execute 'which mono64': ExitStatus = 1
Xamarin.Messaging.Ssh.SshCommands|Information|0|A valid Mono installation has been found at '/Library/Frameworks/Mono.framework/Versions/Current/bin/mono64'
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking Xamarin iOS installation...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking host configuration for connecting to '192.168.100.81'...
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from ConfiguringState to ConfiguredState on 192.168.100.81 (192.168.100.81)
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Host '192.168.100.81' is configured correctly
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from ConfiguredState to ConnectingState on 192.168.100.81 (192.168.100.81)
Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Starting connection to '192.168.100.81'...
System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory|Error|0|An error occurred while connecting via TCP to the endpoint address 192.168.100.81 and port 54154, to establish an MQTT connection
System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.100.81:54154
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory.d__4.MoveNext()
System.Net.Mqtt.Sdk.MqttClientImpl|Error|0|System.Net.Mqtt.MqttException: An error occurred while connecting via TCP to the endpoint address 192.168.100.81 and port 54154, to establish an MQTT connection ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 192.168.100.81:54154
at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory.d__4.MoveNext()
--- End of inner exception stack trace ---
at System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory.d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Mqtt.Sdk.PacketChannelFactory.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Mqtt.Sdk.MqttClientImpl.d__39.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.Mqtt.Sdk.MqttClientImpl.d__29.MoveNext()
Xamarin.Messaging.Ssh.BrokerCommands|Information|0|Checking Broker 16.5.000.528 installation...
Xamarin.Messaging.Ssh.MessagingCommands{System.String}|Information|0|Server directory /Users/qscrm/Library/Caches/Xamarin/XMA/Broker/16.5.000.528 doesn't exist, hence the checksum can't be verified
Xamarin.Messaging.Ssh.BrokerCommands|Information|0|Installing Broker 16.5.000.528...
Xamarin.Messaging.Ssh.MessagingCommands{System.String}|Information|0|Server directory /Users/qscrm/Library/Caches/Xamarin/XMA/Broker/16.5.000.528 doesn't exist, hence the checksum can't be verified
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
Xamarin.Messaging.Ssh.MessagingFileManager|Information|0|Uploading Broker.zip (192/1824 KB) 10%...
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Sdk.ClientPacketListener|Warning|0|Client vs11972grigo - No packet has been sent in 30 seconds. Sending Ping to Server to maintain Keep

App not Installed

$
0
0

hi
output result txt apk

linking = sdk asammbli only

Authentication through WebView

$
0
0

How can the Xamarin app know who has authenticated via the web app inside the WebForm (Razor page/view)? Basically we want to wrap the whole website inside the Xamarin WebView. We are using .net Core Identity (not Identity Server) for authentication on the web app (with usernames/passwords).

The web-app has the login page and we want to make Xamarin-app (that wraps the web-app) be aware of who is logged in, so we can send notifications, etc.


error when i try to run an ios app paird to mac

$
0
0

Can not resolve reference: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Facades/System.Buffers.dll
?

Sending UDP commands I get System.ObjectDisposedException error

$
0
0

Hello:
I have two buttons for two differents devices, each one send a different UDP command (ip, port and message).

The problem is that the first time I run the app it works, only the first command, but when I want to send another command
I have this error: System.ObjectDisposedException: Cannot access a disposed object.
Can you help me please?
many thanks.

This is my code:

namespace XF_Udp2
{
[DesignTimeVisible(false)]
public partial class MainPage : ContentPage
{
UdpClient udpClient;
string myIP;
int myPort;
string myMessage;

    public MainPage()
    {
        InitializeComponent();
        //-------------------------------------------
        btnRelayOn.Clicked += Btn_Clicked;
        btnApagarPC.Clicked += Btn_Clicked;
    }
    private void Btn_Clicked(object sender, EventArgs e)
    {
        string buttonText = ((Button)sender).Text;        

        switch (buttonText)
        {
            case "Relay On":
                myIP = "192.168.1.222";
                myPort = 6723;
                myMessage= "11";
                break;
            case "shutdown PC":
                myIP = "192.168.1.40";
                myPort = 11111;
                myMessage= "ShutdownPC";
                break;
        }

        try {
            udpClient.Connect(IP, puerto);

            // Sends a message to the host to which you have connected.
            Byte[] sendBytes = Encoding.ASCII.GetBytes(mensaje);
            udpClient.Send(sendBytes, sendBytes.Length);
            udpClient.Close();
        }           
        catch (Exception ee)
        {  Console.WriteLine(ee.ToString());  }
    }

How Open PushAsync in PushModalAsync

$
0
0

hi

Shell type project

call await Navigation.PushAsync(new DeteilProduct());

error System.InvalidOperationException: 'PushAsync is not supported globally on Android, please use a NavigationPage.'

Picker Value not saving

$
0
0

HI i have a picker and the value is not saving.

SkiaSharp - Need to use an older version of Visual Studio?

$
0
0

A few years ago, I used Visual Studio to create a cross platform application. I am trying to recreate it\update it in VS 2019. I admit to not being a full time developer (more of Installshield developer \ Release Engineer), and so this is a refresh for me. Anyway, the solution uses Skiasharp. I have updated VS 2019 to the latest version (16.5.4), which uses .Net Framework 4.8.03752. I am also using the latest version of Windows 10.

I started with a new blank solution and added Skisharp, and got the attached warning... .

The SkiSharp nuget package has a dependency of NetFramework v4.5. So, is this saying that I cannot use SkiSharp in VS 2019? I am also not sure that this is the correct forum to ask this

I had first place this question in the Visual Studio forum by mistake.

Xamarin.Forms WebView on iOS does not execute window.open() function

$
0
0

Hi,

I have a xamarin.forms app which uses a webview to display the home screen(user details screen) when the user is successfully logged in to his/her account. This web page(user details screen) has a javascript function window.open() for a click event on a link, and when the link is clicked nothing happens. How can I enable javascript on the webview for iOS? This is working fine on android.

Thanks

Navigation Title not centering on Android

$
0
0

I’ve set the navigation title in my Xamarin forms application as below:

    <NavigationPage.TitleView>
        <Grid>
            <Label Text="Settings" Style="{StaticResource NavTitle}"/>
            <Button Text="&#xf060;" Style="{StaticResource LeftNavButton}" Clicked="BackButtonClicked"/>
        </Grid>
    </NavigationPage.TitleView>

The Label has been centered, on iOS the positioning is fine but on Android it is shifted over to the right. I've set the navigation back button to be hidden with NavigationPage.SetHasBackButton(this, false) but it seems to still be pushing it over, does anybody have any insight to why it's shifted over on Android and not iOS?

Images attached, Thanks in advance!

Below is the styles for reference:

         <Style x:Key="LeftNavButton" TargetType="Button">
            <Setter Property="BackgroundColor" Value="Transparent"/>
            <Setter Property="TextColor" Value="White"/>
            <Setter Property="HeightRequest" Value="20"/>
            <Setter Property="FontSize" Value="20"/>
            <Setter Property="FontFamily" Value="{StaticResource FontAwesomeSolid}"/>
            <Setter Property="Padding" Value="0"/>
            <Setter Property="HorizontalOptions" Value="Start"/>
            <Setter Property="WidthRequest" Value="30"/>
            <Setter Property="Margin" Value="{StaticResource LeftButtonMargin}"/>
        </Style>

        <Style x:Key="NavTitle" TargetType="Label">
            <Setter Property="FontAttributes" Value="Bold"/>
            <Setter Property="TextColor" Value="White"/>
            <Setter Property="HeightRequest" Value="20"/>
            <Setter Property="FontSize" Value="17"/>
            <Setter Property="VerticalTextAlignment" Value="Center"/>
            <Setter Property="HorizontalTextAlignment" Value="Center"/>
            <Setter Property="HorizontalOptions" Value="CenterAndExpand"/>
            <Setter Property="VerticalOptions" Value="CenterAndExpand"/>
        </Style>

Xamarin.forms Pinch gesture to zoom inside a carousel - conflict swipe/pan

$
0
0

Hi,
After weeks of try and fix, i was able to have a working pinch gesture on an image inside a carousel page. Now the last problem i have is that the carousel catches the pan gestures on the zoomed image as a pinch navigation gesture and slides to the next image. My approach is to ignore gestures on the carousel as long as the image inside is zoomed. Pushing the user to zoom out to the normal scale and than swipe to the next page.
How can i achieve this knowing that the InputTransparent disables gestures for both the carousel and its children ?

PS: This behaviour happens only on Android. On IOS it's working as wanted.

How to set font family to whole application?

$
0
0

Hi guys,

I have added a custom font in my app and want to set it as the default font to the whole app.
Any suggestions on how to do this? I tried a lot, for example making a style in ResourceDictionary and target the Label control, but no result.
It works when I set it to individual controls on a page, but i want to implement it to the whole application. Please help!

Regards,
Khos

Pass Array as parameter in constructor in xaml

$
0
0

Hi.
I'm trying to pass an Array as an argument to a constructor in xaml, like this:

I'm filling the PartNumberDataList and PartNumberDataListID - arrays with values in the xaml.cs-file.

The constructor i'm calling is in another xaml-file:

public ListViewSearching(String sqlFunction="", string EntrySearchPlaceholder="", ObservableCollection<KeyValuePair<string, string>>[] SearchList = null,
            ObservableCollection<KeyValuePair<string, string>>[] SearchIDlist = null)
        {
            InitializeComponent();
            SqlFunction = sqlFunction;
            SearchDataList = (ObservableCollection<KeyValuePair<string, string>>) SearchList[0];
            SearchDataIDlist = (ObservableCollection<KeyValuePair<string, string>>)SearchIDlist[0];  
            EntrySearch.Placeholder = EntrySearchPlaceholder;
            FillSearchList();
        }

This will not run.
If I remove the arrays (from both xaml-file and constructor), it works fine. So the problem lies in the arrays.
Does anybody know, how to fix it?

Friendly Regards
nbs

Display popup only once in the app

$
0
0

Hi! How to display a tip or a guide popup only once in the app?

Increase AppBarButton height in UWP

$
0
0

I am trying to modify the style of the AppBarButton, but I have got no luck in trying to override the base style in App.xaml. I believe, I need to set this style at runtime to take effect, but I don't know how to do that. Is there any other way, like using a custom renderer?
Something like this:

public class WindowsContentPageRenderer : PageRenderer
   {
       protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.Page> e)
       {
           base.OnElementChanged(e);
           if (e.OldElement != null && Element == null)
               return;
           Loaded += OnLoaded;
       }

       private void OnLoaded(object sender, RoutedEventArgs args)
       {
           var myPanel = ContainerElement as AppBarButton;
           if (myPanel != null)
           {
               myPanel.Height = 48;
               myPanel.MaxHeight = 48;
           }
       }
   }

But, the ContainerElement as AppBarButton always returns a null.

Please help, thank you :smile:

Viewing all 81910 articles
Browse latest View live


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