xamarin.android

Xamarin.Forms ZXing.Net.Mobile loosing current page after scan result on iOS 10

别等时光非礼了梦想. 提交于 2019-12-12 06:25:38
问题 I'm using Xamarin.Forms and I have implemented ZXing.Net.Mobile for scanning bar codes. On Android it's working fine, on iOS 10 after reading a barcode the function "OnScanResult" is fired and executes the command Navigation.PopAsync() which closes the scanning page but after a second it closes also the current page where I have displayed the result ! MyTapScan.Tapped += async (sender, e) => { await MyBtScan.ScaleTo(1.20, 100, Easing.Linear); await MyBtScan.ScaleTo(1, 100, Easing.Linear);

Android Application get crashed when application is not running or not in system tray and received a GCM notification

梦想与她 提交于 2019-12-12 05:58:40
问题 I am new on Xamarin and android. I am facing issue with my Xamarin Android app. The application is get crashed. when it closed and received a GCM notification from the server. I have applied many configurational changes and update the Manifest. <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="23" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name=

Deserializing ParseObjects from the Parse.NET Platform with Json.NET

蹲街弑〆低调 提交于 2019-12-12 05:49:22
问题 I'm trying to deserialize a ParseObject (as described in the parse platform developer's guide). I'm getting an error that JSON cannot deserialize that object. So I have created this: public class Phase { public string Details { get; set; } public string ObjectId { get; set; } public int PhaseId { get; set; } public bool Completed { get; set; } public string PhaseListName { get; set; } public int Position { get; set; } public int ButtonId { get; set; } } private List<ParseObject>

How can I use Linq to XML to extract content from webpage in C# or in Xamarin.Android

可紊 提交于 2019-12-12 05:39:08
问题 I have attached an image and would like to get content from expanded <div> .... </div> using Linq to XML in C#. I tried this way but could not sort it out. XDocument.Parse(content); // this is Linq to XML XElement root = XElement.Load(url); IEnumerable<XElement> tests = from el in root.Elements("Div") where (string)el.Element("Confused") == "Confused" select e foreach (XElement el in tests) Console.WriteLine((string)el.Attribute("Confused")); If there is any simple way to extract content from

Android View Instantiation Order

让人想犯罪 __ 提交于 2019-12-12 05:38:57
问题 EDIT: I was missing a key concept, the message queue, while creating my custom view and trying to update the view without using it turned out being the source of the issue I was having. This gets cleared up here: Android: Writing Custom Views that Support The Message Queue It turns out that you need to let the runtime/android call OnMeasure after OnCreate exits ("like normal"), and in the mean time put any updates to the view in the message queue via the .post method. So, you can grab a

Xamarin/Android - Make a modal window that waits like MessageBox.Show from C# .NET

断了今生、忘了曾经 提交于 2019-12-12 05:37:19
问题 I've been working on porting an application to Android from .NET WinForms for a client, and I have run into a snag with a requirement for Dialogs that wait for user interaction before continuing. I'll say this now, up front. While I'm relatively new to Android, I am aware that this is frowned upon in Android because of impacts on the UI thread. I understand this, however, I've been told in no uncertain terms they want it the same way it works on .NET and I fail to see how async methods and

Reading an asset in a Xamarin NUnit test class

余生颓废 提交于 2019-12-12 05:30:09
问题 I want to read a mock RSS feed file to test against in a Xamarin NUnit test for an Android app. The test class has no context so I can't put the file in the Assets folder and do this: System.IO.Stream strIn = instanceOfAssetManager.Open(feedFile); It also has no ancestor, so I can't do this: System.IO.Stream strIn = this.Class.ClassLoader.ResourceAsStream(feedFile); Any suggestions how I can get to the jolly thing? This case solved a similar problem for a different platform/setup: Storing

Unable to get the location updates in monodroid

天涯浪子 提交于 2019-12-12 05:29:59
问题 I am trying to get the location in my Android app as follows LocationManager lmanager = (LocationManager)context.GetSystemService(Context.LocationService); if (lmanager.IsProviderEnabled(LocationManager.NetworkProvider)) { Location currentLoc = lmanager.GetLastKnownLocation(LocationManager.NetworkProvider); } I tried with LocationManager.gpsProvider also instead of the Network provider. In all the cases I am getting a null reference exception for currentLoc . 回答1: The GetLastKnownLocation()

Failed to read SQLite-net.dll during debugging symbols

为君一笑 提交于 2019-12-12 05:29:35
问题 When I try build application using xamarin forms in visual studio and deploy on android emulator this warning appears. Failed to read 'G:\ApkiC-Sharp\GNote\GNote\GNote.Android\obj\Debug\android\assets\SQLite-net.dll' with debugging symbols. Retrying to load it without it. Error details are logged below. GNote.Android Details Bellow: Severity Code Description Project File Line Suppression State Warning Mono.CompilerServices.SymbolWriter.MonoSymbolFileException: Symbol file G:\ApkiC-Sharp\GNote

Google Maps Version 2 - Updating information windows

不问归期 提交于 2019-12-12 04:57:10
问题 As we know in google maps android version 2, a custom information windows, is a view that converts to an image. Actually google aftre you return you view converts the view to a image an then show it to the info windows. But I want to show images downloading from internet to my infowindow. Actually, I want that before that download complete show an progress bar to my infowindows and after it compeleted update info windows, by this mechanism how I can do this? 回答1: Have a model object that