May I ask about is that I missing any assembly references?
I not understand the error.
Thank You.
Missing References Azure Blob
How to open PDF in xamarin.forms?
How to open PDF in xamarin.forms?
Equivalent of Console.WriteLine
Probably a n00b question: what is the equivalent of Console.WriteLine in Xamarin.Forms (in the shared code)? I see no reason why Console.WriteLine is disabled in the shared code as iOS, Android, and presumably WP can call Console.WriteLine.
Use case: I want to print some stuff in Application Output.
How can I use Xam.Plugin.Geolocator's PositionChanged event and StartListening to update location
I want to be able to update the coordinates.
Logging with Xamarin PCL
I'd like to incorporate some logging into my Xamarin app, and I'm having trouble understanding the options available and how best to leverage them. I've seen examples that use System.Console and System.Diagnostics to write log messages that appear in the Application Output window in Xamarin Studio when debugging. However those classes don't appear to be available from within a PCL project. Am I missing something or do I have to roll my own cross-platform Console abstraction?
It's also not clear to me what relationship, if any, Console logging has with the native logging implementations. On iOS NSLog and asl_log are available to write to the system log. On android there is android.util.Log. Is there a cross platform logging framework available that can write to the appropriate platform-specific API?
PushAsync is not supported globally on iOS, please use a NavigationPage.
I created a Xamarin.Forms Shared project referencing to the MobileCRM from the samples site
and when i tried to navigate to another page in iOS
it show me this error:
"System.InvalidOperationException: PushAsync is not supported globally on iOS, please use a NavigationPage."
and here is my code snippet:
Button button2 = new Button
{
Text = " Go to Image Demo Page ",
Font = Font.SystemFontOfSize(NamedSize.Large),
BorderWidth = 1
};
button2.Clicked += async (sender, args) =>
await Navigation.PushAsync(new ImageDemoPage());
How to refresh the app database silently ?
How to refresh the app database silently?
How to approach push notifications on Xamarin.Forms project?
So we are working on a pcl project and have our UI set in a page inside the PCL. There is a scenario where our client wants some information to be sent as a push notification. We already have our UI in place and our backend too. We are using Azure to store data and have successfully configured WAMS. However we are scratching head on how to make push notifications work on Android without creating a separate page layout / controls that are android specific.
tl;dr - how do we use the PCL page UI elements to trigger push notifications on an Android device?
Playing audio files in xamarin forms
Hi,
Can anyone tried to play audio files in the application using xamarin forms.If so please show me a way to implement this.
Thanks ,
sunil
Page is not scrolling when keyboard comes in android.
In xamarin forms I build a content page which has login and password entry with a login button. When user click on login entry keyboard comes and focus goes to entry field. Down the login entry password entry is visible but login button is hide behind keyboard. Now user is not able to scroll the view to get keyboard. So when keyboard comes page is not scrolling. I used stack layout inside scrollview. The issue is coming only in android.
MessagingCenter.Subscribe Multiple Call
I found my code Multiple call ,anyone who can help me find the reason
MessagingCenter.Subscribe<SelectCitiesViewModel,string> (this, "Province", (sender, arg) => {
Province = arg;
MessagingCenter.Send (this, "Dismiss", sender);
});
static int i;
MessagingCenter.Subscribe<CityViewModel> (this, "Dismiss", (sender) => {
Navigation.RemovePage (this);
Debug.WriteLine (sender.city_name + "excuted" + (i++));
});
Here is the Application Output
2015-03-21 11:18:03.199 TescarManage.iOS[7332:466564] 重庆excuted0
重庆excuted0
2015-03-21 11:18:17.073 TescarManage.iOS[7332:466564] 北京excuted1
北京excuted1
2015-03-21 11:18:17.075 TescarManage.iOS[7332:466564] 北京excuted2
北京excuted2
2015-03-21 11:18:17.077 TescarManage.iOS[7332:466564] 北京excuted3
北京excuted3
2015-03-21 11:18:29.434 TescarManage.iOS[7332:466564] 随州excuted4
随州excuted4
2015-03-21 11:18:29.435 TescarManage.iOS[7332:466564] 随州excuted5
随州excuted5
2015-03-21 11:18:29.436 TescarManage.iOS[7332:466564] 随州excuted6
随州excuted6
2015-03-21 11:18:29.437 TescarManage.iOS[7332:466564] 随州excuted7
随州excuted7
2015-03-21 11:18:29.438 TescarManage.iOS[7332:466564] 随州excuted8
随州excuted8
2015-03-21 11:18:29.439 TescarManage.iOS[7332:466564] 随州excuted9
随州excuted9
2015-03-21 11:18:39.810 TescarManage.iOS[7332:466564] 黔西南excuted10
黔西南excuted10
2015-03-21 11:18:39.811 TescarManage.iOS[7332:466564] 黔西南excuted11
黔西南excuted11
2015-03-21 11:18:39.811 TescarManage.iOS[7332:466564] 黔西南excuted12
黔西南excuted12
2015-03-21 11:18:39.812 TescarManage.iOS[7332:466564] 黔西南excuted13
黔西南excuted13
2015-03-21 11:18:39.813 TescarManage.iOS[7332:466564] 黔西南excuted14
黔西南excuted14
2015-03-21 11:18:39.813 TescarManage.iOS[7332:466564] 黔西南excuted15
黔西南excuted15
2015-03-21 11:18:39.814 TescarManage.iOS[7332:466564] 黔西南excuted16
黔西南excuted16
2015-03-21 11:18:39.815 TescarManage.iOS[7332:466564] 黔西南excuted17
黔西南excuted17
2015-03-21 11:18:39.816 TescarManage.iOS[7332:466564] 黔西南excuted18
黔西南excuted18
2015-03-21 11:18:39.817 TescarManage.iOS[7332:466564] 黔西南excuted19
黔西南excuted19
Error: Creating package
\Vijay\XamarinComponent\xAPIWrapper\component>xamarin-component.exe package
INFO (package): Found projects to build...
Running C:\Program Files (x86)\MSBuild\14.0\bin\amd64\msbuild.exe "/p:Configuration=Release" "D:\Vijay\XamarinComponent\xAPIWrapper\component\samples\TinCan.xAPIWrapper.sln"...
Running C:\Program Files (x86)\MSBuild\14.0\bin\amd64\msbuild.exe "/p:Configuration=Release" "D:\Vijay\XamarinComponent\xAPIWrapper\samples\TinCan.xAPIWrapper.sln"...
Command failed! Error output follows...
How to add Tags to "Push Notification" Azure notification Hub
Hi
I need to add tags, after the user has logged in. (AD groups as tags)
I know that there are many articles that discuss the same.
This is called when you install the App.
protected override void OnRegistered(Context context, string registrationId)
{
Log.Verbose(MyBroadcastReceiver.TAG, "GCM Registered: " + registrationId);
RegistrationID = registrationId;createNotification("PushHandlerService-GCM Registered...", "The device has been Registered!"); Hub = new NotificationHub(Constants.NotificationHubName, Constants.ListenConnectionString, context); try { Hub.UnregisterAll(registrationId); } catch (Exception ex) { Log.Error(MyBroadcastReceiver.TAG, ex.Message); } //var tags = new List<string>() { "falcons" }; // create tags if you want var tags = new List<string>() {}; try { var hubRegistration = Hub.Register(registrationId, tags.ToArray()); } catch (Exception ex) { Log.Error(MyBroadcastReceiver.TAG, ex.Message); }
}
Of course I've tried to make a small public function that does the same, but the context, causes problems.
So it is possible to update this registration or do anything else.
Best regards Christian Lyck
IMAGE CROP and RESIZE in Xamarin Forms
Need to implement image resizing and cropping in Xamarin Forms
Copy .app file after build
Hey!
I've got a question concerning the build process of iOS.
Is there a way to get the .app file (from Mac) to my build server?
Currently the build process copies an .app file but it's always empty (size of 0KB)
I'm currently building via Jenkins and would like to store the .app file after the build.
Get image of map on android
I'm using Xamarin.Forms.GoogleMaps to show a map on iOS and android. I'm trying to screenshot the map to get an image of it. On iOS this works fine, but on android, the screenshot image is a black box. I believe this is because the map on android is rendered in OpenGL. Google maps has a screenshot() method but that doesn't seem to be available in Xamarin.Forms.GoogleMaps. I've looked into Google's static map API, but that won't work for what I'm doing. How can I get an image from a map on android?
InApp-Billing
Hey folks,
as I'm taking huge steps to release our app, I'm now at the point where I have to implement a payment function. And I was curious if anyone here used the InApp-Billing Components from the components store and has a few tips for me.
Since those are platform packages I guess the best way to use them is via DependencyService.
As the instructions from the components are good, maybe someone found a few hints for Forms.
Greetings
ListView long press PCL
Hello everyone.
I need to use or add the LongPress method in my app.
Does anyone have a good example to develop this event?
Separate View and ViewModel in different projects of a solution
Until now we have been working and been very satisfied with the Prism approach for MVVM. Our last large project (WINRT) had analogue to the Adventureworks example, two separate projects (next to some other, but that is irrelevant in this case). One for the Views and one for the Viewmodels. They were "connected" via the ViewModelLocationProvider, that was part of the Prism.Mvvm framework.
Now we have tried to use Prism in a new project and started of with the Prism Template by Brian Lagunas. We notice that Views and Viewmodels are together in the same PCL project. We could not find any substitute for the viewmodellocationprovider.
We want to separate the views from the viewmodels. Two separate teams work on respectively the UI-design in XAML for the views, whereas another team works on the business logic in Viewmodels.
How can the same approach be implemented?
Regards,
Peter
Xamarin.Forms for UWP Preview Now Available
Update
For Xamarin.Forms 2.0, the UWP preview is included in the Xamarin.Forms NuGet package. Be sure to read the directions here to get started:
https://developer.xamarin.com/guides/cross-platform/xamarin-forms/windows/getting-started/universal/
Old thread, do not follow
Many in our community have been asking about Xamarin.Forms for Universal Windows Platform support, and today, we are very happy to bring that request to life. In the past, building apps with Xamarin.Forms required you to create a separate Windows Phone and Store applications, but this preview, available to try today, will enable you to target not only iOS and Android, but also multiple Windows 10 platforms from a single app.
This is your chance to try out the latest-and-greatest in Xamarin.Forms. To help ensure that the next release of Xamarin.Forms is functional, stable, and performant, please let us know about any issues you encounter with the new Xamarin.Forms for UWP preview by filing a bug.
Getting Started
Download and extract the attached zip package that contains the preview NuGet packages. You will have to manually add the folder where the files were extracted to Visual Studio 2015’s NuGet package feed list.
Once you have that setup, you will want to:
Add a new Blank App (Universal Windows) project to your Xamarin.Forms solutions
Ensure the new project is configured to build and deploy in the configuration manager
- Add the Xamarin.Forms nuget packages to the newly created project
- Update Xamarin.Forms NuGets in the other projects, and
- Configure the application by making the following changes to your UWP project code
Update App.xaml.cs
In OnLaunched under:
rootFrame.NavigationFailed += OnNavigationFailed;
Add:
Xamarin.Forms.Forms.Init (e);
Update MainPage.xaml
Remove all contents from page.
Add new xmlns of:
xmlns:forms="using:Xamarin.Forms.Platform.WinRT"
Update root to:
<forms:WindowsPage
...>
</forms:WindowsPage>
Update MainPage.xaml.cs
public sealed partial class MainPage
{
public MainPage()
{
InitializeComponent();
LoadApplication (new YOUR_NAMESPACE.App());
}
}
Reference Your PCL/Shared Project
Don’t forget to add your reference to your portable class library or shared project where your Xamarin.Forms logic resides.
Known Issues
The look of some views/pages is not yet finalized.
There are a couple known crashers around navigation.
- Text alignment may not be perfect in some titles.
- Some things still use the older UAP naming. These will change to UWP.
We can’t wait to get your feedback!