Any code changes needed to get WP8 app to run on Surface Tablet? - windows-phone-8

So, our Windows Phone developer left recently, and I primarily do Android development.
We had a question from a client about the possibility of installing our Windows Phone 8 app on a Surface Tablet. Namely, is it possible to do? As it stands, our WP8 app was not written with tablets in mind, so my question is:
Is there anything I need to do to the WP8 app to get it to install on a tablet, (should it work as-is (like Android apps do), is there some sort of flag I have to enable and then rebuild, etc.?)

As #AMR mentions, the biggest challenge will be the UI; however, depending on the device functionality being used, the "backend" may or may not be a challenge as well.
There is great guidance on the Windows Phone Dev Center about practices and techniques for building for both platforms, so depending on when the phone app was built and your former developer's awareness of the overlapping platforms, you could be in great shape or just so-so shape.
Additionally, the following resources may be of help in mapping from what you have already coded in Windows Phone 8 to what you'd do in Windows 8:
XAML controls comparison between Windows Phone 8 and Windows 8
(much will be relevant to Windows Phone 7 too)
Windows Phone 8 and Windows 8 platform comparison (shows common
APIs, storage, networking, etc.)
Lastly, the Windows Phone Runtime API documentation gives a listing
of APIs only on Phone 8 vs. APIs adopted from Windows 8.

Okay well first off yes, there will be a few things that change but nothing to serious.
HOPFULLY you have a good MVVM model. If this is the case then you should be able to just copy and paste 99.999% of your backend code right into your tablet app. There are a few things that are different but its just namespace stuff. Nothing too serious.
The Major change is going to be your UI layout and UI controls. Depending on what libs you are using you will probably have a lot of conflicts.
Your best bet is to just copy and paste your backend code in and then creating a new UI. I have tried to merge phone UIs in the paste into the tablet and its rediculous at times. I found it takes less time to just recreate it.
If you need any help you can hit me up at www.AnthonyRussell.info Maybe I can help with your transfer. Just make sure to leave your contact info.

Related

Differences between Universal Windows Platform (Win10) and Windows Phone programming?

I would like to start programming for the Universal Windows Platform with an universal app running on Win10 desktops, tablets and phones.
I'm new to programming mobile Windows applications, so I have to learn some basics. I have some experience in Java/Android programming and basic skills in C#.
My problem now is that there aren't much tutorials for UWP app development which teach from the beginning how to program such an app. What I find are some tutorials for Windows phone 8 app development.
Are the differences too big or would you recommend to go through Windows phone 8 tutorials to get into the app for Windows topic?
UWP tutorials are sparse and hard to find, it's true. The difference isn't "Big" if you're doing a basic app, but once you start getting into any sort of mid-level apps then yes it diverges from the W8/WP8 paradigm.
One thing you can do is use the Windows App Studio, and create a generic app with an RSS feed, youtube videos or whatever, and download that solution and then look through the code that is automatically generated. I found a few good sources too:
Windows Dev center is also a huge help with example code (on GitHub) and the MSDN has examples as well, if you filter through it properly.
Channel 9 has an absolute beginners tutorial series from nothing to a superhero app.
https://channel9.msdn.com/Series/Windows-10-development-for-absolute-beginners
I also found a good youtube series that covers individual topics instead of a real tutorial series for learning to program apps:
https://www.youtube.com/playlist?list=PLaoF-xhnnrRUNVx-JAfEy_kUrGGaKS7HL

CurrentApp.ReportConsumableFulfillmentAsync vs CurrentApp.ReportProductFulfillment

