Sample phone models for testing view scaling - user-interface

I would like to create a mobile application in react native for iOS and Android. I would like views to be scalable and look good on many iOS and android devices.
Is there any standard or any list of recommended devices worth testing your applications on?
It is not possible to test the application on all devices, so I want to ask if you have any list of devices worth checking your application on.

Related

Xamarin UI Test - different element selectors for Phone / Tablet

I am looking at Xamarin UI test as a POC for a native Android and iOS app. Not used Xamarin before or C, so I am bluffing my way through at the moment. I have managed to get it running on the Android Phone version of the app, but how do I make it clever enough to look for different elements between the Phone / Tablet implementation? Going further I will be trying to make the POC cross platform so will need to take into account the platform too.
I have seen references to platform and idiom but not sure how to use them in the Tests.cs file.
Thanks.

Porting android app to xamarin or windows native questions

So, I have been developing an android app for some time, and I was requested to try porting this app to windows phone too. In order to reduce the hassle in trying to maintain two separate versions of the same app, I decided to try to port this app into xamarin, because I have heard that its performance is better than hybrid apps. These are my questions with regard to xamarin:-
I want to maintain the same look and feel which I had in my original app into my cross platform app, and at the same time, make it distinct in the windows version. What are the things I can do to achieve this effect?
Is it rather better for me to port this app to windows phone native, because of added problems in trying to create a common app?
Are there any restrictions with regard to Windows store when publishing xamarin apps?
Xamarin doesn't really cover Windows UWP apps, only in the notion that they have the UI Framework Xamarin.Forms running on that platform. Meaning, that what you are making is a native Windows UWP app.
What Xamarin is great at is when you start targeting more than one platform and you have structured your code in a way that it can be reused on the supported platforms. This could for instance be done by putting most of your logic and behavior into a Portable Class Library/NETStandard library and consume it in your apps.
A Typical pattern for making platform agnostic logic and behavior for your apps, is the pattern known as Model-View-ViewModel, where the View is platform specific, while the Model and ViewModel usually are platform agnostic. The ViewModel is where the behavior resides and it is what ties the Model together with the View.
Usually the ViewModel wouldn't directly know the View, but there would be a layer in between (glue), such as XAML or a binding engine from MvvmCross, MvvmLight or ReactiveUI to name some MVVM libraries.
What Xamarin provides is the ability to write C# code for Android and iOS, which greatly enables you to share code between those two platforms, but also all the Windows platforms. Hence, UI, is very much dependent on each of the platforms on their own.
You can, of course, use Xamarin.Forms as a UI abstraction layer, which produces a native UI using the native UI controls to get a similar app on all the targeted platforms.
First of all you need to know there are different styles of Xamarin development, who will share more or less content.
If you use Xamarin Forms you have a Main project non-related to any platform (where you create the views and clases), and specific platform projects who adapt the controls to each native style.
If you develop using Xamarin Classic, you have a Shared project where you only develop data-related classes, and specific platform project with their own views and classes with native-friendly controls and native similar functions, but I think, there is no direct Xamarin Clasic Windows Project.
So if you only want to have two apps who look native both, but with same structure and functionalities Xamarin Forms will be the best option for you, cause you only develop "one single app" who becomes native-style like this:
If what you want is to have different apps, with different functionalities and diferent content, then you need to go for Xamarin Classic. What I recomend you to do then is develop the windows phone in native, but put all of the code you can in a shared library. Then you can create a Xamarin classic Android app and use the shared library. You will still need to mantain two different apps, but you will only need to change the "core" code only one time.
If you use Xamarin Forms to do a UWP windows app I don't think you have any problem to publish it, think Xamarin is from Microsoft.

Can Xamarin be used to produce a iOS, Android AND WEB app?

Xamarin is designed to create native iOS, Android, and Windows apps by coding it in C#. But can it also produce a web app?
If not, is there some solution that would enable us to do that?
You can write your backend code (services, data, domain, business logic, etc) in PCL libraries that can be shared between your Mobile apps and your website. But the web frontend would need to be written separately than the mobile front-ends.

Xamarin - Different views for each platform

I am currently working on Xamarin project and after some research, I am confused about how cross platform UI works.
Let's take the 3 following smartphones:
Samsung Galaxy S5
iPhone 6 Microsoft
Lumia 640 LTE
Three phones with three different types of controls. Samsung has 3 buttons at the bottom, whereas the iPhone has just 1 button. The Microsoft phone has 3 buttons like the Samsung, but those are different. So this is why I am confused.
The cross platform design shown in the tutorials such as this tutorial shows a shared design.
However, my goal isn't to make the same interface for each platform. I saw this article which is similar to what I want to make. We have the same app logic, but the design depends of the platform
In order: Android, iOS and Windows Phone
Now, here is the app architecture proposed by Xamarin
To achieve a different design per platform, I must not create a "Forms Xaml Page" in the shared project, but create 3 different pages (1 per platform). However, I'm not sure how this can be achieved.
At the launch, each app executes the following code line:
LoadApplication(new App());
So, if I make 3 different interfaces, how can I load the one specific to the platform the app is running on?
Also, if we use the MVC pattern (I know about MVVM, I just do not understand it at the moment), make 3 differents views, each one with a controller, but only share models/data/motor. (MVC -> 1M/3V/3C).
A good approach for a cross-platform project with platform-specific UIs is to use MvvmCross or a similar library.
The TipCalc-Project is a sample app which shares business logic via a Portable Class Library (PCL) and makes use of the MVVM-pattern (Model View ViewModel). You have a separated UI-project per platform (Android, iOS, ...) and reuse the functionality from your PCL.
This allows to share a large amount of your business code without using Xamarin.Forms and without any compromises regarding your UI.
You should have a basic understanding of MVVM and Dependency Injection for this approach.
With Xamarin.Forms, you are sharing the app logic and potentially all of the UI code by using the Forms API. This means the app interface will be fairly similar on all platforms.
With the non-Forms approach you share the app logic and then any UI code can go in the platform specific project and use the platform specific API.
Reading your requirements, I would suggest you look towards the non-Forms based approach of sharing code with Xamarin, rather than using Forms.
We have some good guides to get your started with this as well as a sample and case study.

Real Player was designed using which technology / platform?

Real Player UI is definetely the one that I admire.
Need to know its development platform. So that I can request my team to work on same platform to deliver such a nice UI.
Is it .NET, MFC, WCF, WPF etc... etc... ?
Also which is the apt platform to use to make the application work on Window desktop PC, Web-enabled devices, iPhone or whatever.
I know if I use anything that is wrapped around window api, it can work only on device that works on Windows OS. (So definitely no iPhone)
So is there anything that can help programmers to work on UI application that are device independent
Nice UIs are not that attached to a specific platform, but to having a good designer and user experience designer.
Good UIs can be created in any platform.
I am certain there are many bad UIs that have been built with the same platform that RealPlayer was built in.

Resources