I am using Windows 10 Professional with visual studio community edition 2017 ,Microsoft sql server 2014 to access database using Web API(web services) using xamarin cross plateform app. I using tutorials of Houssem Dellai on topic "Login to asp.net identity on xamarin forms". My application projects build successfully but when I am inserting data for registration and try insert it into database table I cought System.Net.HttpExecption . Application break and no comapitble code issue.
To access Microsoft sql server 2014 database using Web API(web services) using xamarin.
Turn Off Hover
How do I turn off the hover to open panels or at least delay the display. When I hover over a panel tab, like toolbox, it flashes open briefly, then closes. If I click it usually stays open. I have panels flashing open all over very annoying
VS Mac Ios Scrollview
I can do the hard stuff but this agrevating me. Get an Ios app view to scroll. I have a sample solution from another forum member , it builds and runs in the sim fine. I cant get my stupid hello world scroll to move. Simp single view using the Storybook. Have the controller, it is set for freeform and the view is extended. added the a scrollview from tool box added views and button. It builds show the top of the view but wont scroll down. What am i missing???? information is vague or deprecated. Thanx for reading and any feedback.
Xamarin Forms Map Direction
Xamarin forms maps Direction draws only straight lines, but i need to draw on road instead of straight lines
Please tell me how to resolve this?
Is Azure push notifications better or native?
Hello all,
Am building an app for my company in Xamarin.Forms, and I need to implement push notifications. But am not sure whether to choose Azure push notifications or platform specific(implementing FCM for android and APNS for iOS).
I need to make sure users get notifications regardless of app state, running or background or device turned off and restarted .. Notifications shouldn't be lost.
Should be able to send notifications to specific users from my server based on some conditions.
What am not sure is whether these are possible with platform specific push notifications as well. And if it is then how do Azure services differ from these. Please help.
Thanks,
Sai
Request permissions not working within PermissionsPlugin
For my Xamarin.Forms-App I'm using the PermissionsPlugin v2.0.1.
If no permission is granted, I want to request the user to do so by CrossPermissions.Current.RequestPermissionsAsync(Permission.Storage)
The problem is that the function always returns Unknown
instead of requesting the user for the permission. One time, it worked...but I don't know what I changed that it's not working anymore..
Here my code:
MainActivity.cs (Android-project)
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)
{
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
AndroidManifest.xml
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="25" />
<uses-permission android:name="android.permission.CAMERA" />
PermissionsExample.xaml.cs
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class PermissionExample
{
public PermissionExample()
{
this.InitializeComponent();
}
private async void Button_OnClicked(object sender, EventArgs e)
{
var requestedPermissions = await CrossPermissions.Current.RequestPermissionsAsync(Permission.Camera);
var requestedPermissionStatus = requestedPermissions[Permission.Camera];
await this.DisplayAlert("", $"Permission: {requestedPermissionStatus}", "ok");
}
}
Thanks for your help!
Custom fonts and Live Player
Custom fonts don't seem to render on the Live Player
NSInternalInconsistencyException error in UITableViewDelegate for deleting a cell / Xamarin.iOS
I'd like to have two actions in swipe normal (it means right to left), in a table view in Xamarin.iOS.
As I searched, I know that I can customize a UITableViewDelegate for my table and have a swipe with different actions.
Here is my UITableViewDelegate code :
public class NotificationTableDelegate : UITableViewDelegate
{
private readonly AlertsViewController _AlertsViewController;
private List _notifications;
public NotificationTableDelegate(AlertsViewController tagViewController, List<NotificationItem> notifs)
{
_AlertsViewController = tagViewController;
_notifications = notifs;
}
public override UITableViewRowAction[] EditActionsForRow(UITableView tableView, NSIndexPath indexPath)
{
UITableViewRowAction activateOrDeactivateNotifAction = UITableViewRowAction.Create(
UITableViewRowActionStyle.Normal,
"activate",
delegate {
//activate or deactivate
}
);
UITableViewRowAction deleteNotifAction = UITableViewRowAction.Create(UITableViewRowActionStyle.Destructive,"Delete",async delegate
{
UIAlertController alert = UIAlertController.Create(_notifications.ElementAt(indexPath.Row).Label, "ConfirmDeleteAlert", UIAlertControllerStyle.Alert);
alert.AddAction(UIAlertAction.Create("Yes", UIAlertActionStyle.Destructive, (action) => {
_notifications.RemoveAt(indexPath.Row);
tableView.DeleteRows(new NSIndexPath[] { indexPath }, UITableViewRowAnimation.Fade);
}));
alert.AddAction(UIAlertAction.Create("Cancel", UIAlertActionStyle.Cancel, (action) => { }));
await _AlertsViewController.PresentViewControllerAsync(alert, true);
});
return new UITableViewRowAction[] { deleteNotifAction, activateOrDeactivateNotifAction };
}
}
There, I have two actions, "activate" and "delete". Until here, everything works fine BUT, the action for deleting makes me an error. When I delete a row and after accepting the removing, it makes me NSInternalInconsistencyException error :
Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (7) must be equal to the number of rows contained in that section before the update (7), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).
I think the error is correct, because the number of cells in Table must change, but in NotificationTableDelegate I have no access to items in UITableViewSource !! How can I resolve this error or how can I modify items in UITableViewSource ? Do you have any idea?
*I have the code for having delete inside UITableViewSource by using CommitEditingStyle etc... and it's not in my case. In additional I have CanEditRow, true in UITableViewSource.
iTunes connect and Google Maps SDK 'This bundle is invalid'
I'm using the latest version of Xcode, Xamarin and OSX. I'm using Pikkart SDK 3.11, which requires manual installation of the Google Maps SDK (I'm using v2.4, but have tried other versions too). I can successfully build directly to my device or publish using "ad hoc" but when I upload to Testflight I receive the following 2 errors after processing
This bundle is invalid - The Info.plist file for /Payload/[appname]/GoogleMaps.framework is missing or could not be read.
Invalid Bundle - The bundle at '/Payload/[appname]/GoogleMaps.framework' does not contain a bundle executable.
The Google Maps info.plist does NOT contain a CFBundleExecutable key and the CFBundlePackageType is set to BNDL. I've tried clearing my .itmstransporter directory.
Are there any known issues with GoogleMaps/Xamarin IOS (with or without Pikkart) or has anyone experienced similar issues and discovered a fix/workaround? Thanks
Paths To Roots not showing anything
I'm trying to track down leaks using Profiler, and can see Objects which are 'Live' in a snapshot.
This article:
https://xamarinhelp.com/tracking-memory-leaks-xamarin-profiler/
indicates that the 'Paths To Roots' shows what is holding a reference to the object.
However, I'm finding that there is nothing on the 'Paths To Roots' tab.
Do I need to do something to see this information, or is this a known bug in Profiler?
This a Forms project, running on Android. I'm using Profiler version 1.6.0-25 on OS X.
Draw RadioButtons using Frame?
I'm creating a custom RadioButton control, currently I'm using those two glyphs :◉, ◯
but I prefer not using them as fonts may have unexpected behaviors regarding the environment.
so I need to draw them: I tried using Frame
but can't approach the result I want:
this is one of many tries I made:
<Frame Padding="3" CornerRadius="10"
WidthRequest="10" HeightRequest="10" BackgroundColor="Black"
VerticalOptions="Center" HorizontalOptions="Center">
<Frame Padding="5" CornerRadius="5"
WidthRequest="5" HeightRequest="5" BackgroundColor="White"
VerticalOptions="Center" HorizontalOptions="Center">
</Frame>
</Frame>
None of them made the empty circle
How to Refresh page when Rg Popup is closed?
Hi,
I am opening Rg.Plugin.Popup here:
await Navigation.PushPopupAsync(new ZeeraPopupNewMerchantCategory());
and on the button I have a with a Click
When the Popup is closed from the 's Clicked and when returning to parent, how can I refresh the parent's page data which is in:
GetMerchantCategory()
This is the code in the parent which I need to run when the popup is closed..
Thanks,
Jassim
App-development
I want do create an application for an android device. Unfortunately I have no experiences in such activities and I just thought that it's worth to ask people who really know how this is done. It should show a simple text that is saved in a mobile cloud such as Dropbox. The app should only have a button to request the text and a field in which the text is represented.
This hole prozess should as well work the other way round, so that I can write a text which gets saved in the Dropbox if I press an other separated button.
As said before I am a completely newcomer in this developer area and would be happy if someone could help or tell me a good source for helpful information. Or just to give me help where I should start.
Thanks four answers and help!
TableView TextCell Keyboard, wrongly set as Numeric
When creating a TableView, I have 3 sections. Section 1 is a header, sections 2 and 3 interchange with each other.
Section 2 has a TextCell (Numeric), Section 3 has a TextCell (Plain).
When I tap on Section 1, I need Sections 2 and 3 to swap with each other.
I find that when the numeric keyboard appears, it also then applies to section 3 with the plain keyboard.
Repo Steps:
- Create a TableView with 3 sections.
- Use section 1 as a toggle to display either 2 or 3
- Observe that keyboard type does not reflect the required keyboard
Expected:
- When the TextCell with the numeric keyboard is visible, use the numeric keyboard.
- When the TextCell with the plain keyboard is visible, use the plain keyboard.
public class SimpleTestPage : ContentPage
{
bool _b = false;
TableSection _s1, _s2;
public SimpleTestPage()
{
var tableView = new TableView
{
Intent = TableIntent.Form
};
var root = new TableRoot();
var section1 = new TableSection("1")
{
new TextCell
{
Text = "Tap",
Command = new Command(() =>
{
root.Remove(_s1);
root.Remove(_s2);
if (!_b)
{
root.Insert(1, _s1);
}
else
{
root.Insert(1, _s2);
}
_b = !_b;
})
}
};
root.Add(section1);
_s1 = new TableSection("2")
{
new EntryCell
{
Label = "Numeric",
Keyboard = Keyboard.Numeric
}
};
_s2 = new TableSection("2")
{
new EntryCell
{
Label = "Plain",
Keyboard = Keyboard.Plain
}
};
tableView.Root = root;
Content = tableView;
}
}
global resource populating dynamic resources throws System.InvalidOperationException iOS only
It's happening when I'm attempting to change my dynamic resource on a button click and then re-pop the page with this:
App.Global.isNewCat = true;
var vUpdatedPage = new settings();
Navigation.InsertPageBefore(vUpdatedPage, this);
await Navigation.PopAsync();
System.InvalidOperationException: 'System.Windows.Documents.Paragraph' is not a Visual or Visual3D. at MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D) at MS.Internal.Media.VisualTreeUtils.AsNonNullVisual(DependencyObject element, Visual& visual, Visual3D& visual3D) at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference) at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.IsMouseOverTextView(Point position) at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.<<OnModifierKeyStateChanged>b__19_0>d.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 Microsoft.VisualStudio.Text.Utilities.GuardedOperations.<CallExtensionPointAsync>d__29.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
Any ideas? Android works fine, but iOS always crashes, usually with an unknown exception but sometimes it'll throw this in the log.
Load Image form byte[] array.
Hi,
there is the posibility to load in the Xamarin.Forms Image an Image from a byte[] array?
Thanks
Where are the XAML designer tools?
The forms previewer crash all the time. It could be seen more of a compile:designer that breaks as soon as you start adding codebehind stuff.
We need a designer for Xaml not css? I think the web guys gonna stick to other tools anyways
The live previewer very nice idea, same thing doesn't work yet.
I just need BLEND with a Visual state manager. where is the backning from the Microsoft team that dream up stuff like the Blend tools :-)
Generate a dynamic form (list of widgets)
This should not be in this forum it should be in the GTK# windows forms!! but I couldn't find it!!
Hi everyone, I'm using GTK# and trying to make a dynamic form that is generated based on a file...
I have a list of widgets I need to stack for as long as the files goes. For example, the
file as this widget names: "Entry" "SpinButton" "ComboBox" "TextView"...
I need to be stretched horizontally and stacked vertically. I'm using Vbox for this..
the problem is that the space between the widgets (and their size) is automatically changed as I have more or less widgets drawing on the screen.
I wanted their size to remain the same and just stack them and use a ScrolledWindow to scroll if down if there are too many of them.
Hope my question is understandable... I think the problem here is that I can't use VBox... but I don't know what to use then.. I needed some help!
thank you
iOS Asset Catalog being cleared in Visual Studio
so it looks like this bug https://bugzilla.xamarin.com/show_bug.cgi?id=17061 is still around.
In Visual Studio 2015 with Xamarin.iOS 8.10.2.0 anything icons I set under Universal Icons get totally ignored/deleted.
I'll add the images, and the images will show up in the iOS Application pane while I'm looking at it, but the plist doesn't update to reflect my changes, and when I save/close the project settings and return then all icons have vanished again.
Makes things quite awkward to say the least.
Cannot update GooglePlayServices 60.1142.0
I am trying to update googleplay services package to 60.1142.0. It seems like that you have change with Xamarin.GooglePlayServices.Basement package and I am getting error message as below. I tried to remove Xamarin.GooglePlayServices.Basement package and tried to install other package as advised but It is still not working? what is the solution here?
Removing package 'Xamarin.GooglePlayServices.Basement.60.1142.0 : Xamarin.Android.Support.Compat [26.0.2, ), Xamarin.Android.Support.Core.UI [26.0.2, ), Xamarin.Android.Support.Core.Utils [26.0.2, ), Xamarin.Android.Support.Fragment [26.0.2, ), Xamarin.Android.Support.Media.Compat [26.0.2, ), Xamarin.Build.Download [0.4.7, )' from folder 'C:\Git\nugetpackages'
Removed package 'Xamarin.GooglePlayServices.Basement.60.1142.0 : Xamarin.Android.Support.Compat [26.0.2, ), Xamarin.Android.Support.Core.UI [26.0.2, ), Xamarin.Android.Support.Core.Utils [26.0.2, ), Xamarin.Android.Support.Fragment [26.0.2, ), Xamarin.Android.Support.Media.Compat [26.0.2, ), Xamarin.Build.Download [0.4.7, )' from folder 'C:\Git\nugetpackages'
Executing nuget actions took 3,23 min
This collection is read-only.
Time Elapsed: 00:03:30.7351044
========== Finished ==========*