BingMapsDirectionsTask on device with WP 7.8 - windows-phone-7

I've problem with using BingMapsDirectionsTask on device with Windows Phone 7.8 and set polish language (pl-PL). In my app I'm trying to call:
var bingMapsDirectionsTask = new BingMapsDirectionsTask();
var destination = new LabeledMapLocation(dest.Name, dest.LocationItem);
bingMapsDirectionsTask.End = destination;
bingMapsDirectionsTask.Show();
When I change device location to other culture, for example en-US the same code works correctly, so I can assume that my code is ok.
I've found some info in Internet about similar problems with other non en cultures. The main workaround based on temporary changing application culture info to en-US:
http://www.apeoholic.se/post/How-to-use-BingMapsDirectionsTask.aspx
http://grenangen.se/node/71
Unfortunately this approach doesn't work with set pl-PL main culture on device. Do you have any suggestions how can I resolve this problem and run Bing maps to show direction to my point?

I can confirm the same behavior with el-GR (Greek) device language. Your code is obviously OK. This is a bug of BingMapsDirectionsTask. Unfortunately it is present even if destination is given in GeoLocation form. Currently there seems to be no way of bypassing this bug.

Related

Cannot save name field in contact book in Oxygen OS 11

I have been trying to save contact into contact book via the following code,
Intent intent = new Intent(Intent.ACTION_INSERT);
intent.putExtra(ContactContracts.Intents.NAME, "Ryan");
While the above code works perfectly on most of the devices but not working in Oxygen OS 11 One plus devices. The name field comes empty while saving while other fields are inserted properly
The code works fine on Android 11 emulator and the issue seems to be specific to Oxygen OS 11.
I assume they replaced the accepted "key" for name field in ContactsContract class.
For anyone still looking for an answer,
I tried changing the key, it does not work.
What worked for me is either opening google contacts / adding contact directly via content provider.

Visual Studio 2015 won't display local web page (ms-appx ?)

I'm converting an app to run as a Universal Windows App using VS 2015 Community. If I create a webview using the toolbox, I can enter "http://www.google.com" into the Source property, and it will display google.
If I use the drop down on the Source property to reference (say) Help.htm as a local resource, the source windows displays "ms-appx:///Help.htm". Similarly if it is in Assets, it displays "ms-appx:///Assets/Help.htm". When I run the program, where the webview should appear it displays "You will need a new app to display this ms-appx" and invites me to search the store.
I can display a local image in an image box with very similar syntax, with Source being "ms-appx:///Assets/StoreLogo.png". The Source property in this case is in the "common" group, not "miscellaneous", but apart from that appears virtually identical.
Nor can I specify a local path in a URI (although again I can display Google). Behaviour is identical on two different machines. I have spent several days trying to work out what is going on; any suggestions?
Can you please try to load file through code and share results?
public MainPage()
{
this.InitializeComponent();
mywebview.Source = newUri("ms-appx-web:///Help.htm");
}
also try this
mywebview.Navigate(newUri("ms-appx-web:///Help.htm"));
If both above options doesn't work. Please change to below and share results
mywebview.NavigateToString("<Html><Body><h1>Eureka!!!!<h1><Body></Html>");
If you are using it from a Library project, you must also add the name of the library, like that:
ms-appx-web:///[Library]/Help.htm

URL Scheme: what kind of string results

I'm using Marmalade to develop iOS applications via VisualStudio and a PC. The integration of a social feature like HeyZap needs its initialization by the use of:
loadHeyzap("YOUR_APP_ID_HERE","YOUR_APP_URL_HERE", true);
App_ID is the ID as defined in the itunes app page (I got it).
App_URL "should also similarly be replaced with your URL scheme for the iPhone" [from the HeyZap integration doc].
Well, the HeyZap help desk weren't useful to obtain this string via the use of VisualStudio+PC (in fact, they told me "use XCode+Mac instead...").
Since this is a simple string, I suppose I could obtain it starting from known parameters of my app. I suppose to find inside it something like [app_name]&=other-chars-....
Is there a way to build this string without the use of XCode, just starting from info I already have and putting here and there some special chars?
In other words, is there a standard way to automate the build of this string without the neeed to do it via XCode? I wonder to prepare a function in which I would pass my app parameters and I got the URL Scheme string as a result.
Cheers,
Zapp
The answer by Creator is incorrect. A URL schema is how apps can communicate with each other in iOS.
Here is what Apple has to say
http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899
An example would be:
yourgame://
Here's how you would define one in XCode
When you define a URL schema in XCode, you can call that URL from Safari or any app installed on the device and it will switch to your game.
The way you define it in XCode is by going to your project settings, clicking the Info tab at the top, going to the bottom where it says "URL Types", expand that, and click the + button at the bottom. Then define both the identifier and the URL schemes with something reasonably unique like "yourgamename". Done!
http://i.stack.imgur.com/pxEKd.png
URL scheme is most probably the url of your app in App Store. You can obtain it from iTunesConnect. Go to your application and copy the url of View in App Store link. That's the string you wanted ;-)
Let me know if it doesn't work.
Edit:
Well App url worked for me, dunno why its not working for you. If you want to edit the URL scheme, you can do it without using XCode too. You need to include Info.plist file in the mkb settings. You can edit or check the current URL scheme being used by marmalade there. The default plist file is in the s3e folder. Don't know the exact location.

CultureTypes in WP7

Hi I want to access the CultureTypes in Windows Phone. In Silverlight/WPF i can use like this,
CultureInfo[] specificCultures = CultureInfo.GetCultures(CultureTypes.SpecificCultures);
But In Windows Phone it showing an error as "UnKnownEntity" in CultureTypes
Also I want to get the Id of the CurrentCulture. In Silverlight/WPF, i can use like
Thread.CurrentThread.CurrentCulture.LCID
But in Windows Phone it showing an error as "NotFound" in LCID
Could you please anyone can help me?
In Silverlight/WPF i can use like this
You can in WPF, but not in Silverlight. Look at the Silverlight version of the documentation for CultureInfo - there's no GetCultures method. I don't see any way of getting all cultures - just the current culture, current UI culture, and invariant culture. (You can create your own instances by calling the constructor, of course.)
EDIT: You've run into exactly the same problem when trying to get the LCID. You can't just assume everthing from the desktop framework will be available in Silverlight. You need to look at the Silverlight-specific documentation to see what's available (and then check that it's available on Windows Phone 7, too).
You could use T4 generator to generate missing information. I have done this for similiar problem and works great.

WP7 Localization issues from C#

I'm having an issue with the localization in my converters. So, I tried a new project and still have problems.
So, I created a fresh new Silverlight for Windows Phone application (7.0, but 7.1 don't resolve my problem).
I added two resources files: Strings.resx and Strings.fr.resx. This two files have two string property: HelloString and ByeString, all initiated correctly.
Then, I go to the Mainpage.xaml.cs, in the ctor and add the following simple line.
PageTitle.Text = Strings.HelloString;
Whenever I have the emulator or my phone set to English or French, I always got the same strings (Hello).
I tried to rename the file Strings.fr-FR.resx. Still the same issue.
The CurrentUICulture returned from the current thread is correct.
I also tried to force culture on the resource:
Strings.Culture = new System.Globalization.CultureInfo("fr-FR");
Does anyone have an idea?
You don't say that you've set the SupportedCultures for the project. Without this the additional language resource files will never be used.
See http://msdn.microsoft.com/en-us/library/dd941931(v=vs.95).aspx

Resources