Edit: Maps was not the problem, it's the forms itself as well.
In our app we are using Xamarin.Forms, and we used to use version 2.3.4.270 which was working fine. However, after updating to the current latest version 2.4.0.18342 and cleaning the solution, we just see a white screen without any exception. Note that not even a part of the actual layout is rendered at all. No code is changed.
This problem is on an Android device, iOS is working properly.
According to the release notes, there is nothing actually changed a lot in the Forms itself:
https://developer.xamarin.com/releases/xamarin-forms/xamarin-forms-2.4/2.4.0-stable/
Did Xamarin change something important in their switch from 2.3 to 2.4 that I am missing out here?
The white screen appears if you did not provide an API key, or if it not valid. Since your iOS project is working fine, my suggestion will be to check your declaration of API key for android.
https://developer.xamarin.com/guides/xamarin-forms/user-interface/map/#Android
Well the problem was that we were using MvvmCross, this caused several problems in our project so we decided to switch to another framework.
Related
I read through the scene understanding SDK overview by Microsoft and was trying to deploy its sample app. I followed through the instructions here, and everything got built and deployed successfully to my Hololens2. However, when I was trying out the application on my Hololens2, there is 1 major problem: The menu doesn't render smoothly, it seems to be continuously covered by black blocks. Neither does the virtual representation renders smoothly, everything seems to lag. It should be looking something like this from Microsoft's documentation.
I have seen this post but not sure if the problem is similar. May I ask if anyone has successfully used the scene understanding sample app and has any idea what caused the issue?
I believe you have followed these steps to create app package and deploy on your Hololens 2: Running on HoloLens 2.
To solve your issue that unsmooth scene objects rendering experience, you can create a ARM64 Release package instead of Debug one. Then you will find the issue will disappear and rendering will be smooth. The main reason is the debug mode build will have additional performance consumption. See the seventh point in this doc.
Verified on HoloLens 2 with the latest 21H1 OS (10.0.20346.1002)
So, I'm a C++ developer poking around into C#/Xamarin (did some Silverlight back a while ago.) I'm using VS 2017, the released version. I think that the preview is acting the same.
If I try to make changes to the main (porable) project versions the XAML files, I don't get a functional form previewer, it wants to use the live viewer simulating either Android or iOS. That's a lot slower and less convenient that just previewing the layout as I go, with alignment bars and all that. I do get the form previewer if I make changes in the UWP sub-project, but of course those then don't show up.
Also, if I edit the portable XAML I get no error checking. If I edit the UWP XAML I get error checking, but that's useless for the same reason.
So that all just doesn't make sense to me. Am I missing something? Why pre-generate the dups to begin with since we shouldn't need them other than for platform specific stuff, and why do the tools not work on the ones that we have to actually use?
These issues were taken care of, as best I can tell, in preview 5, though with some fiddling about. I get intellisense and error reporting in the portable (Xamarin specific I guess) Xaml files. The new live viewer isn't as nice as the UWP/Forms one that was in the tab and provided alignment and all that. Hopefully they will get that applied to the Xamarin specific XAML files.
I am trying to write a Xamarin.Forms-based app for playing music. I am using the standard Xamarin Forms Dependency Service pattern to create a platform-specific player for iOS which uses the MPMusicPlayerController as documented by Xamarin. When I write the code the MPMusicPlayerController.NowPlayItem property is accessible;
and when I first tested it everything worked OK. I then started trying to listen to notifications from the MPMusicPlayerController and it 'disappeared'; when I debug, the property is missing and when I try to access it I get a deep mono SIGSEGV exception;
Quite often the debugger tries to reference the property and also crashes. So; I took out the notifications and it still happens!
I recreated the part of the code causing the problem in Xcode and Objective C. Though looking at the Device log in Xcode after running and crashing from Xamarin would have shown the problem as well.
More recent versions of iOS expect an Info.plist entry; Privacy - Apple Music Usage Description to be provided for anything that accesses the Media Library. Interestingly it seems that playback is allowed and it feels like the NowPlayingItem property shouldn't be allowed but somehow, sometimes is.
In the end, I found I had to put the plist entry in and also had to check for and sometimes ask for authorisation as in this post.
Once I had done both of these, the NowPlayingItem property works and I get notifications.
I'm beginner developer of cordova/phonegap.
I created a simple app and added wp8 platform. This created a Visual Studio project.
Opening this project, I can change orientation for all screens of the app (on MainPage.xaml file). Then, I changed this line, portrait only:
SupportedOrientations="Portrait" Orientation="Portrait"
Works fine, but I need force landscape orientation for a specific page. Before import to Visual Studio, I tried all imaginable plugins (phonegap), but don't work for me.
The question is: how force screen orientation (only specific page)?
Unfortunately, there is currently no way to do it dynamically without writing the plugin by yourself. There is though quite a ready plugin by GitHub user yoik which you can extend to include the Windows Phone 8. The code to include support for WP8 isn't probably that difficult to code and here seems to instructions for that.
Just to conclude this case
To use static locking for certain orientation, you can add
SupportedOrientations="Landscape" Orientation="Landscape"
to mainPage.xaml in case you are using CLI and if you are using PhoneGap Build you need to add
<preference name="orientation" value="landscape" />
To dynamically lock certain orientation, you need to have a plugin to do that. This plugin already exists for iOS and Android but it is missing port for Windows Phone 8 for some reason.
Even though this doesn't solve your problem exactly, it is the best answer you probably can get to this problem.
Update
As I already told in my monolog on comments, I decided to try to port it for WP8. I forked it on GitHub and it now compiles successfully. Unfortunately I don't have the opportunity to test it's correct functioning instantly but I'll do that ASAP. The fork can be found here.
Update 2
After spending few days on this topic. I finally got to test the implementation and it seemed somewhat promising. I created a pull request for the original project. Until it is merged, feel free to use the forked version. In case you find any problems, don't hesitate to contact me!
I am working with MvvmCross Monotouch.
Here is the Binding Code that actually works very well on the iOS Simulator.
{ this, "{'Title':{'Path':'NavigationBarTitle'}}
However, it does not work when I deploy it on my real iPad (iPad 2).
Application Output:
===================
MvxBind: Warning: 0.69 Failed to create target binding for from NavigationBarTitle to Title
I am glad to see it works on the iOS Simulator but, is there any reason why it does not work on the real iPad?
Patrick
One situation I've seen this type of error occur in is in release builds where the monotouch linker optimises the image size and removes the apparently unused property required for binding.
To workaround this, I generally include a fake bit of code to trick the linker into including the required properties - e.g. Here's a monodroid sample file which does the same sort of thing:
https://github.com/slodge/MvvmCross/blob/master/Sample%20-%20BestSellers/BestSellers/BestSellers.Droid/LinkerIncludePlease.cs
This is one of the disadvantages of using mvvmcross currently - it can lead to larger binary image sizes.