I see swiggles on the code with "Name ... does not exist in present context" error. But the app runs...Why?
Code runs even though swiggles present after VS15.5 update, Why?
Xamarin always installs "Mono Shared Runtime" even in release mode
Hi,
I understand that if I package an app as an APK it does special "linking" to only pull in parts from Mono runtime that app needs and includes them in the app.
Debug builds use the Mono Shared Runtime to speed things up.
However, I notice in either Xamarin Studio or Visual Studio, when you uncheck "Use Mono Shared Runtime" it still installs the shared runtime anyway. Why is this?
In Visual Studio for example I switch to release configuration. "Use Mono Shared Runtime" is NOT checked. I then do "Start without debugging" and it then installs the Shared Mono Runtime on the device.
Is there any way to actually have it never install the shared runtime? It doesn't seem like it's necessary for my release configuration, the app seems to work even if I uninstall the shared runtime.
After Upgrading to Xamarin 4.8 iOS projects show unavailable
I upgraded my Visual Studio 2015 to Xamarin 4.8. Now all of my Xamarin iOS projects show unavailable. I tried a repair with no change.
When I right click and select reload, it tells me that I need to install Xamarin to build native iOS apps. That however is installed.
I can create a new project and the iOS project works. This appears to only be a problem with projects created prior to version 4.8.
Anyone have a suggestion?
Note: (I am also being prompted to install 4.8 update, even after it was installed. When I click on the link to install the update, the installer is launched and wants to change or repair. I see that this issue has been reported on the bug tracker. bug id =60994)
Dan
Has anyone connected Note 8 to VS and run apps?
I have enabled Developer mode on my Note 8 but still it was not recognized by VS on Wind10
Now I tried LivePlayer after updating to VS15.5. Scanned the QR Code with my Note8. Then the Note8 name appears in device list. If I select it, even if the phone is connected through wire, the LivePlayer version starts.
Of course it is a different story that Live Player is not working with Note 8...That is a different story...
Now though I have very advanced Android device, I can't load my apps to it. What to do? Or what to Undo?
How to get JSON response from a asmx web service
I connected asmx web service to my project.
I want to get json data from the web service.
How can do that?
Extend MKPolyline to draw on map with different colors
For a project I am working on I need to draw multiple MKPolylines
on a map. The color to draw with will be provided by the backend. Therefor I thought that subclassing MKPolyline
and extend it with a UIColor
property would be the way to go. Unfortunately I can not get it to work. My custom polyline class won't be recognized by GetViewForOverlay.
public class MyPolyline : MKPolyline
{
internal CLLocationCoordinate2D[] Coordinates { get; set; };
public override CLLocationCoordinate2D Coordinate
{
get
{
return Coordinates[0];
}
}
public override int PointCount
{
get
{
return Coordinates.Length;
}
}
public static MyPolyline FromCoordinates(CLLocationCoordinate2D[] coordinates)
{
return new MyPolyline(){ Coordinates = coordinates };
}
}
// I know it is deprecated. But this is the last update for iOS6 users.
public override MKOverlayView GetViewForOverlay(MKMapView mapView, NSObject overlay)
{
if (overlay is MyPolyline)
{
var myPolyline = overlay as MyPolyline;
var polylineView = new MKPolylineView(myPolyline);
polylineView.StrokeColor = myPolyline.Color;
polylineView.LineWidth = 2;
return polylineView;
}
return null;
}
I think that I am doing something wrong inside my FromCoordingates
method. Looking at this code
I can not say what. If anyone has an idea of how to solve this, it would be great.
How to dispose and recreate a view on the same page?
I have page, I have timer for that i am using Syncfusion sfCircularGauge control. I am doing some action while timer running, once timer complets, i change the view by setting IsVisible=false and other view IsVisible=true, then I reverse the views by showing timer again. my question here is
setting IsVisible=false means is it still in the memory?
If yes, how can I dispose it and recreate the view?
Using C# would make it possible I guess but since I am using MVVM and Xaml. is there a possibility because I am not navigate from the page while all these happening. I am just using Xamarin.Forms.Device.StartTimer in my viewmodel and raising propertychanged on views when timer completes.
Http client with ssl
Hello,
Actually i try to do request with server and ssl certificate with TLS 1.2. It's works when i not use ssl certificate, but when i use https, i haven't answer, but my test works on Postman.
I have follow this link, do u have an idea why it's not works with https ?
Thanks in advance
Cannot find adb.exe in specified SDK path Visual Studio 2017
This is driving me nuts. Please help. I've installed VS 2017 (v15.3.5) on Windows 7 (x64) machine and with it I've installed Xamarin. However; when I try to map Android SDK and NDK path on Xamarin Android settings (VS -> Tools -> Option -> Xamarin settings), I get "Cannot find adb.exe in specified SDK path: C:\Program Files (x84)\Andorid\android-sdk\platfrom-tools\adb.exe" error. I get that message when I select "C:\Program Files (x84)\Andorid\android-sdk" path from the file explorer dialog box that pops up when you click on the ellipse button on the form. However; using Windows explorer, I can see the exe file is there.
What I did so far
1 - I've installed Android SDK in C:\Program Files (x84)\Andorid\android-sdk folder
2 - Using SDK Manager, I've installed Android SKD Tools, Platform-tools and Build tools
3 - Using SDK Manager, I've installed couple of Android SDKs Platforms (API 25, 23, 22 and 21)
4 - I've updated registry entry in "HKEY_LOCAL_MACHINE_/SOFTWARE/Wow6432Node/Android SDK Tools/path" to point to the the above path (#1).
5 - I've added C:\Program Files (x84)\Andorid\android-sdk\Platform-tools" to PATH variable of system environment.
6 - I ran VS 2017 as administrator before I attempted to do the mapping.
Nothing is working so far. What am I doing wrong? Or what did I miss?
Getting a null uiimage when trying to generate a thumbnail
I've got a UIViewController where I am allowing a user to select a video that is on their device. I would like to generate a thumbnail from the video to present that to the user to verify that the file has been selected. Unfortunately, I am getting a null image. The code is below. The video is a mov file that is selected from on the device. When I step through my code below, I get to CopyCGImageAtTime method, and the out param for the error merely gives me "unknown error." I know that the image video comes back would be a file that exists, or the code would return out. I wonder about the CMTime object, if I am setting it up correctly. I am just guessing what the format value (second value) should be. I found an example with 1 and another with 100, neither seemed to work for me. Suggestions are appreciated. Thanks.
if ( !System.IO.File.Exists(media.Path) )
{
return;
}
AVFoundation.AVAsset asset = AVFoundation.AVAsset.FromUrl(NSUrl.FromString(media.Path));
AVFoundation.AVAssetImageGenerator imgGen = AVFoundation.AVAssetImageGenerator.FromAsset(asset);
CoreMedia.CMTime ActTime;
NSError err;
var imageRef = imgGen.CopyCGImageAtTime(CoreMedia.CMTime.FromSeconds(0, 100),
out ActTime, out err);
var movieImage = UIImage.FromImage(imageRef);
uiivVideo.Image = movieImage;
Bluetooth Low Energy Slow connection with peripheral
I am using Xamarin to connect with one peripheral and the connection time sometimes is up to one minute in order to connect to the peripheral.
Thats my connect code:
`public bool Connect(String address)
{
if (mBluetoothAdapter == null || address == null)
{
Log.Warn(TAG, "BluetoothAdapter not initialized or unspecified address.");
return false;
}
// Previously connected device. Try to reconnect.
if (mBluetoothDeviceAddress != null && address == mBluetoothDeviceAddress && mBluetoothGatt != null)
{
Log.Debug(TAG, "Trying to use an existing mBluetoothGatt for connection.");
if (mBluetoothGatt.Connect())
{
mConnectionState = State.Connecting;
return true;
}
else
{
return false;
}
}
BluetoothDevice device = mBluetoothAdapter.GetRemoteDevice(address);
if (device == null)
{
Log.Warn(TAG, "Device not found. Unable to connect.");
return false;
}
// We want to directly connect to the device, so we are setting the autoConnect
// parameter to false.
// if (once) mBluetoothGatt = device.ConnectGatt(this, false, new BGattCallbackTwo(this));
if (!devicesGatt.ContainsKey(address))
{
connectionHandler = new Handler(ApplicationContext.MainLooper);
//mBluetoothGatt = device.ConnectGatt(this, false, new BGattCallback(this));
connectionHandler.Post(() =>
{
if (!devicesGatt.ContainsKey(address))
devicesGatt.Add(address, device.ConnectGatt(this, true, new PlayerOneCallback(this)));
waitIdle();
});
}
//}
Log.Debug(TAG, "Trying to create a new connection.");
mBluetoothDeviceAddress = address;
mConnectionState = State.Connecting;
return true;
}`
Any suggestions how to improve the connection time ?
Xamarin new release in vs 2015 problem
I have update to xamarin 4.8.0.752. Every time i'm opening vs 2015 i'm getting this problem.
I get many bugs in my projects and also it asks always for update the same version what is going on?
How populate a Spinner with Key/Value
Hi guys i wondering if anyody have a example or an idea about populate a spinner like combobox in VB.net/C#.net
Date Picker
Hello every one,
When i use DatePicker i have a calendar view , but i want picker for day, month , year, how to do that ?
Thanks in advance.
How to change backgroundcolor of MasterDetailPage Menu Listview SelectedItems
Hello,
I want to change the background color of SelectedItem of Listview as well MastarPage ToolbarItem.
1) MasterDetailPageMaster Menu Listview SelectedItem Background color I want to change.
2) MasterDetailPage has defined ToolbarItems to that toolbar I want to set the background color.
Thanks in advance
How to find label reaches maximum lines.
I have developed a App. In my app i need to show the label with truncated text. when click the arrow the label should show all the text without truncating. when click again on arrow the text should be hide. It is like "See more", "See less" functionality. Is there any controls available in xamarin. Can any one knows how to resolve this?
install nuget
The package 'Xamarin.Android.Support.Core.UI 26.1.0.1' could not be installed. You are trying to install this package in a project that has 'MonoAndroid, Version = v6.0'
How to create simple TabbedPageRenderer for iOS and Android in Xamarin Forms
Need Simple working Tabbedpage Renderer
ERROR WITH LATEST NUGET v2.5.0.77 "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded
I just got latest stable 2.5.0.77107 and I can't compile anymore
[myUser]\packages\xamarin.forms\2.5.0.77107\build\netstandard1.0\Xamarin.Forms.targets(55,3): error MSB4062: The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded from the assembly [myUser]\.nuget\packages\xamarin.forms\2.5.0.77107\build\netstandard1.0\Xamarin.Forms.Build.Tasks.dll. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.
I replaced my user path with [myUser]
it looks like this bug exists since October in the pre-release:
When Sending an email for some users the 1st time the send/cancel buttons are white on white (Bug?)
I hope somebody can offer some help here, I have had complaints in our app, and been able to reproduce (but not consistently) a bug where when sending an email the first time the mail composer modal is presented the send/cancel buttons are white text on a white background. We initially were able to fix this problem by explicitly setting the text color using the following code:
var textAttr = new UIStringAttributes() {
ForegroundColor = UIColor.Black,
};
mailController.NavigationBar.TitleTextAttributes = textAttr;
But this issue has come up in a new part of our application where users can send emails, and in the new location the fix is not working 100% of the time.
Is this a known bug in iOS? Xamarin? Is there a better way to set this text color ?