I have a Xamarin Forms app and I am adding an AppWidget to the native Android Xamarin project to give users a widget which they can pin on their home screen and use to interact. The Xamarin Forms app stores state in
Application.Current.Properties["MyId"]
How can I access this from the native Android Xamarin code, since Application is in the Xamarin.Forms namespace?
To access Application.Properties from projects native like Android or iOS. Please use the simple code snippet
var myId = Xamarin.Forms.Application.Current.Properties["Id"];
Related
I am very new to xamarin platform, created PCL App for IOS and Android.
I will be using Esri SDK for Xamarin.
I have started with xamarin forms.
Is it possible to use Esri SDK with PCL(Xamarin Forms) or do i have to create a Shared project?
Is there a separate iOS and android Xamarin SDK ?
Please advice, i am looking for proper solution....
Thanks in advance
Are there any other way to create Android Application except Xamarin.Forms ?
There is a remark
"The equivalent app written with Xamarin.Forms is called Todo."
at https://github.com/xamarin/mobile-samples/tree/master/TaskyPortable.
So, which application type present at this link?
You can use the Xamarin Native to develop the Android Application. Here is the link to get started with the Xamarin Native with Android: https://developer.xamarin.com/guides/android/getting_started/
And you can also use the Xamarin.Forms Portable and Shared for the Android, iOS, UWP, Windows Phone 8/8.1 and Windows 8.1 application development.
Thank You.
I have a UWP, Xamarin forms sample from http://thatcsharpguy.com/post/xamarin-forms-uwp/
I am trying to add prism by changing the app to a PrismApplication and can't figure out how to call Xamarin.Forms.Forms.Init(e); before the app class constructor call.
I get a {"You MUST call Xamarin.Forms.Init(); prior to using it."}.
Where can I call this?
I'm not sure exactly what you are doing because you haven't provided any code, but you don't have to do anything special to the UWP app. Set the UWP app up like a normal Xamarin Forms application. The only place you will modify is the Xamarin Forms PCL project. To make it easy, just use the Prism Template Pack from the visual studio gallery. Create a new Xamarin Forms Prism application and everything will be hooked up for you.
https://visualstudiogallery.msdn.microsoft.com/e7b6bde2-ba59-43dd-9d14-58409940ffa0
I have developed an app/component using Xamarin.Forms and as per the requirement I need to integrate that component with another app which is developed on Xamarin Native in Android as well as iOS.
Kindly help me with the suggestions or references
I've seen something like that on a sample called Native2Forms.
What it does, at least in Android, is to use a separete activity to integrate the Xamarin Forms PCL (FormsActivity).
I have a Xamarin iOS unified app.
I want to add a Xamarin form to it.
How can I do this?
Thanks,
Kaustubh
-You can not do it directly.
-Create a Xamarin PCL project, it will create a shared project and native projects to iOS and Android
-You can add you Xamarin native project, necessary files to it
-Create a page renderer in Xamarin Forms Shared project
-Use it to load required page from native project
-Page renderer will act as a native page.You can call your native functions, UI from that point onwards.
Xamarin forms is a kind of project, not a form you can add to a project that is not xamarin forms
You can just add a new project of type Xamarin.Forms in your solution and you'll then have to port your code or share as much as possible through a PCL.
Source and reference : developer.xamarin.com/guides/cross-platform/xamarin-forms/
[Edited to take comments into accounts]