Xamarin Calabash Error - superclass mismatch for class AuthenticationPage

I am new to Ruby/Calabash and managed to set a dedicated calabash automation framework for ios with a page object model pattern and its running successfully. I want to extend the same framework for android too. I created a dedicated folder for ios and android inside features folder and thought of having their respective page objects inside those folder. But when I ran calabash-android, calabash finds a similar page class exists in ios folder and started throwing the error message. I want to

Xamarin Forms - Access controls in Target application (iOS/Android)

I am using Xamarin.Forms, shared project template. Here, I add controls to the content page such as a Label through say framework provided StackLayout. Now in target apps - say for iOS/Andriod, I just need to set some text for this label. I have some platform specific code where I want to change the text value for the Label created in Shared Project. How to do that? I understand, Custom Renderers could be used. Is there any straight forward way that I am missing here?

TeamViewer SDK - Xamarin

recently I have tried importing TeamViewer SDK for Android to Xamarin.Android. I resolved binding and started my app and when I wanted to create a session according to their example it showed the TeamViewer icon and text "waiting for your partner to join session" or something like that, but after a split of a second it crashed with Fatal signal 6 (SIGABRT), code -6 in tid 23959 (pool-1-thread-1) Everything runs fine on Android. Only Xamarin.Android has problems. Does anybody have an idea

looking for xamarin http communication code

