Import vcard in Windows Phone device - windows-phone-8

The short question is how to import a contact with three emails into windows phone ?
More detailed: I have bellow vcard (.vcf) file
BEGIN:VCARD
VERSION:3.0
N;CHARSET=utf-8:;Byron
FN;CHARSET=UTF-8:Byron
UID;CHARSET=UTF-8:Byron
TEL;TYPE=CELL:111
TEL;TYPE=CELL:2222
TEL;TYPE=HOME:33333
TEL;TYPE=HOME:44444
TEL;TYPE=WORK:555555
TEL;TYPE=WORK:66666
TEL;TYPE=COMPANY:7777
TEL;TYPE=PAGER:88888
TEL;TYPE=HOME;TYPE=FAX:99999
TEL;TYPE=WORK;TYPE=FAX:1010101010101010101010
EMAIL;TYPE=PERSONAL:byrPersonal#gmail.com
EMAIL;TYPE=WORK:byrWork#gmail.com
EMAIL;TYPE=OTHER:otherByron#gmail.com
REV:6/6/2014 4:56:01 am
END:VCARD
I am using ContactInformation.ParseVcardAsync method and then saving with phoneContact.SaveAsync method. I can import the contacts in both the emulator and the device. My problem is i can't get all emails in the device. The last email EMAIL;TYPE=OTHER:otherByron#gmail.com is not visible in the device but it is visible in the emulator.
OS Version emulator:8.0.9903.10
OS Version device: 8.0.10521.155
Any help?

Related

Wi-Fi Direct in Windows Phone 8.1

According to documentation:
https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.wifidirect.wifidirectdevice.aspx
it should be available on 8.1 store and it is, the problem is that each time it code below returns 0. Code taken from msdn example for Windows 8.
String deviceSelector = Windows.Devices.WiFiDirect.WiFiDirectDevice.GetDeviceSelector();
var devInfoCollection = await Windows.Devices.Enumeration.DeviceInformation.FindAllAsync(deviceSelector);
Anyone knows if WiFi Direct is actually supported on Windows Phone?
Thanks

How to get the Application Process ID in Windows Phone 8.1 Store Apps

I am developing a Windows Phone 8.1 Application and there is a need to get the Application Process ID from code. Any API with which I can get that?
You can use GetCurrentProcess followed by DuplicateHandle (and later CloseHandle) but I'm curious what you need it for... there's not much you can do with it in a Store app so maybe this won't complete your scenario.
Finally got the solution.
The Dll's for Desktop apps and Phone apps are different though the function names will be same.
When tried to import Kernal.dll lib in WIn Phone 8.1 and used p/invoke code, an exception, DllNotFoundException will be thrown. Instead in Win Phone 8.1 instead use "api-ms-win-core-processthreads-l1-1-1.dll"
To get the process ID in Win Phone 8.1 :
1)Create binding to WIN32 lib:
[DllImport("api-ms-win-core-processthreads-l1-1-1.dll", CharSet = CharSet.Unicode, ExactSpelling = false, PreserveSig = true)]
internal static extern uint GetCurrentProcessId();
2)Call the function:
uint id= GetCurrentProcessId();
For the complete set of Win Phone 8 supported API's see the MSDN link:
https://msdn.microsoft.com/library/windows/apps/jj662956(v=vs.105).aspx#BKMK_ListofsupportedWin32APIs

Error 0X800455BC when creating a SpeechRecognizer object on Windows Phone 8.0?

My Lumia 820 is running Windows Phone 8.0. My Lumia 520 is running Windows Phone 8.1 developer preview. Speech reco works fine on the Lumia 520, but with the 820 I get a System.Exception with an HRESULT code of 0x800455BC. I did some research and that error is supposed to be localization related. It happens when the language your phone is set to is not supported by the speech recognizer:
Exception HRESULT: 0x800455BC in speech recongnition in Windows phone 8
Except I am not getting the same call stack as what that page shows. Also, the solution offered on that page says I should set my recognizer to the desired language explicitly. But that's a problem since I get the error when I create the recognizer. Since I can't create it, I can't set the language. Other people get the error when they try to do a speech recognition session.
Note, I definitely have enabled speech recognition via the phone settings, even allowing it when the phone is locked. Have any of you seen this and know what to do about it? I get the error right when I try to construct the SpeechRecognizer object:
// Create the recognition engine.
this.SpeechRecognizerObj = new SpeechRecognizer();

Windows Phone 8 Emulator returning Redmond location only

I am using the following code
Geolocator myGeolocator = new Geolocator
{
DesiredAccuracy = PositionAccuracy.High
};
Geoposition myGeoposition = await myGeolocator.GetGeopositionAsync();
Geocoordinate myGeocoordinate = myGeoposition.Coordinate;
while running the simulator each time i get the location as Redmond, is this a bug, if yes then how can we get rid out of it?
There is location sensor simulator available for Windows Phone emulator (both 7.5 and 8): How to test apps that use location data for Windows Phone.
It looks like that:
You can set current phone location to anything you want using that tool. IT also allows you to record paths and playing recorded paths.
To open it click Additional Tools button - the last one within emulator toolbar. It's hovered to yellow on photo below.

Detect Windows Phone 8 in browser

This link claims that Windows Phone 8 devices will get a unique user agent string that specifies both "Windows Phone 8" and "MSIE 10.0". However in my tests of two production WP8 devices (Nokia Lumia 920 and an HTC 8x) both continue to report IE 9 and Windows Phone OS 7.5.
Does anyone know what's going on?
Edit: A friend suggested that this might have to do with incorrect doc-types on the html page, but that doesn't make sense to me since I'm detecting this user agent in the OnActionExecuting event in an ASP.net MVC site (I haven't returned a doctype to the user at this point).
Edit 2: This website will be running inside a webbrowser control in a Xaml application, instead of natively in a browser, should that make any difference.
My code was executing inside a WP7 XAML application and the WebBrowser control. You have to upgrade your app to WP8 if you want to get the updated browser in your app.
I can not meet your problem.
my htc 8x's ua is :
Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; HTC;Windows Phone 8X by HTC)
this website can detect your useragent.
http://whatsmyuseragent.com/
function isIEMobile() {
var regExp = new RegExp("IEMobile", "i");
return navigator.userAgent.match(regExp);
}