100 Recently Updated Windows Phone Interview Questions
Q – 1 Suppose I am trying to detect if an external headset is attached to the phone,can I use Microsoft.Xna.Framework.Audio.Microphone.IsHeadset?
Ans- No. this property is true all the time for the phone
Q – 2 How to show the SIP keyboard in xna app?
Ans- This is not in the CTP, but will be in later builds: Guide.BeginShowKeyboardInput
Q – 3 Explain starting with April CTP Refresh, I can compile and debug my XNA game, but it does not show up in list of applications when I am not launching it on the debugger?
Ans- The games are installed in games hub, which you can’t see in the currently slimmed image. Change the Genre attribute in the App element in WindowsPhoneManifest.xml from App.Games to NormalApp
Q – 4 Suppose when I deployed my XNA app to the xDE, the orientation is in portrait mode, but when I deploy it to a device, it’s in landscape mode.?
Ans- The XNA Framework defaults to landscape mode for Windows Phone games, but XDE doesn’t yet support XNA in landscape mode, so portrait mode is the only option there for now. You can set your orientation preferences by using GraphicsDeviceManager settings (SupportedOrientations, PreferredBackBufferHeight, PreferredBackBufferWidth, etc.
Q – 5 Tell me is it possible to use Custom Pixel Shader in XNA?
Ans- From Shawn Hargreaves blog For this release, there are no programmable shaders: “Instead of programmable shaders, we augmented the existing BasicEffect with four new configurable effects: SkinnedEffect, EnvironmentMapEffect, DualTextureEffect, and AlphaTestEffect.
These are designed to run efficiently on the mobile GPU hardware, and I think do a good job of providing enough flexibility for developers to create awesome looking games, while also meeting our goals of being able to ship a robust and well tested product on schedule.”
Q – 6 Tell me are there canned MVVM “Data Behaviors” planned for WP7?
Ans- Not at this time. The behaviors have dependencies in Silverlight 4.
Q – 7 Suppose Have a very simple application that uses the APplicationBar. The app bar shows one menu item when in portrait. However as the second image shows the app bar displays now items in landscape mode. Is that by design or a bug?
Ans- Yes, it’s a known problem in the emulator on machines that don’t support the hardware accelerated graphics in the emulator. It works properly on devices and machines that do
Q – 8 Tell me is it possible to run two instances of emulator on the same machine. I am doing some networking app and need two emulators to test it?
Ans- You can not launch two instances from the Phone tools. You can launch a second instance from command line.
c:Program Files (x86)Microsoft XDE1.0XDE.exe” “C:Program Files (x86)Microsoft SDKsWindowsPhonev7.0EmulationImagesWM70C1.bin”
Q – 9 Suppose I have lost one of the application templates in Visual Studio 2010. It’s available in the file system but not in Visual Studio… Any ideas?
Ans- Try running Devenv /setup.
Running devenv /installvstemplate might also work; but that is going to slow down overall VS performance. The /installvstemplate is a development only option that makes it easy for developer to test their templates. This shouldn’t be used on end user machines. Devenv /setup does a lot of more processing and caching to speed up VS performance.
Q – 10 in the emulator, NetworkInterface.GetIsNetworkAvailable() always return false?
Ans- This is a known bug in MIX CTP and April refresh. Sorry! It will be addressed in next build
Q – 11 Tell me is there a way to know if my code is running on emulator or device?
Ans- Check System.Environment.DeviceType
Q – 12 Can you please explain the best way to detect that I am in design-mode in Expression Blend or Visual Studio?
Ans- DesignerProperties.IsIndesignTool
Q – 13 Tell me in my code the method marked by [OnDeserialized] is never called after deserialization. Is this a known issue?
Ans- The following conditions should be met for a valid OnDeserialized callback:
1. The accessibility of the method should be public. It can also be internal with InternalsVisibleTo provided to the System.Runtime.Serialization assembly.
2. Return type should be void.
3. There should be exactly one parameter which should be of the type StreamingContext.
4. There should be only one of the four callbacks provided on the method.
Q – 14 Tell me is there an API for retrieving information on the files located in the store? I am looking to check when it was last written?
Ans- Try IsolatedStorage.GetLastWriteTime
Q – 15 Tell me where is the best recommended place to store both static and user-specified configuration information?
Ans- You can use the IsolatedStorageSettings.ApplicationSettings.
Q – 16 What happens to IsolatedStorage when app is uninstalled?
Ans- It gets deleted. Content saved to media libary is not deleted on Uninstall
Q – 17 How to manage my Isolated Storage quota?
Ans- You don’t have to. There is no limit
Q – 18 How to deserialize JSON from a rest call?
Ans- Use DataContractJsonSerializer. it is in System.Servicemodel.Web
Q – 19 Tell me is SecureString supported in windows phone?
Ans- No. Securestring is not in Silverlight.
Q – 20 How to access the LiveId credentials a user has entered into the device?
Ans- In this release, the credentials are not available to third party apps. You will need to prompt the user for credentials and manage these within your app.
Q – 21 Suppose I am trying to receive toast notifications in emulator app. I got everything setup but notification does not show up in emulator at all?
Ans- Make sure you have a product / publisher name set in the manifest.
Open WindowsPhonepmanifest.xml, under Properties. Edit Publisher=”” to Publisher=”something”. Redeploy.
Q – 22 On April CTP refresh, Splashscreen appears for 3 seconds and disappears (even if my page is not fully loaded)?
Ans- This is a known issue in April CTP. Should be fixed in later builds
Q – 23 Can we intercept the search button to do an app specific search?
Ans- Not in v1.
Q – 24 Explain where is XmlDocument class?
Ans- Instead of XmlDocument, use XDocument from System.Xml.Linq.dll
Q – 25 Tell me is there any internal page notification that it receives to detect a phone call?
Ans- Not in v1.
Q – 26 Tell me is there a way to detect if application is idle?
Ans- No. You have to do that yourself. yourself (you could subscribe to ManipulationStarted on the root frame with handled=true and then use a simple timer).
Q – 27 How to identify a device or a user?
Ans- Use Microsoft.Phone.Info.UserExtendedProperties.GetValue(“ANID”) in Microsoft.Phone.Info.dll. This is not in the MIX build. How unique is this Id? It identifies the user; so you could have a user with two phones. This is persisted across reboots, but not across factory reset (unless you reconfigure for same user).
Q – 28 Explain does the web browser control share the IE cache?
Ans- No. Each app has its own wininet cache. The webbrowser control instances in your app will use that app’s cache. The IE cache will be separate
Q – 29 Tell me is asp.net forms authentication supported?
Ans- Yes, it should work.
Q – 30 Tell me is WCF supported in Windows Phone?
Ans- WCF is supported on WP7. When you look at the SL3 version of WCF, WP7 supports that except for the following:
► PollingDuplex support
► Runtime code generation support for ChannelFactory.CreateChannel APIs
► Astoria/Azure support
Q – 31 How to sniff network traffic from the emulator?
Ans- Netmon 3.4 (beta) defintitely works. Fiddler works too. If using fiddler, remember to switch it to either trap “non-browser” or “all” traffic and start fiddler before launching the emulator.
Q – 32 Tell me can I write multi-player games using wi-fi or blue tooth in the device.?
Ans- Not in this v1 release.
Q – 33 Tell me are there APIs to read RSS/ATOM feeds?
Ans- You could use System.ServiceModel.Syndication from the desktop since it dependencies are entirely present in CF
Q – 34 Suppose my site is down, and async calls are taking too long to timeout. How can I set a reasonable timeout?
Ans- Per MSDN docs, you should call Abort() on your request when you feel iti s appropriate timeout
Q – 35 Tell me can I open sockets in windows phone?
Ans- Not for this v1 release.
Q – 36 Tell me where is HttpUtility class, since there is no System.Windows.Browser namespace?
Ans- HttpUtility is in System.Net namespace You can also find alternatives for escaping strings at Uri.EscapeDataString and Uri.unescapeDataString ..
Q – 37 How the volume work between apps and hardware buttons on the device?
Ans- Applications get to control the volume for their streams but the hardkeys control the final master output level.
Q – 38 Some images look different when synced to the device and read programmaticaly. do decoders change these?
Ans- No. decoders and apps show them as they are. Zune software does resize them when syncing them, that might be the cause for your differences
Q – 39 How to play two MediaElements at once?
Ans- No. To ensure high quality playback we limit it to one at a time
Q – 40 How to play video in IsolatedStorage using MediaElement?
Ans- For April CTP and earlier builds there is a bug that will prevent you from doing it. Stay tuned for later build. Interim you can play media from network or from your content in the app.
Q – 41 Is .bmp format supported?
Ans- No. Only jpg and png are supported.
Q – 42 Suppose Tried two separate web cams in the emulator and both give COM errors, any clue on getting this to work?
Ans- Camera is not supported on the emulator
Q – 43 I looked through the MediaLibrary class in XNA, and it looks like we can only enumerate through audio, but not video content in the media library?
Ans- That is correct – you can enumerate audio and photos but not video.
Q – 44 What is the Windows Phone Front Page?
Ans- Users can add and order as many categories as they want and two headlines for each category will be displayed on the Front Page.
Q – 45 How to customize Front Page?
Ans- Users can find the Customize option under Settings on the first screen.
Q – 46 Tell me can I reorder the tabs?
Ans- The current version does not allow users to reorder tabs.
Q – 47 Tell me can I turn article photos off?
Ans- Users can disable article photos from the Photos option under Settings.
Q – 48 What content can I share/save?
Ans- a. Users can share content with their friends via the share feature available on every story and photo.
b. Users can save articles, photos and videos to the Saved folder in AP Mobile. The saved folder is on the fourth panel of the first screen
Q – 49 How to send suggestions on how to better the app to the AP?
Ans- Users can send feature requests and feedback to the AP via the Feature Request option in the application. Users can find the feedback options under Settings.
Q – 50 How to edit locations for local?
Ans- Users can customize Local under Settings.
Q – 51 Tell me can I turn off some of my local papers?
Ans- The current version does not allow users to filter local publication.
Q – 52 How to edit location for weather?
Ans- Users can customize Weather under Settings. Locations for Local News and Weather are handled separately. Windows Phone 7 supports international locations.
Q – 53 Tell me can I get weather for my location?
Ans- Windows Phone 7 supports international locations, which a user can search for by inputting the city name.
Q – 54 How to enable/disable alerts?
Ans- Users currently do not have the ability to disable notifications.
Q – 55 How to change language settings?
Ans-
1. Go to the Settings button on your device
2. Select General
3. Select International
4. Choose the desired language
Q – 56 What is Send to AP and who gets it?
Ans- Send to AP is the Associated Press’ way of extending the journalism floor to its users. Users can send in news tips and photos directly to AP editors via the Send to AP option under Settings. User information is solely used for the purpose of contacting the user to verify the tip or to gather more information.
Q – 57 Tell me What are the supported codecs for video?
Ans- Supported Codecs and container formats are listed in MSDN documentation: http://msdn.microsoft.com/en-us/library/ff462087(VS.92).aspx Note: The Device Emulator does not have hardware decoders so the codec support on the device emulator is much less than what is listed. For Emulator you only have WMA, WMV, and VC1 software decoders.
Q – 58 How to get the geolocation data on a picture?
Ans- For v1, we don’t have an API to do this
Q – 59 How to save screen from an XNA app?
Ans- Texture2D has a SaveAsJpeg method and a SaveAsPng method. Be aware that Zune does not sync pngs, so saveasjpeg is recommended
In April’s CTP, you could try:
MediaLibrary library = new MediaLibrary(); library.SavePicture(“My Picture”, streamToJpegData); // You can use this from inside a Silverlight app provided you have the ID_CAP_MEDIALIB capability. // You do have to make sure the Stream you pass in contains JPEG file data, but otherwise it should work for you.
Q – 60 How to save Silverlight UIElements into an image?
Ans- In a later preview, before RTT, WriteableBitmap will have a method to save as JPEG
Q – 61 Can not find PhoneApplicationPage.FullScreen in April CTP?
Ans- SystemTray is an attachable property now. You can use it in your page xaml, something like:
Q – 62 Tell me what happened to TopLevelNavigationService, it is not there on April CTP Refresh?
Ans- It has been removed. You can access the navigation service from any of your current page instances or, use the Navigate method on PhoneApplicationFrame (your RootVisual).
Q – 63 How to detect the resolution of my device?
Ans- (App.Current.RootVisual as FrameworkElement).ActualHeight and (App.Current.RootVisual as FrameworkElement).ActualWidth gives you device’s resolution
If you want to know the visible size (taking AppBar / SystemTray into account) then just ask for it off the page instead.
Q – 64 How to dismiss the SIP programmatically?
Ans- Set the Focus() to some other UIElement that is focusable
Q – 65 I see applications using listbox that show scrollbar only on while scrolling. How can I detect that I am scrolling?
Ans- Microsoft hopes the templates in a future build will have this Scrolling and NotScrolling VisualStates.
Q – 66 Tell me is it temporary that the control styles are included in App.xaml?
Ans- Yes. In the final product a master ‘generic.xaml’ will be injected into your application. This injected dictionary will be based on the theme selected when your app is started. Dictionary is injected every time your app starts.
Q – 67 Explain I am getting too many MouseLeaves on my custom control.?
Ans- As far as the emulator is concerned, there is no mouse; everything comes in as a touch event and when the “finger” comes up, the mouse has left the scene, since there’s no reasonable location for it to be at.
Q – 68 Do you know will Microsoft ship a panorama control with the run-time?
Ans- We are still investigating. We would love to do it, but are constrained on time. Stay tuned.
Q – 69 Suppose I am hitting System.InvalidOperationException in the Navigate method of the WebBrowserControl. What gives?
Ans- Don’t call the navigate method from your PhoneApplication Page’s constructor. you should wait until control is loaded before you Navigate.
Q – 70 Tell me Will TextTrimming property be available on TextBlock?
Ans- No. You have to hack it up with your own measure.
Q – 71 The MarketPlace Launchers overloads for Show has parameters, what are these?
Ans- I assume you are asking about the Context
► In case of Open operation, there is no context.
► In case of Search operation, it is the search Term
► In case of Review operation, no need to pass context. It defaults to the current application’s product id
► In case of Details operation, if you pass null it means current product id, else you can pass some other product id
Q – 72 How to pin an app on the emulator?
Ans- You simply run the application once to deploy it, and then browse to the application list, and click and hold the application icon, you will then get a context menu with the option to pin.
Q – 73 How to detect if my application is exiting so I can save state?
Ans- You can listen to Application.Exit, but this might be too late most of the time. You should listen for the Pause event and save your state there.
Q – 74 How to restart or shutdown my application programmatically?
Ans- There is no API to do this. Hitting ‘back’ when there is only one page left on the stack is the way to exit the application. Hitting Start button does not exit, just pauses it
Q – 75 Can we control the WebBrowser controls zooom?
Ans- No. There is no programatic way to zoom the control. You should include a viewport meta tag to set the initial scale level.
Q – 76 Explain Windows Phone Hardware?
Ans- Windows Phone 7 devices were first produced by Dell, HTC, LG and Samsung. These hardware partners were later joined by Acer, Alcatel, Fujitsu, Toshiba, Nokia, and Chinese OEM ZTE.
Windows Phone 8 devices are currently being produced by HTC, Huawei, Nokia, and Samsung.
At the 2014 Mobile World Congress, Microsoft announced that upcoming Windows Phone 8.1 devices will be manufactured by Gionee, HTC, Huawei, JSR, Karbonn, LG, Lenovo, Longcheer, Micromax, Nokia, Samsung, Xolo, and ZTE. Sony (under the Xperia or Vaio brand) has also stated its intention to produce Windows Phone devices in the near future.
Q – 77 Tell me about Windows Phone Bluetooth?
Ans- Windows Phone supports the following Bluetooth profiles:
Advanced Audio Distribution Profile (A2DP 1.2)
Audio/Video Remote Control Profile (AVRCP 1.3)
Hands Free Profile (HFP 1.5)
Headset Profile (HSP 1.1)
Phone Book Access Profile (PBAP 1.1)
Bluetooth File Transfer (OBEX) (from Windows Phone 7.8)
Windows Phone BTF support is available from Windows Phone 7.8, but is limited to the transferring of pictures, music and videos via a ‘Bluetooth Share’ app.
Q – 78 Explain Windows Phone Multitasking?
Ans- Multitasking in Windows Phone is invoked through long pressing the “back” arrow, which is present on all Windows Phones. Windows Phone 7 uses a card-based task switcher, whereas later versions of Windows Phone utilize true background multitasking.
Q – 79 What do you know about Windows Phone Media support?
Ans- Windows Phone supports WAV, MP3, WMA, AMR, AAC/MP4/M4A/M4B and 3GP/3G2 standards. The video file formats supported on WP include WMV, AVI, MP4/M4V, 3GP/3G2 and MOV (QuickTime) standards.
These supported audio and video formats would be dependent on the codecs contained inside them. It has also been previously reported that the DivX and Xvid codecs within the AVI file format are also playable on WP devices.
Q – 80 Tell us about Windows Phone Web browser?
Ans- Internet Explorer on Windows Phone allows the user to maintain a list of favorite web pages and tiles linking to web pages on the Start screen.
The browser supports up to 6 tabs, which can all load in parallel. Other features include multi-touch gestures, smooth zoom in/out animations, the ability to save pictures that are on web pages, share web pages via email, and support for inline search which allows the user to search for a word or phrase in a web page by typing it.
Tabs are synced with Windows 8.1 devices using Internet Explorer 11.
Q – 81 Tell me about Windows Phone User interface?
Ans- Windows Phone features a user interface based on Microsoft’s Windows Phone design system, codenamed Metro, and was inspired by the user interface in the Zune HD. The home screen, called the “Start screen”, is made up of “Live Tiles”, which have been the inspiration for the Windows 8 live tiles.
Tiles are links to applications, features, functions and individual items (such as contacts, web pages, applications or media items). Users can add, rearrange, or remove tiles. Tiles are dynamic and update in real time – for example, the tile for an email account would display the number of unread messages or a tile could display a live update of the weather. Since Windows Phone 8, live tiles can also be resized to either a small, medium, or large appearance.
Q – 82 Tell me about the Windows Phone?
Ans- Windows Phone (known as WP) is a proprietary smartphone operating system developed by Microsoft. It is the successor to Windows Mobile, although it is incompatible with the earlier platform.
With Windows Phone, Microsoft created a new user interface, featuring a design language named “Modern” (which was formerly known as “Metro”). Unlike its predecessor, it is primarily aimed at the consumer market rather than the enterprise market. It was first launched in October 2010 with Windows Phone 7.