Can we use windows 8 store app in windows phone 8? - windows-8

I have developed windows 8 store app with XAML and c# so can I use the same app in windows phone 8?

No, not directly. Windows 8 and Windows Phone 8 do share a bit of the underlying WinRT layer, but they are not interchangeable. There are ways to maximize reuse of your assets - Portable Class Libraries are a primary mechanism for that - but there are differences in the process lifecycle, storage options, notifications, XAML markup, etc. Of course, the device form factors are also different, so it's likely you'd want to modify the UI even if all of your code were 100% reusable.
Windows Phone and Windows 8 building together on the Windows Phone Dev Center is a good place to go to learn about the platform differences and how best to use your current code investment. Also, check out How to Leverage your Code across WP8 and Windows 8 from BUILD 2012.

Related

Is there any big difference for developing for Windows 8 and Windows 8.1?

I am developing for Windows 8 since before the release of Windows 8.1. My project is targeting Windows 8 devices. As Windows 8.1 is about to hit the market, do I have to change the platform of my project? Can I continue to develop it as it is? How long do I have until I must change?
The short answer is yes, there are quite a few big differences in Windows 8.1 than Windows 8.
One of the biggest ones is the lack of a LayoutAwarePage. Your app will need to accommodate almost any screen sizes and widths, which will mean that you will likely need to do all of your layout using relative spacing instead of absolute spacing (which you should be anyway). There are quite a few other changes, but many of them are tools given to the developer to make things easier or better. You should read them though, as you'll need to make the move eventually
Links thanks to #Xyroid - Migration Windows Store App based on 8.1. does it has backward compatibility with 8?, Resources for Migrating to 8.1 & Upgrading Windows 8 Apps to Windows 8.1 - Channel 9.
The links he has provided are truly top notch. Definitely check out Resources for Migrating to Windows 8 (the second link). It is from Jerry Nixon's blog, and is a great set of resources. Also, the Channel 9 videos from Build 2013 are an amazing set of resources. They will also likely have subtitles in case English is not your preferred language (at least, many Channel 9 Build videos in the past have).
The main changes are also in this blog post http://blogs.windows.com/windows/b/appbuilder/archive/2013/07/24/windows-8-to-windows-8-1-preview-starting-with-the-xaml-templates.aspx

How to simultaneously support Windows Runtime and Desktop component in Windows 8?

I'm really curious is here a way to escape double codebase to support Windows Desktop and WinRT component. Currently, using existing COM objects is blocked in metro style applications. Then, what would be the best way to organize the same functionality for two modes? Can I use WinRT components in Desktop mode?
Let's say I have a legacy calculator server for Windows desktop, implementing an interface ICalculator with a methods Add and Multiply. Is there a legal way to support one server engine for it, besides TCP connection, or I should totally divide these both worlds and supply two sets of engines? What if my server is quite heavy to distribute in two modes?
There is no way to communicate between WinRT and Desktop modes: MSDN 1 and MSDN 2
The only answer with some hope, looks like the one, which cannot be certified.

Launch Windows 8 Nokia Maps

How to use Nokia Maps in Windows 8 Store application ? I used it before in windows phone 8 but I can't find any sdk for Windows 8
There is nothing preventing Nokia from making their Navteq map control similar to their map control in Windows Phone. In the meantime, developers have the Bing map control, which is a Navteq-based map.
If you think about it for a second, Nokia's investment in Phone makes sense that they would spend the time to build a Native Navteq map. In fact their Phone control is shared across apps, literally built into the Phone's core OS. They may not be as motivated to build one for Windows 8. And, and this is serious, their resulting Windows 8 control would NEVER have the same functionality as Phone until it is shipped as a part of the core framework (similar to phone). I hope this makes sense.
Some resources:
More info on the Bing mapping services
http://blog.jerrynixon.com/2012/06/easily-include-bing-map-data-in-your.html
More info on the Bing mapping control
http://blog.jerrynixon.com/2012/10/announcing-windows-8-bing-maps-sdk-is.html
Best of luck!

Getting screenshots of Win CE phone in system through any programming language

I want to get the screen shots of windows CE or windows 7 ,8 phones which are connected to my pc using any programming language.
I know some external tools are availble like mymobiler.But I dont want to use these tools , rather than i wanna develop my own tool same as mymobiler.
Can any one suggest me how we can achieve that....??
You'll need different techniques for each of the different platforms you want to use. This is because they connect to the PC in different ways. WindowsCE typically uses ActiveSync, Windows Phone 7 uses the Zune software and Windows Phone 8 uses something different still.
The way you'd do it with a WinCE device would likely vary depending on the specific device in question. There are, of course, WindowsCE devices which don't even have a screen so you'll need to be careful about clearly defining what devices you are interested in.
With Windows Phone 7 & 8 you'd also need custom ROM images on the devices as the ability to access what is displayed on the screen from a connected PC is not included in the standard image that is included on retail devices. Devices with such images are only available to a very small number of people within Microsoft.
All of this will make it very hard to achieve what you are asking. A different approach, to achieve whatever your ultimate goal is, may be required.