i want to connect to a http server having address = . So can one please help me and provide some code in xamarin studio . so that i can connect to server and do some request to server. I am connected with server using wifi and this is my wifi code. public bool isConnected() { bool ret = false; var connectivityManager = (ConnectivityManager)GetSystemService(ConnectivityService); var wifiStatelocal = connectivityManager.GetNetworkInfo(ConnectivityType

iOS 9.0, Xamarin Studio, "waiting for debugger to connect..."

I have been using Xamarin.iOS platform with iPad with iOS 8.3 simulator successfully until I have updated Xcode 7 with iOS 9.0. When I select the simulator and run it, it keeps showing waiting for debugger to connect... nothing comes out at the end. Any solution? By the way, why I cannot able to see ios 8 simulator options in the Xamarin after I updated the Xcode?

How do I navigate from an Android Activity to a Xamarin Forms ContentPage?

I'm developing an application that uses an online payment. I open the link, for the payment, in a browser using: Device.OpenUri(Uri);. When the user has finished paying for his order he gets redirected to an Android Activity using a custom URL scheme: [Activity(Label = "Urlentryclass", ScreenOrientation = ScreenOrientation.Portrait, Icon = "@drawable/icon", MainLauncher = false, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] [IntentFilter(new[] {A

Not Able to register my Xamarin account in VS2015

I am getting below error when I am logging in Xamarin account in mY VS2015 System.FormatException: One of the identified items was in an invalid format. at Xamarin.Components.Ide.Activation.ActivationService.GetErrorWorkflow(LicenseSyncResult[] results, Boolean ignoreSyncErrors) at Xamarin.Components.Ide.Activation.ActivationService.<GenerateFullWorkflowSequence>d__100.MoveNext() at Xamarin.Components.Ide.Activation.ActivationDialog.DisplayWorkflowStep(ActivationWorkflowStep step) at Xama

VS 2015 Xamarin can't see VS Android Emulator

I had both the VS2015 community edition VS Android Emulator on my PC. After uninstalling both the old VS2015 community edition and VS Android Emulator and then installed the latest VS2015 community with Xamarin, then generated a Xamarin form for Android. But there was no VS Android Emulator to be selected within VS. I can manually run VS Android Emulator so I know it runs fine. Strangely after a new install, all the old settings of both VS2015 and VS Android Emulator are still intact. Any re

Xamarin.Forms authentication, save logged in status after login, remember me

I'm looking for a good way for my application to know if the person needs to login (again) or not. So meaning, if a person first uses the app, he needs to login. These login credentials are being verified by a webservice I've build. And after he is succesfully signed in, the next time he uses the application he doens't need to login again. I've been looking around, but haven't found a clear solution. I have read a few possibilities to handles this: Storing this in a local database Using th

Android Placeholder\Hint text in Xamarin Forms

I'm using Xamarin forms to build a cross platform app and I have an issue with placeholder text for Entry elements when they render in Android. The placeholder displays as expected in iOS but it's blank in Android. Having searched in Google I understand the issue: basically the Android text editor field doesn't have a Placeholder property and you have to set it's Hint instead. What I don't understand is how to do this programmatically. I know how to extend the Editor class, but how do I then t

Navigation on ViewModel in MVVM Light in Xamarin.Forms

I have a Xamarin.froms app in MVVM Light, i want to open another page on button click, but i only want to use this method of Page class page.Navigation.PushModalAsync(new MyPage()) How to send "Page" class as reference on ViewModel class.

xamarin installtion : android new application error

I have just installed xamarin in VS2012 and when I try to create a new android project, using the xamarin template, I get the following error: "Object reference not set to an instance of an object" and a "project creation failed" indication on the bottom line of the VS IDE

Xamarin how to display message dailogue in PCL project class file

I want to try display message dialogue in .cs file that is in pcl project.I want to call its method from my view.xaml.cs for displaying alert. i tried to use var dialog = new MessageDialog(e.Message, e.GetType().ToString()); dialog.Commands.Add(new UICommand("Ok", null)); await dialog.ShowDialogSafely(); but that require windows.UI.Popups namespace that is not available in class file of pcl project.I think its because it shared by all platform and that namespace is for w

Xamarin There were Deployment Errors,Continue? in Xamain.Android

I am working on Xamarin.Android app from last one month. I am facing the below error on each time I deploy to a mobile device. Where as no error shown in Error List in Visual Studio 2015. Output windows details is: Starting deploy OnePlus A0001 ... Deploying OnePlus A0001 ... Build started. enter code here The "InstallPackageAssemblies" task failed unexpectedly. Build FAILED. Deploy: 0 succeeded, 1 failed, 0 skipped

How can I specify a custom linker configuration for Xamarin.iOS when building from Visual Studio 2015?

I am building my Xamarin.iOS app from Visual Studio against my Mac build host and use PostSharp to perform AOP against the output, before the binaries are sent to my Mac build host for AOT/native compilation. PostSharp injects some hidden implementation types into the target assembly which are not referenced by my application so the AOT compiler strips them from the resulting binary, because I am using the "Link All" option. Changing the "Link All" option to "Link SDK" or "None" fixes the issu

Why are controls called Views in Xamarin?

I am curious as to the naming convention. Why would a button be called a view? Is this because the individual platforms call their controls like Buttons views? It is confusing. edit: Here is an example, https://developer.xamarin.com/guides/xamarin-forms/controls/views/

Xamarin BufferedSoundStream can't play wav files

I'm making an app for my drum classes and to make it cross-platform I've chosen Urho.Sharp, because it has low level Sound API as well as rich graphics capabilities. As a first step I'm making a metronome app and for that I'm working with BufferedSoundStream adding here audio and then needed silence, as described here: https://github.com/xamarin/urho-samples/blob/master/FeatureSamples/Core/29_SoundSynthesis/SoundSynthesis.cs But the resulting sound is not a sound at all, like random bits got i

Xamarin Forms - IOS , Scripts and styles are not calling

I am working on Xamarin forms IOS application calling HTML pages, styles and scripts by using Hybrid WebView. I am not able to render styles and scripts and my code is HybridWebViewRenderer.cs protected override void OnElementChanged (ElementChangedEventArgs<HybridWebView> e) { base.OnElementChanged (e); if (Control == null) { userController = new WKUserContentController (); var script = new WKUserScript (new NSString (JavaScriptFunction)

Binding Sinch Android SDK to use in Xamarin Android

I am trying to bind the Android SDK Provided by Sinch for WEBRTC functionality. the sdk is in .aar and I have tried to bind it but i keep getting a bunch of errors. Please can someone with a good knowledge of Bindings in Xamarin put me through what I need to fix the errors. Many Thanks Attached error logs: ------ Build started: Project: SinchBindings, Configuration: Debug Any CPU ------ 1>C:\Users\admin\documents\visual studio 2017\Projects\SinchBindings\SinchBindings\obj\Debug\generated\src

Xamarin debugging issues

I can't debug a xamarin app with my phone. Below are the errors I get whenever i tried debugging with android phone. Assistance please! Deployment failed because of an internal error: Unexpected install output: pkg: /data/local/tmp/Mono.Android.Platform.ApiLevel_15.apk Failure [ Have not classes.dex in package ! ] Deployment failed

Xamarin Forms Bind-able Picker - How to get selected item in ViewModel

I am using Xamarin forms : Prism Library : 6.3.0 The following is the code having Bind-able Picker ass in latest Xamarin Forms: VIEW Registered the (prism) behaviors in my view as under xmlns:b="clr-namespace:Prism.Behaviors;assembly=Prism.Forms" Picker also showing the data of CountryCodes which is a list of type PickerItem <Picker ItemsSource="{Binding CountryCodes}" Title="Select Country" ItemDisplayBinding="{Binding Name}"> <Picker.Behaviors&g

How to show placeholder for image in xamarin.forms

I am having a list with an Image and some labels in each view cell. I am using the binding property to populate data inside listview, So getting image URL from my model class and loading images from it. But sometimes the URL is not found and failed to load image. In that time I need to show a placeholder on that failed image instead of blank space. <controls:CircleImage Source="{Binding imageUrl}" x:Name="patImage" WidthRequest="60" HeightRequest="60" Aspect="AspectFill" VerticalOptions="Cen

Xamarin Forms - calling rest service from viewmodel of pcl

I created a class that connected to the API to retrieve the required data using httpclient. That file was called in the code behind file of the view and worked perfectly. Than I decided to implement the MVVM approach. As a result, I moved the code that initialized the rest service class to the view-model. After doing that, i stopped getting the data. To investigate, I stated the the debugging session with the breakpoint placed at the line where i initialize the rest service class. Than i execut

Xamarin warning BG8102 has unknown base type when adding Citizen printer jar

I'm using Xamarin forms to build an app that prints some content with a citizen printer. In order to do so I downloaded the printer jar and created a Bindings Library to use the jar in my project. But I get this warning BINDINGSGENERATOR : warning BG8102: Class Com.Citizen.Sdk.ESCPOSPrinter has unknown base type com.citizen.csjposlib.c.c. And I'm not hable to access the classes I need. How can I solve this?

Capturing a hand-drawn signature with Xamarin Forms (PCL)

I am trying to figure out how I can ask the user for a signature area so they can sign with their finger then save that signature to a file and I am reaching a dead end. I have looked at Kimserey's blog, the CrossGraphics library and SkiaSharp but these all seem to be geared around making the image through code vs a user drawing with their finger. The solution needs to be used in a pcl project and will be deployed to Android, iOS, and UWP. Does anyone have an idea?

Xamarin cannot connect to Mac from Visual Studio 2017

When I try to use iPhone simulator, I get an error that VS2017 cannot connect to MAC. Configuration and software: Visual Studio 2017 15.2 (26430.14) Mac OS Sierra 10.12 Latest XCode installed on Mac and the licence is accepted On Mac, remote login is enabled Firewall is disabled on Mac In VS when I try to connect to Mac, I can see the MacBook but I just can't connect using username and password I use for login to Mac I am however able to connect using ssh:

Xamarin What would be a good way to replace a static class used to hold Application settings?

I have an application that uses a static class to store settings: namespace ABC { public static class MS { public static bool abc; public static bool def; ... } } When the app starts up it goes to the database and updates some of these settings. I have been told that holding them in a static class is not ideal for when I am doing bindings and adding notification so I'm thinking I should new a class and the hold them in an instance. If that's the case c

Xamarin How do I resolve an "Unable to generate SSH keys for user" error when connecting to my Mac

I have a pretty vanilla setup with Windows 10 / Visual Studio 2017 Community and a Mac running Sierra with Visual Studio for Mac (2017?) When I try to get Visual Studio to connect to the Mac through Tools->Options->Xamarin->iOS Settings->Find Xamarin Mac Agent, I get the following error message instead of a connection to the Mac. "Unable to generate SSH keys for user" How can I resolve this error.

Xamarin Android webview is unable to clear cache

Hi I am trying to clear the current WebView session. It seems it is not working. I am calling OnElementCacheClear method in my CustomWebviewRenderer. I can see my WebView is not null. This method is getting called... When I opens the WebView it still has the previous login session. public class WebViewCustomRenderer : WebViewRenderer { CustomXamrinWebView formsWebView; WebAndroid webview = new WebAndroid(Forms.Context); protected override void OnElementChanged (E

Why CrossCurrentActivity.Current.Activity always gives MainActivity for any other Page in Xamarin.Forms?

I have installed the CurrentActivityPlugin in my Xamarin.Form's Android project to gain access of the top current activity. I have DashboardPage.xaml & from this, I am navigating to another page MyProfilePage.xaml. At this level, If I try to get the current activity using CrossCurrentActivity.Current.Activity, it still gives me MainActivity only. Is there any way to know which Activity is associated with MyProfilePage.xaml? Even, on Android's PageRenderer, it gives me MainActivity as Conte

Xamarin Live Player crashes when loading a bitmap, but it runs fine via USB connection

I've been following the examples for using SkiaSharp with Xamarin Forms, particularly the section on using bitmaps. I'm doing this in Microsoft Visual Studio 2017 version 15.9.11. I'm only targeting Android currently. This page https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/graphics/skiasharp/basics/bitmaps has a section on Loading a Bitmap Resource, where the bitmap is an embedded image resource in the project. So, we add the image and make it type 'embedded resource'

Xamarin Essentials Geolocation and Geocoding

i am trying to get geolocation in xamarin, current location. i am following this link https://docs.microsoft.com/en-us/xamarin/essentials/geocoding?context=xamarin%2Fandroid&tabs=android . i have followed everythinMg that is shown in there but i am getting an error at var placemarks = await Geocoding.GetPlacemarksAsync(MyLocation.Latitude, yLocation.Longitude); i am getting latitude and longitude. when i am trying to change it to address it is showing error. i have given permission of locati

How to use ReactiveUI's RoutedViewHost with Xamarin Forms Shell?

I am using ReactiveUI and want to use Shell (Xamarin Forms 4) because it gives other options including flyout menu etc. because of how routing works with Xamarin Forms, it is either going to be Shell or RoutedViewHost. I even attempted to replace my RoutedViewHost to use Shell, but Shell has few problems of its own including the inability to clear navigation stack. I couldn't find any example or working example where ReactiveUI works with Xamarin Forms's Shell, is there a way that I can leve

How to Catch "Cant play this video" Error in Xamarin Android using setOnErrorListener

I want to catch error "Can't Play this video" by making setOnErrorListener: return true . As the documentation says If no listener is specified, or if the listener returned false, Video View will inform the user of any errors., so I'm assuming if you set one and return true it will not show the user error. I have seen some code in Java Android , But I am not that great with java. I would appreciate if Some one can help me with Links in Xamarin or could explain me How to use it with working exam

Xamarin OnTabChanged not called when click on current tab

I implemented a tabbed application with Xamarin.Android using TabHost and MvxTabsFragmentActivity. I want to refresh the current tab when clicking on it the second time. Is there any method like OnTabReselected from Android? That's how I am creating the tabs, using TabHost: <TabHost android:id="@android:id/tabhost" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white"> <LinearLayout

encode array\list of images to video MP4 in xamarin

I'm building an app that encodes a stream of images or an array of images into MP4 video in Xamarin forms. I couldn't find anything that works with xamarin forms and I've already tried these: 1. FFmpeg - (not working in xamarin native, require .netCore (I'm getting errors when installing any related NuGet package) 2. libvlc - I don't think it has any converting or encoding capabilities. 3. searched in google, here and xamarin forum for a solution. 4. skiasharp - apparently use only for drawin

create xamarin process never end

I have a plan and want to periodically check a URL every 5 minutes(NOTIFY CENTER SERVER(Listener)). My problem: Once the program closes, the process closes Is it possible that the project will not be shut down if the original program is closed ? My Code After Changed Worked with : Matcha.BackgroundService using System; using Android.App; using Android.Content.PM; using Android.Runtime; using Android.Views; using Android.Widget; using Android.OS; using Matcha.BackgroundService.Droid; using Ma

Xamarin Is there any way I can test the performance of XF and the ability of the phone to create new elements?

I am trying to understand how my XF application performs with different models of phones. Specifically the time it take to draw new pages or change the structure of existing pages. Does anyone know of any simple way to test the ability of the phone to draw out for example something like a text label 500 times so that I could then use C# stopwatch to measure the time it took to do that event?

Xamarin Deploy UWP package for enterprise without submitting to the store

I would like to deploy a UWP package for enterprise. I have a Windows developer account but I don't want to publish it in Windows store or Enterprise store. We have our URL to share the file, so the problem is when I try to install the Package in other PC the error 'Either you need a new certificate installed for this app package, or you need a new app package with trusted certificates' will occur. Suggest the way to install it without publishing in store.

Is there any way to call Window.OverrideUserInterfaceStyle in an iOS project of Xamarin forms before the storyboard screen is shown?

In my AppDelegate I have a way to change the UIUserInterfaceStyle: [Register("AppDelegate")] public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate { public override bool FinishedLaunching(UIApplication app, NSDictionary options) { global::Xamarin.Forms.Forms.Init(); MessagingCenter.Subscribe<Page, bool>(this, "ModeChanged", callback: OnModeChanged); LoadApplication(new App()); return base.FinishedLaunchi

Xamarin Binding text label on a home page to a timer

We have a really simple app, the idea is the timer will update a label on the home screen depending on different configuration within the mobile app. I have created the binding and can update the homepage from it's self but not from the timer. I think what is missing is a OnChange within the home page to detect if the string has changed. Display layout code, bind the label to the name "LabelText" <Label Text = "{Binding LabelText, Mode=TwoWay}" x:Name="MainPageStatusText" Ho

Xamarin Sending web requests to IoT device both on Wifi and on mobile data

I have a Xamarin application that requires to connect to a device from the LAN side and also the WAN side. The device (an ESP8266) is connected via WiFi to an internal network and can be accessed from the WAN side via DDNS. When the user makes a request (via the Xamarin app), whilst using mobile data (i.e. they are not connected to the WiFi network), the request reaches the IoT device (the IoT device makes a UPNP mapping on the router). The IoT device uses mDNS to make itself known on the local

Show errors in Xamarin iOS WebView

The Xamarin Forms WebView control shows a white surface if connection fails. On iOS, I want to show any error information I can get. I am using this code to override WkWebViewRenderer: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/hybridwebview [assembly: ExportRenderer(typeof(HybridWebView), typeof(HybridWebViewRenderer))] namespace CustomRenderer.iOS { public class HybridWebViewRenderer : WkWebViewRenderer, IWKScriptMessageHandler { pub

Error XAGJS7009: System.InvalidOperationException: There can be only one type with an [Application] attribute android Xamarin

After implementing Huawei push service in my android project, I was getting crash on the occurrence of Push Notification, and error was looged java.lang.UnsatisfiedLinkError: No implementation found for void crc6415d7e49b4cd3bc6f.MyApplication.n_onCreate() To resolve this error, I crated MyApplication to extend the Application. [Application] public class MyApplication : Application { public MyApplication(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, tra

Design recommendations for Xamarin Forms Login scenario

I am looking for some best practice advice. I have a mobile application that has 4 functional elements. Out of the 4 only 1 requires the user to be authenticated. For the authentication I have built a login page. So first I am checking if an application level property is setup. If that is true then the app does not need authentication. If that is not set I am loading a login form hosted on a content page. The login page/ form has a backing ViewModel. The PROBLEM I am trying to solve is that afte

  1    2   3   4   5   6  ... 下一页 最后一页 共 37 页