I have to implement "in-app purchase" both for Windows 8.1 and Windows Phone 8 app. The API looks the same for both platforms, besides one method: "CurrentApp.ReportProductFulfillment" (only WP has it). However, both platforms have "CurrentApp.ReportConsumableFulfillmentAsync".
My preference is to write fully reusable code (same code) for both platforms, if possible. MSDN documentation is not clear enough, so I want to understand:
Can I use ReportConsumableFulfillmentAsync on WP instead of ReportProductFulfillment? Are they have the same functionality? (maybe they left ReportProductFulfillment for backward compatibility).
Do I have to call ReportConsumableFulfillmentAsync after buying consumable only, or after every store purchase?
Thanks!
According to MSDN ReportConsumableFulfillmentAsync is Windows Phone 8.1 API, so you cannot use it when creating Windows Phone 8 apps. Stick with ReportProductFulfillment and Windows Phone 8 apps for now, it will take some time for Windows Phone 8.1 to get on the market
Only for consumables
If your are looking or a nice in-app wrapper, take a look at this https://github.com/igorkulman/Kulman.WP8/blob/master/Kulman.WP8/Services/WindowsPhoneStoreService.cs

Migrating Windows Phone 8 app to Windows Tablet

Do Windows Phone 8 Application developed for Windows Phone 8 device will run on Windows Surface Tablets (RT & 8.1)? Kindly clarify me.
Could you please suggest me on, what are the changes required for migrating the application.
Take a look on the Portable class library.
It allow you to share your code between different platform.
http://msdn.microsoft.com/en-us/library/gg597392(v=vs.110).aspx
This blog clearly explains how to use it :
http://blogs.msdn.com/b/stephe/archive/2012/05/07/partager-du-code-entre-plate-formes-gr-226-ce-224-la-portable-class-library-1-4.aspx
Anyway you got specific dev to do.
You will need to rewrite many portions of the application. It's difficult to be more precise as you did not describe anything about your application.
The UI, assuming you select C# and XAML for the Windows 8 modern application will need a significant amount of changes. While there will be a significant amount of knowledge overlap and technology similarity, the UI will not be portable. The components are similar, but for example, you've probably used the Windows Phone toolkit which is not available for a Windows 8 store application. Another consideration is that on the larger screen sizes, you'll ideally want to use a different layout of your application.
For the business logic, you may be able to use much of it as is. However, anything that deals with the file system or network (and more) will not necessarily be portable. You could use a portable class library for some features, but you may still need platform specific code.
While this all may sound like a tremendous amount of work, I'd actually like to suggest that it's not. The platforms are very similar, the development environment will be identical, and some amount of UI work would have been necessary anyway. Assuming you create two applications, the structure might look like this:
PhoneApplication
Windows8Application
DataModel
PortableClassLibraryStuff
PhoneSpecific
Windows8Specific
A lot of differences beetween WinRT and WP8 API makes porting much more difficult. But if you are still interested in this topic I can suggest you
Waiting for WP8.1 and W8.1 Update 1 API combination or
Writing your own little framework in a portable class library for navigation, setting, notification, ... support. I already did that work and there are a lot of possibilities for code sharing (resources can be completely shared with the binding notation of WP8). For more information please visit the opensource github project: Github MultiPlatform Framework sample. You will still need to rewrite a lot of xaml code but the leaked footage of the WP8.1 API already showed that we will be able to use much more shared UI code :-)

Multi mobile OS simulator

I am trying to find Simulators for multiple mobile Operating Systems, but i am always getting Emulators instead.
What i need basically is maybe a Web Version of different mobile OS, not to run or test applications, just to navigate through their menu and settings (go at settings, change settings, setup email etc.)
The purpose for this is to guide through users on how to change their settings on their phones, without the need of the actual device or having multiple emulators.
UPDATE
After a lot of search around i managed to find an Android web simulator that suits my needs at Manymo.
It has versions : 4.2 , 4.1 , 4.0.3 , 2.3 , 2.2 , 2.1
Still in search for something similar for iOS, Windows Phone and Blackberry.
You could easily set up such emulators with a bit of CSS and jQuery (for the animations when changing screens).
From time to time I run into such "simulators" on cell-provider companies' websites. But they are very limited to a teaching a few functions, and are accompanied by text on the side.
You might want to hire a web developer, give him 3-4 days and then you have a nice simulator for the 3 popular OSes.
Just beware that having an Android simulator may not be enough; The OS changes with the devices, as manufacturers do whatever they want with the OS and compile for their specific device.
Have you considered creating a free account on http://deviceanywhere.com?
There are some 'fun' apps built for Windows Phone to emulate other phones
iFun - iPhone simulator
Fundroid - Android simulator
B7B - BlackBerry simulator
I haven't tried them out myself so I can't say how well they simulate phone settings, but is this kind of what you're looking for?
Something like http://www.mobilephoneemulator.com/ then perhaps. Or do you want it for apps rather than web pages? Then I don't think it's possible.
There are packages like jQuery Mobile that is designed to generate web apps that look like native mobile apps.

