How to target both windows phone 8 and 7.5 - c#

My app is ready and is too simple, just a panorama and some pivots, nothing specific to windows phone 8.
Before sending it I want to make sure that it will work on WP8 and also WP OS 7.1. I saw in the documentations that if we target 7.1 it will work on 8 too, but at the first I have choosed targeting windows 8 and now seems I can't change it in the App properties.
How can I know if it will work on OS 7.1 properly? ( I have not access to emulator, just a WP8 device)
How can I make it to work on both systems?

just a panorama and some pivots, nothing specific to windows phone 8.
Panorama and Pivot are specific to WP8, as the implementation of the controls were completely changed to have better performance on WP8.
So your code won't be compatible with 7.1 at all. So unless you want to write a WP7 app and let it run on WP8 with worse performance than a WP8 app, you cannot have a shared UI codebase.
For libraries, I'll recommend using Portable Class Librarie

Your 7.1 app will work fine on Windows Phone 8 without any additional modifications.
I believe you meant that you have access to the emulator only and not a device, otherwise it would be really easy to check how the app behaves on Windows Phone 8 hardware.

Related

Is it possible to write an application that runs on Windows Mobile 6.5 as well as Windows Embedded 8.1/10 Handheld?

A customer needs an application running on an industry handheld device with barcode scanner.
Unfortunately, Windows 8.1 Embedded Handheld devices are rare, and Windows 10 Embedded devices are non-existent. Almost all devices currently available use Windows CE 6 or Windows Mobile 6.5.
As far as I know, (.NET) applications for Windows Mobile 6.5 are exclusively based on Compact Framework and WinForms, whereas Windows 8.1 Embedded software is (exclusively?) based on WinRT and XAML.
Is that correct? Is there no way to write a (.NET) application which
runs on current (Windows Mobile 6.5) devices and
will run Windows 8.1/10 Embedded devices?
You are right, there is no way to do that. The UI is based on winforms for 6.5 and XAML for 8/10.
The only thing you can try to do is to try to keep UI and business logic cleanly separated to simplify the migration.
Consider also that some features you had on 6.5 (ex: sql compact) have been dropped in 8/10 and the "replacement" may not be code-compatible and may lack some features.
You may try to build and test your non-UI code already on 8/10, so you can check that you are not using features that may impact your migration.
If you don't have to write native .NET-code, you should be able to use Rho Elements. Possibly there are other cross platform solutions that work as well.
Possibly you can go with Windows.Forms on Windows Mobile 6.5 and Xamarin on Windows Phone. You need to use a compatibilty layer for the Form code of Compact Framework and the one supported by Xamarin.
But I would recommend to go with HTML5 (use ZetaKey browser on Windows Mobile). Even RhoElements is based on HTML5 but with properietary extensions.
Yes, it is possible. You will have to implement all GUI logic platform dependent. And can share code using MVVM pattern. You may also need to switch to a database, that is available on both platforms like SQLite.

How to specify initial window size for Windows 8.1 app running on Windows 10

Is it possible to set the default window size for a Windows 8.1 app running on Windows 10?
I know that this can be done for a UWS app using APIs introduced in Windows 10. However, converting the app to Windows 10 will take some time.
In the meantime, I would like to be able to release a quick fix which would ensure that current Windows 8.1 app launches with the correct size.
Does anyone know how to achieve this?
You could use reflection to call part of windows 10 sdk at runtime within your windows 8.1 app.
Take a look at Thomas Nigro blog, he does that for the vlc winrt app.

How to port existing Windows Store Application to Windows8 Mobile App ?

We have existing Windows Store application which is developed using C# and XAML. We want to port the same to Windows 8 Mobile application. Is there any Guidelines available for this ?
Well at first I would start figuring out the differences
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj681690%28v=vs.105%29.aspx
http://blog.markedup.com/2013/07/winrt-windows-phone-8-code-sharing-pitfalls/
When I ported two of my (smaller) apps, I put as much in a PCL (portable class library) as I could. All the stuff that remained in the project itself needed to be rewritten. If you have well-maintainable code, there should be only UI (what you have to adapt anyway) and very few platform specific code (like accessing filesystem, camera or whatever) left. This is the part you must redevelop.
Dnt know how you have made these applications well If you have followed MVVM pattern then it is very easy to port windows and windows phone apps from one to other. You just need to take care of new XAML UIs every thing except some platform specific liberalizes will work. While making any of windows store and windows phone application you should use the liberaries that both platforms can consume. For example you can use LEX.db for the database.
here are very good explanations for it.
sharing code between windows phone and windows 8 app -1
sharing code between windows phone and windows 8 app -2
hope this will help
The answers given so far are quite good. One thing to note is that Windows Phone 8.1 is about to be released, which will share many of the WinRT libraries. This will mean that in a few months (as early as May), the shared libraries between the two platforms will greatly increase. You can download the leaked SDK to see what some of the changes will be.
Not that you should wait until then, and creating a PCL is definitely going to help you (especially if you want to later move to iOS, Android as well). It's just something to keep in mind.

Do I need to create separate applications for windows phone 8 and windows 8 desktop?

I want to create an app that is compatible with Windows Phone 8 and Windows 8, both desktop and tablet versions. My question is whether an application developed for Windows Phone 8 runs on Windows 8 tablet and desktop versions. I know I need to create separate views for the three; is that enough or do I need any additional steps? I want to use SQLite database in Windows Phone 8. Is that compatible with the other versions too?
You will not be able to create a single assembly which can run on Windows Phone 8 and Windows 8.
You may be able to create libraries which you can reference in both projects or share code in other ways.
You will need to create separate UI for each platform. (Even if they end up looking the same-although that would probably not be a good idea.) Each platform has different conventions and ways users will expect apps to behave. You should respect these to avoid confusing users.
You can use SQLite on both Windows Phone 8 and Windows 8.

Can I run windows phone 8 on windows 8 RT and vice versa?

Can I run RT apps on windows phone, or windows 8 phone apps on windows 8 RT or PRO?
If I need to develop an app to run on RT tablets and on windows 8 phones, what should I do?
EDIT
When Microsoft will provide a unified way to develop apps????
Am I requested to develop tons of apps to run on all of Microsoft platforms, I am not an Apple fan at all, but Microsoft should learn more and more from them, I spent and am spending all of my time chasing Microsoft techniques, it is very very annoying!!! :(
No,
But you can share code through the use of Portable Class Libraries or linked files.
I recently wrote two articles about how to achieve this:
The first one is about whether to choose PCL's or linked files:
http://www.kenneth-truyers.net/2013/03/27/portable-class-libraries-or-source-code-sharing/
The second one is about how to work around the limitations of PCL's:
http://www.kenneth-truyers.net/2013/02/24/patterns-for-sharing-code-in-windows-phone-and-windows-8-applications/
No. The two runtimes are not compatible.
If I need to develop an app to run on RT tablets and on windows 8 phones, what should I do?
You can use the portable class libraries to save logic, but not the presentation code.
You would then build your UI on each platform, using the appropriate tools for the platform.
You can't just run a xap on a tablet. You CAN however take almost all of the XAML and C# uncompiled code and recompile for the tablet. You just need to fix some of the idiosyncrasies in the syntax. Same goes for Windows 8 Pro.

Categories