Is there any way to write a WinRt (Metro) app that will also work on Windows 7 and Vista?

We can’t just leave our customers that are not able to upgrade to windows 8 for a long time in the larch. However there is demand for a “tablet”/”touch” version of our app.
So how can we support both touch with Metro on Windows 8 and our current customers from a single code base?
When WPF come out, after a lot of “Pushing” Microsoft saw since and make it work on Windows XP – has anything like this been talked about for WinRT.
(I am not expecting any solution to work on XP, as XP support is being wound down.)
See Also: Can the ARM version of Windows 8 only run Metro (WinRt) style apps?
The best answer is that you do not want the same application to run on Windows 7 and Windows 8 Metro style. The UI that works best for mouse and keyboards (windows 7) will not work well for a touch-first presentation and visa versa. It is important to re-imagine the UI for the two different worlds.
That said, you have 2 options if you want to share a lot of the code:
1) Write it largely in JavaScript/HTML5. This will let you re-use many of the assets (especially the business logic parts).
2) Write it in (desktop) Silverlight. The Silverlight XAML is closest to Windows XAML. WPF is further away and will require more re-work later.
In either case, you should look at and follow the principles used when writing cross-platform code. Understand the platform dependencies and isolate them behind indirection boundaries. You want to localize all of the code that will have to change. For instance, you don't want calls to the .Net System.IO.File APIs which you know will have to change to Windows.System.Storage calls being scattered throughout your code. Instead, you want it localized in one function that can be modified later.
The only way I can think of is to implement your application in HTML5/CSS3/JS, and avoid using WinRT APIs inasmuch as possible - this may be feasible depending on what, exactly, your app needs to do (e.g. portable 2D graphics is easy with HTML5 canvas).
Then, for Win8, you'll package this as Metro web app. For Win7 and below, you write a simple app that embeds your browser of choice (not IE9, since it doesn't work on XP - so Firefox or Chrome) with all chrome hidden, and loads your HTML5 app inside that embedded browser.
As others have noted, you would not want to have exactly the same application working in Win8 Metro and Win7 / Vista Desktop. If you structure your application properly, using a suitabel design pattern, it is possible to share quite a bit of code between the various version that you would require. For the Win8 version, you will be using WinRT, for Win7 / Vista you have a choice of Silverlight or WPF.
I have published a couple of articles that demonsrate how this can be done, they include quite a bit of code as well:
XAMLFinance – A Cross-platform WPF, Silverlight & WP7 Application - while this article does not cover Win8, it does share code from WPF to Windows Phone 7, which is a very similar problem.
TweetSearch – A Cross platform Metro UI WinRT and Silverlight Application - this article shows how to use the same techniques to share code between WinRT and Silverlight
It is unlikely that we'll see Microsoft push the Metro-style
application framework back to past releases due to the level of
re-architecting that went into Windows 8.
I agree with Zac on this point. It appears Microsoft is definitely pushing both the technology and usability forward with the introduction of Windows 8 (and Windows Runtime).
The Metro UI is a different UI paradigm. If your using the current
Win32 controls (which includes WPF controls), your application will
look really dated in Metro. The only way to fix that is to
re-implement the UI (your View classes in an MVVM design) using Metro
controls. However, C# and majority of the .NET APIs are first class
citizens in this new environment. The rest of your application should
be fine.
As you already have what I assume a rather large application your best solution would be separate your view from your model-viewmodel. Then you can continue to develop both Windows 8 Metro full-screen touch-friendly awesome interfaces and the "classic" window interface (what we have done for the last x number of years). With good separation, design, and an excellent source control solution (i.e. Perforce) you will able to share a lot of the code base.
In addition to the answers given to your recent question on Windows Runtime Bill Wagner (one of the many C# bloggers that I follow) has posted summary on WinRT and managed languages conference sessions; it is an good read and recommended if you have a few minutes. One of the things that his summary clarified (in the FAQ at the end) was that the future of .NET as the branding for the framework we use is going to be replaced with Windows Runtime.
Another piece from Bill's blog post:
Some of the .NET APIs are changing for WinRT. I don’t have an
exhaustive list, and I’m not sure there is one yet. Other APIs are not
exposed via WinRT. (They are still available as .net APIs, just not as
Metro / WinRT APIs.)
It is unlikely that we'll see Microsoft push the Metro-style application framework back to past releases due to the level of re-architecting that went into Windows 8.
Like Pavel said, if you kept your application from using as much of the WinRT libraries as possible, it is possible but then again, you're now building a regular web app.