Windows phone 7 and HTML5

I'm completely new to Windows Phone and the Windows galaxy in general as far as programming goes. For a project of a phone app that has to run on a windows phone, I started exploring the resources and I have some questions.
One of the problems I encountered is that things change very quickly. For example, answers to this question say that browsers in Windows Phone will most likely not support HTML5. However, there are many online tutorials (for instance here) introducing ASP.NET MVC 4 and how it is appropriate for mobile apps.
I would personally like to go the "HTML5+javascript" way instead of learning how to develop with Silverlight, which apparently has been discontinued by Microsoft. However, my first concern is evidently to be able to create an application that works!
So with that in mind, my questions are the following:
My impression is that HTML5+JS is being introduced in replacement of Silverlight and will be more used in the future. Is that correct?
Knowing that I have to build an app which should be able to play videos and audio, record audio, and connect to a library to do some speech processing in the background, should I use Silverlight or can I try using ASP.NET MVC 4? (From what I gather, Silverlight would be better than XNA)
Are there limitations to using HTML5+JS as compared to Silverlight or the other way around?
Can you package a web app (i.e. using HTML5+JS) to be used locally on the phone if there is no access to a distant server?
Any specific pointers or answers on these specific issues will be more than welcome! :)
Currently, Windows Phone 7.1 does not support full HTML5+JS as a replacement for Silverlight. In Windows 8 (NOT the next version of windows phone, but the next version of Microsoft's desktop OS), HTML5+JS is presented as an alternative to using XAML and C# (it's a little confusing because on Windows 8, "metro" apps do not run Silverlight, but they still operate using XAML and C#). But that's neither here nor there... To summarily answer your question(s): In the phone's browser, there is very limited HTML5 capability.
From what you've described, you definitely want to use Silverlight for your Windows Phone app. The answer to that part of your question has never changed, Silverlight from the beginning of WP7 would be your best option. XNA is exclusively designed for gaming development.
To answer all of your questions, point by point:
My impression is that HTML5+JS is being introduced in replacement of
Silverlight and will be more used in the future. Is that correct?
This has not been confirmed (as of this post), but speculation is that this will be the case in some future release of the OS (no word on when that may be). But no, this is not currently an option, and there is no promise from Microsoft that it ever will be.
Knowing that I have to build an app which should be able to play
videos and audio, record audio, and connect to a library to do some
speech processing in the background, should I use Silverlight or can I
try using ASP.NET MVC 4? (From what I gather, Silverlight would be
better than XNA)
Silverlight. Silverlight. Silverlight. :) ASP.NET + MVC will not work. XNA is intended to be used for building games. Attempting to build more standard user interfaces using it would give you a migraine to say the least, and would not look anywhere near good.
Are there limitations to using HTML5+JS as compared to Silverlight or the other way around?
and
Can you package a web app (i.e. using HTML5+JS) to be used locally on the phone if there is > no access to a distant server?
As answered above, there is no way to do this on the phone.
As for pointers on all of this. I strongly encourage you to simply google (or bing if you're into that kind of thing) "getting started with windows phone" or "windows phone tutorials". Best source I could point you to is the Windows Phone Developer website. It's got some great tutorials that don't assume you know lots about windows phone. Best to get this material from Microsoft. It'll be more reliable, more well written, and ultimatly more useful. I've been writing Windows Phone apps since before the phone was released, and I still use it for learning the basics of something new. Great place.