Is there a way to change status bar color dynamically, but not the navigation bar color?
Change Status Bar Color on iOS
CachedImage FFImageLoading for Xamarin.Forms
https://github.com/molinch/FFImageLoading or https://github.com/daniel-luberda/FFImageLoading/ (new Forms features)
DEMO: https://github.com/daniel-luberda/FFImageLoading/tree/master/samples/ImageLoading.Forms.Sample
Caching support
The library automatically deduplicates similar requests: if 100 similar requests arrive at same time then one real loading will be performed while 99 others will wait. When the 1st real read is done then the 99 waiters will get the image.
Both a memory cache and a disk cache are present.
By default, on Android, images are loaded without transparency channel. This allows saving 50% of memory since 1 pixel uses 2 bytes instead of 4 bytes in RGBA (it can be changed).
WebP support
WebP is supported on both iOS and Android.
Downsampling
Downloaded images can be automatically downsampled to specified size (less memory usage). DownsampleHeight and DownsampleWidth properties
Retry
Downloads can be repeated if not succeeded: RetryCount and RetryDelay properties.
Placeholders support
- LoadingPlaceholder
- ErrorPlaceholder
After this pull it'll also support Transformations!
https://github.com/molinch/FFImageLoading/pull/47
Transformations support
It doesn't modify original source images. Example:
- RoundedTransformation
- CircleTransformation
- GrayscaleTransformation
... and some more features. Feel free to test it. Not all features are on nuget yet (older version).
Multiple BindingContext : Choose the right one
Hello,
I've got a ContentPage with a BindingContext, and this page contains ContentViews with their own BindingContext. I'd like to bind a field on ContentView that depends of ContentPage's BindingContext, it should be possible but I couldn't get this to work...
{Binding myField, Source={x:Reference xxx}}
Thanks for help !
Binding StackLayout Help!
Hi, i want to bind my saved sqlite net pcl information to a big button i have created and i cant seem to get the saved file to bind to my view page
View Page Code:
Code Behind:
public partial class JobPage : ContentPage
{
private SQLiteAsyncConnection _connection;
private ObservableCollection<JobItems> _jobs;
public JobPage()
{
InitializeComponent();
_connection = DependencyService.Get<ISQLiteDb>().GetDatabase();
}
protected async override void OnAppearing()
{
await _connection.CreateTableAsync<JobItems>();
var jobitems = await _connection.Table<JobItems>().ToListAsync();
_jobs = new ObservableCollection<JobItems>(jobitems);
base.OnAppearing();
}
private async void ToolbarItem_Activated(object sender, EventArgs e)
{
await Navigation.PushAsync(new AddJob());
}
}
Custom Button Code:
public class ContentButton : ContentView
{
public event EventHandler Clicked;
protected Grid ContentGrid;
protected ContentView ContentContainer;
public new View Content
{
get { return ContentContainer.Content; }
set
{
if (ContentGrid.Children.Contains(value))
return;
ContentContainer.Content = value;
}
}
public ContentButton()
{
ContentGrid = new Grid
{
VerticalOptions = LayoutOptions.Start,
HorizontalOptions = LayoutOptions.Start
};
ContentGrid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
ContentGrid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
ContentContainer = new ContentView
{
VerticalOptions = LayoutOptions.Start,
HorizontalOptions = LayoutOptions.Start,
};
ContentGrid.Children.Add(ContentContainer);
var button = new Button
{
VerticalOptions = LayoutOptions.Start,
HorizontalOptions = LayoutOptions.Start,
BackgroundColor = Color.FromHex("#01000000")
};
base.Content = ContentGrid;
button.Clicked += OnClicked;
}
private void OnClicked(object sender, EventArgs e)
{
}
}
Back and hamburger menu buttons
I have a Xamarin Forms app which should have a hamburger menu for main navigation, plus be able to navigate to subpages. For this I'm using a MasterDetailsPage as many examples show. The Details page is wrapped in a NavigationPage so that all navigation happens only in the Details page.
What I'd like to have ideally is this:
- on first load only the hamburger menu icon/button is visible in the top bar
- after any navigation (either from the hamburger menu or by tapping something in the details page) the top bar has both the back button AND the hamburger menu icon/button.
The scenario almost works, however after navigation I only have the back button in the top bar. This means that if the user navigates a few times in succession, in order to then navigate to a "main" module she'd have to press "back" several times until she's back on the root page, from which the hamburger menu will be accessible. What I want is to offer access to the hamburger menu from any application page for quicker navigation.
I guess what I'm trying to achieve could be done by adding an additional button to the top bar which, when clicked, would publish an event to which the MasterDetailsPage would subscribe and then simply show the Master view (which is the hamburger menu).
I've tried adding a custom renderer (derived from NavigationRenderer) in the Droid project in order to add a new button to the ActionBar, however I can't seem to get the button to show up. Customizing the ActionBar works fine (e.g. setting a Subtitle), but I can't figure out how to add a button to it. On iOS I haven't even tried yet.
Is there any example on how to achieve this anywhere? Or maybe a better idea of doing it than a custom renderer? Note: I know I can add ToolbarItems, but they end up being right-aligned, which is not what I want.
Thanks!
Master Detail Page with a Carousel Page - Text Alignment settings ignored when reopening
I have an application which uses a Master Detail Page, one of the detail pages is a Carousel Page. I've discovered that the text alignment setting (at least for labels) is not adhered to in the event you navigate to a different page on the carousel, then a different detail page, then back to the carousel page, and back again to the first page being viewed on the carousel - A few steps to get this issue I know - here's a gif:
The first time you see my carousel page, it's Red and the text above it has some Aligned to the right, and some centered. The second time you see it, after navigating away. Both labels are aligned to the left.
This doesn't happen if the Carousel page with the labels on is the last one viewed prior to opening a new detail page (see the green page label is still centered in the gif).
Here's a link to it as a project if anyone's interested: https://www.dropbox.com/s/i9lrwra0ns2oyvq/MDP_Carousel_TextAlignBug.zip?dl=0
Is anyone aware of a way to force my carousel page to refresh with the labels properly aligned?
How to resolve "Unexpected character '
When doing the Authorization code flow (based on the ComicBook example from the Xamarin.University class ENT172) using Xamarin.Auth 1.3.2.1 against Facebook, it seems to get stuck in a tight loop popping up alerts with the title "Authentication Error" that say
"Unexpected character '<'. At line 1, column 0".
It's not code of mine that is displaying the alert. Has anybody else seen this? If so, how did you solve it?
I just tried upgrading to 1.3.2.2 of Xamarin.Auth in the hope that would solve it, but as well as introducing what appears to be a change to an API that I use, it also seems to have done something nasty to the manifest :-(
How to use Odometer in xamarin forms ? Is their is any way to use odometer in xamarin forms..?
here it is in Android application i want to implement an odometer in xamarin forms for both android and ios can anyone help me with this..please?
(in the toolbar left side Label is the odometer and the right side label is the timer).
Why can I only see my offline data in my Xamarin Forms app?
I am having trouble or at least I think it's trouble with my Xamarin forms app, the concern is that I only seem to be returning offline data to my list even when I refresh it and I don't know why.
My app uses local storage in case the connection is lost and the user still needs to see data, it was my understanding that local storage will only be overwritten or updated when a PullAsync
is used. Although I have defined this in my application it seems to still only return the stored data.
I checked the returned collection by setting a break point at Vessels.ReplaceRange(vessels);
and I can see that the vessels
collection is not the current data in my Azure database but the stored data that it collected the very first time the app was run.
No amount of refreshing or relaunching is helping. Do I need to set a purge on my local storage? or have I done something wrong within my code?
users.cs
using System;
namespace MyProject
{
public class users
{
public string id { get; set; }
public string name { get; set; }
}
}
AzureService.cs
[assembly: Dependency(typeof(AzureService))]
namespace MyProject
{
public class AzureService
{
public MobileServiceClient client { get; set; } = null;
IMobileServiceSyncTable<users> vesselsTable;
public async Task Initialize()
{
if (client?.SyncContext?.IsInitialized ?? false)
return;
var appUrl = "https://mysite.azurewebsites.net";
client = new MobileServiceClient(appUrl);
var path = "syncstore.db";
path = Path.Combine(MobileServiceClient.DefaultDatabasePath, path);
var store = new MobileServiceSQLiteStore(path);
store.DefineTable<users>();
await client.SyncContext.InitializeAsync(store);
vesselsTable = client.GetSyncTable<users>();
}//initialize
public async Task SyncVessels()
{
ReadOnlyCollection<MobileServiceTableOperationError> syncErrors = null;
try
{
await client.SyncContext.PushAsync();
await vesselsTable.PullAsync("allVessels", vesselsTable.CreateQuery());
}
catch (MobileServicePushFailedException exc)
{
if (exc.PushResult != null)
{
syncErrors = exc.PushResult.Errors;
}
}
}//SyncVessels
public async Task<IEnumerable<users>> GetVessels()
{
//Initialise & Sync
await Initialize();
await SyncVessels();
return await vesselsTable.ToEnumerableAsync();
}//GetVessels
}//AzureService
}
VesselsPage.xaml.cs
protected override async void OnAppearing()
{
base.OnAppearing();
CrossConnectivity.Current.ConnectivityChanged += ConnecitvityChanged;
OfflineStack.IsVisible = !CrossConnectivity.Current.IsConnected;
if (vm.Vessels.Count == 0)
vm.LoadVesselsCommand.Execute(null);
else
{
vm.LoadVesselsCommand.Execute(null);
}//else
}//OnAppearing
VesselsViewModel.cs
namespace MyProject
{
public class VesselsViewModel : BaseViewModel
{
AzureService azure;
public VesselsViewModel()
{
azure = DependencyService.Get<AzureService>();
}//VesselsViewModel
// #Observable Collections
public ObservableRangeCollection<users> Vessels { get; } = new ObservableRangeCollection<users>();
//
// #Loading Message
string loading;
public string Loading
{
get { return loading; }
set { SetProperty(ref loading, value); }
}//Loading
//
// #Load Vessels Command
ICommand loadVesselsCommand;
public ICommand LoadVesselsCommand => loadVesselsCommand ?? (loadVesselsCommand = new Command(async () => await ExecuteLoadVesselsCommandAsync()));
//
// #Load Vessels
async Task ExecuteLoadVesselsCommandAsync()
{
if (IsBusy)
return;
try
{
loading = "Loading Vessels...";
IsBusy = true;
//This always seems to be stored data.
var vessels = await azure.GetVessels();
Vessels.ReplaceRange(vessels);
}//try
catch (Exception ex)
{
Debug.WriteLine("Failed to load vessels" + ex);
await Application.Current.MainPage.DisplayAlert("Sync Error", "Unable to sync vessels, you may be offfline", "OK");
}//catch
finally
{
IsBusy = false;
}//finally
}//ExecuteLoadVesselsCommandAsync
}//BaseViewModel
}
As I said I thought the await vesselsTable.PullAsync("allVessels", vesselsTable.CreateQuery());
would be the point where the new dta was grabbed from the database and returned but it appears the stored data is taking priority or something else may be going on.
The documentation states
Pull is performed by the IMobileServiceSyncTable.PullAsync method on a
single table. The first parameter to the PullAsync method is a query
name that is used only on the mobile device. Providing a non-null
query name results in the Azure Mobile Client SDK performing an
incremental sync, where each time a pull operation returns results,
the latest updatedAt timestamp from the results is stored in the local
system tables. Subsequent pull operations then only retrieve records
after that timestamp. Alternatively, full sync can be achieved by
passing null as the query name, which results in all records being
retrieved on each pull operation. Following any sync operation,
received data is inserted into the local store.
Even passing null
as the query name to remove the teimstamp difference has not helped, I still only see local data. The local data was collected yesterday and the new that is being ignored was entered today. So there is a time diffrenece there anyway.
Note
My app should only be reading data from the Azure database and updaing the list accordingly, it never has to write anything to the Azure database.
Any help is as ever, appreciated.
Listview ItemSelected event does not fire when TapGestureRecognizer is clicked on an item
I created project with a listview bound to an observable collection. The listveiw contains some labels with TapGestureRecognizers. When I run the application and click on any of the labels - the item in the ListView becomes selected I.e. it turn blue) but the ItemSelected event never fires. I don't want the item to be selected when the label is tapped. Is there a way to prevent this? I am running in a winphone 8.1 app.
App freezes on button click
So I am working on an UWP app that I'm creating in a portable class library (Xamarin). I need to save information that are typed in (e.g. in TextBoxes) by a user in an xml file.
Therefore I created a class in PCL where I get the info from those TextBoxes:
namespace myProject
{
public class XMLData
{
[XmlRoot("MyRootElement")]
public class MyRootElement
{
[XmlAttribute("MyAttribute1")] //name of the xml element
public string MyAttribute1 //name of a textboxt e.g.
{
get;
set;
}
[XmlAttribute("MyAttribute2")]
public string MyAttribute2
{
get;
set;
}
[XmlElement("MyElement1")]
public string MyElement1
{
get;
set;
}
}
}
On each Page there is a "continue" button. When clicked, the data gets saved:
async void Continue_Clicked(object sender, EventArgs e)
{
await Navigation.PushAsync(new Page2());
XMLData.MyRootElement mre = new XMLData.MyRootElement
{
MyAttribute1 = editor1.ToString(),
MyAttribute2 = editor2.ToString(),
MyElement1 = editor3.ToString()
};
}
At the last button click the file should be created and saved:
private void CreateandSave_Clicked(object sender, EventArgs e)
{
var s = DependencyService.Get<IFileHelper>().MakeFileStream();//using dependencyService to get a stream (there is no system.io.stream in PCL)
XMLData xmldat = new XMLData();
using (StreamWriter sw = new StreamWriter(s, Encoding.UTF8))
{
XmlSerializer serializer = new XmlSerializer(typeof(XMLData));
serializer.Serialize(sw, xmldat);
}
}
Here my code in the UWP class (for dependencyService I created a class called FileHelper to get a stream and create a saving location + file)
namespace myProject.UWP
{
public class FileHelper: IFileHelper //IFileHelper is a simple interface I made with the Stream MakeFileStream(); method in it
{
public async Task<IRandomAccessStream> MakeFileStreamAsync()
{
StorageFolder sf = KnownFolders.DocumentsLibrary;
var file = await sf.CreateFileAsync("data.xml", CreationCollisionOption.OpenIfExists);
var stream = await file.OpenAsync(FileAccessMode.ReadWrite);
return stream;
}
Stream IFileHelper.MakeFileStream()
{
var task = MakeFileStreamAsync();
task.Wait();
return task.Result.AsStreamForWrite();
}
}
}
The problem is that whenever I reach the CreateandSave button and click on it, the app just freezes. No errors, nothing, everything looks fine. After I break up the debugging I can see that there is an xml file created in the folder I wanted but it's empty (0 bytes). What's wrong with the code? Anyone an idea?
Long running task, SQLite and updating UI
In my Xamarin Forms app, I have some database insertions which take a while to run, I allowed progress to be shown with a count of how many "records" had been inserted compared to the total. To allow the UI to update (my progress indication) I awaited a call to Task.Run, where the body of the action was the insertions. I then used an event to signal to the calling code (VM) the progress being made and everything worked great.
However, after some further testing I have found that my SQLite operations are crashing my app while being in the Task.Run. So I am trying to use a different approach to updating the UI while the insertions are taking place however I don't seem to be able to get the UI updated.
I have changed over to send a message via the MVVMLight messenger to notifty the VM of the progress change and I have tried awaiting a call to Task.Run against the RaisePropertyChanged call, however the UI is still not updating.
Does anyone have any ideas how I can resolve this?
XAML compilation at assembly level cause debugger break point not fire
Hi,
Recently I enabled the XAML compilation for my Xamarin Forms project at assembly level by follow the guide described in https://developer.xamarin.com/guides/xamarin-forms/xaml/xamlc/
using Xamarin.Forms.Xaml;
...
[assembly: XamlCompilation (XamlCompilationOptions.Compile)]
namespace PhotoApp
{
...
}
But, I have very bad experience on Xamarin Studio where all my debugger break point were not fire! Sometimes, I have IL offset exception.
I have try to delete all the bin/obj folders, make a clean build, restart my Android/iOS simulator (I even tried on actual Android device). All not help at all.
Sometimes, it does back to normal after restart my mac-book. May be 2 times out of 10 times.
Today, I totally cannot stand for the problem. As it just keep wasting my time.
So, I try hard to flash back my memory what I did on my code recently.
At one point, I recalled XAMLC. So, I decided give it a try by remove the assembly level XAML compilation.
Well, it work! all my debugger break point are fire accurately.
So, would like to know is there any one having the similar problem as I have? It is really XAMLC cause all these problem so far?
Cheers,
CT
Detect enter key press in Editor
How do i detect enter key press in Editor?
How to create UserControlin Xamarin.Forms
Hi
I want to crate a User Control (thats the name in WPF and Silverlight). I want to point out that I don't want to write a platform specific control. I want to build a reusable control, including some standard views , own properties and events. Wat I did:
1.) create a Xamarin.Forms/PCL project
2.) add a Class Library (Xamarin.Forms) to the project
3.) change the base class in the Class library code to Stackpanel
4.) Add the ClassLibrary namespace to the MainPage.xaml
5.) Add the control to the content from the main Page
////the ClassLibrary
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;
namespace LamXamarinControls
{
public class LamLogonControl : StackLayout
{
public LamLogonControl()
{
var button = new Button
{
Text = "Click Me!",
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.CenterAndExpand,
};
int clicked = 0;
button.Clicked += (s, e) => button.Text = "Clicked: " + clicked++;
this.Children.Add(button);
}
}
}
/// the Main Page
<?xml version="1.0" encoding="utf-8" ?>
<lam:LamLogonControl />
</ContentPage>
If I step to the code I get the Exception:
Xamarin.Forms.Xaml.XamlParsException: Position ...... Type: .... not found in clr-namespace .....
Wat I'm doing wrong ?
Editor Padding Text
Hi,
I have created a custom render for editor and entry.
In the entry I can set the padding of the text like this:
Control.LeftView = new UIView(new CGRect(0, 0, 10, 0));
Control.LeftViewMode = UITextFieldViewMode.Always;
Control.RightView = new UIView(new CGRect(0, 0, 10, 0));
Control.RightViewMode = UITextFieldViewMode.Always;
But in editor I can find a way. Can you please help me?
Xamarin forms nuget package on a .net standard portable project
Hi,
I have a .net standard portable project and I'm trying to add Xamarin forms nuget package. I get the following error:
"Package Xamarin.Forms 2.3.1.114 is not compatible with netstandard1.6"
That's my project json file:
{
"supports": {},
"dependencies": {
"Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"NETStandard.Library": "1.6.0",
"OpenTK.NETCore": "1.1.2364.6424"
},
"frameworks": {
"netstandard1.6": {}
}
}
Any ideas how to fix it?
Icon Tabbed Page With Badge
Hi, I have found a way to use fa icons in tabbed page and with badges. I have been days figuring this out. I hope it can help someone.
If you have any idea how to improve this please tell me.
I use the plugin Iconize only.
My Tabbed Renderer Page in iOS:
` public class TabbedPageRenderer : IconTabbedPageRenderer
{
protected override void OnElementChanged(Xamarin.Forms.Platform.iOS.VisualElementChangedEventArgs e)
{
base.OnElementChanged(e);
var base_entry = Element as MyTabbed;
base_entry.OnDoStuff += (sender2, e2) => DoStuff(base_entry.index);
}
public void DoStuff(int index)
{
var base_entry = Element as MyTabbed;
var items = TabBar.Items;
if (base_entry.Badge != "0")
{
items[base_entry.index].BadgeValue = base_entry.Badge;
}
else
{
items[base_entry.index].BadgeValue = null;
}
}
`
My Tabbed:
`public class MyTabbed : IconTabbedPage
{
string badge;
public EventHandler OnDoStuff;
public string Badge
{
get
{
return badge;
}
set
{
badge = value;
DoStuff();
}
}
public void DoStuff()
{
if (OnDoStuff != null)
{
OnDoStuff(this, new EventArgs());
}
}
}`
And an example of the use of My Tabbed:
`public class TabbedOpcoes: MyTabbed
{
public TabbedOpcoes()
{
NavigationPage.SetHasNavigationBar(this, false);
IconNavigationPage paginaHistorico = new IconNavigationPage(new Historico())
{
Icon = "fa-history",
Title = "HISTORY",
BarBackgroundColor = (Color)App.Current.Resources["verdeRiopele"],
BarTextColor = Color.White
};
Children.Add(paginaHistorico);
this.index = 1;
this.Badge = "2";
}
`
Random Crash on Android after receiving push notification
Hi
Have a bug I have been trying to fix on and off for few weeks.
Have a forms app (using 2.3.3 193, but have tried 2.3.4.192-pre 2 and nightly builds)
Launching app in release (debug is ok) and navigating around the UI app is fine and stable, upon receiving a data push notification, app creates a local push notification so user can click on it. Continue to click happy around UI no problems. Click on local notification, which just re-launches the MainActivity (have removed all code to process the push), app appears ok, click around the app and at a random point, sometime opening a modal screen (3 or 4 times closing each time), sometimes scrolling a list, or pulling to refresh i get a crash
Clicking on local push seems to be only reliable way to reproduce it, if i background the app and bring back to foreground its fine.
caused.AggregateException(s)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw():0
Java.Interop.JniEnvironment.InstanceMethods.CallIntMethod(JniObjectReference instance, JniMethodInfo method):0
Android.Runtime.JNIEnv.CallIntMethod(IntPtr jobject, IntPtr jmethod):0
Android.Support.V4.App.FragmentTransactionInvoker.CommitAllowingStateLoss()<27c17fe440cf491ba8255bcefade6e02>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.SwitchContentAsync(Page page, bool animated, bool removed, bool popToRoot)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnPushAsync(Page view, bool animated)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.PushViewAsync(Page page, bool animated)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnElementChanged(ElementChangedEventArgs e)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.VisualElementRenderer.SetElement(TElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.VisualElementRenderer.SetElement(VisualElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.Platform.CreateRenderer(VisualElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.Platform.ModalContainer.Platform(Context context, Page modal)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.Platform.PresentModal(Page modal, bool animated)<00979a7978ab4144a58919b163f63751>:0
at Xamarin.Forms.Platform.Android.AppCompat.Platform+d__30.MoveNext () [0x0004a] in <00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Application.NavigationImpl.d__3.MoveNext():0
--- End of inner exception stack trace ---
---> (Inner Exception #0) Java.Lang.RuntimeException: Activity has been destroyed
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw():0
Java.Interop.JniEnvironment.InstanceMethods.CallIntMethod(JniObjectReference instance, JniMethodInfo method):0
Android.Runtime.JNIEnv.CallIntMethod(IntPtr jobject, IntPtr jmethod):0
Android.Support.V4.App.FragmentTransactionInvoker.CommitAllowingStateLoss()<27c17fe440cf491ba8255bcefade6e02>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.SwitchContentAsync(Page page, bool animated, bool removed, bool popToRoot)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnPushAsync(Page view, bool animated)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.PushViewAsync(Page page, bool animated)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.OnElementChanged(ElementChangedEventArgs e)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.VisualElementRenderer.SetElement(TElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.VisualElementRenderer.SetElement(VisualElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.Platform.CreateRenderer(VisualElement element)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.Platform.ModalContainer.Platform(Context context, Page modal)<00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Platform.Android.AppCompat.Platform.PresentModal(Page modal, bool animated)<00979a7978ab4144a58919b163f63751>:0
at Xamarin.Forms.Platform.Android.AppCompat.Platform+d__30.MoveNext () [0x0004a] in <00979a7978ab4144a58919b163f63751>:0
Xamarin.Forms.Application.NavigationImpl.d__3.MoveNext():0
Thought is was related to this https://bugzilla.xamarin.com/show_bug.cgi?id=36907 similar stack trace but no code is within OnResume.
This one looks similar too https://bugzilla.xamarin.com/show_bug.cgi?id=47367, but have tried all variations of xamarin forms, even though its supposed to be fixed in Forms 2.3.4.192-pre2, no joy
Any pointers would be appreciated.
Thanks
Neil
GooglePlayServices.Auth for Android in Xamarin.Forms
Hi.
I'm really struggling with this using the new Xamarin plugins from Nuget for Authentication via GooglePlayServices.
Found a great example on YouTube by JoeRock () where he works through how to do this in Xamarin, but his first few steps use the old Plus API and old builder, and for me (using the new builder and GoogleSignInAPI), the Connection never results in anything usable. Indeed I question whether a signin has actually occurred just because connect() has "success"...
I find that OnConnected() is called, but contains nothing of use. How do I get the signed in account from the connectionResult if I can't use the PlusClass? I tried a SilentSignIn inside OnConnected(), but again, it returns an unsuccessful result.
OnConnectionFailed() never gets called, so I never have a Resolution object to use to launch a sign in intent.
And if I try it the other way, by create an intent manually and try to use it to sign in, then it always results in Canceled.
What is the relationship between Connect() and creating an intent for sign-in?
This was so easy to make work on Xamarin for iOS.
I am starting to question whether this is possible using the new APIs.
Surely someone else out there must've tried this? Or are you all still using the deprecated APIs?
Has anyone else tried and failed?