Cross-Platform UI Consistency0:00
The whole benefit of something like native PHP is that you could build for both Android and iOS at the same time and know that it's gonna work kind of consistently across both platforms. And this is why we're using the web views for the user interface primarily for now, because this gives us a really consistent experience, regardless of the platform that you're on. And this is what most apps really want to achieve.
regardless of the platform that you're on. And this is what most apps really want to achieve. They want a consistent interface across both platforms and not having to sort of bifurcate their user interface, design and management and ongoing support. They just want one user interface that can work in both places, and that's fine. So you've got the web view, you can use any frontend technologies that you like. You've got Laravel on the backend
Running on Android0:51
you can use any frontend technologies that you like. You've got Laravel on the backend inside the application itself, and you just want it to work on both platforms. So let's see what that looks like. So back in the terminal, we can just do PHP, artisan Native Run, Android. Now I've set up my environment to work with Android already. You'll have to follow the documentation. It looks exactly the same as our iOS application.
You'll have to follow the documentation. It looks exactly the same as our iOS application. So let's hit this button and see what it does. And there you go. Straight away we see an alert, and the alert is native to the UI of the phone because this is a native alert. So you can see it looks different to the iOS one. We haven't built any UI components really for any of this yet. This is just using any native components that already exist.
really for any of this yet. This is just using any native components that already exist. So that's that. Working on an Android phone as well. We could go and look at all of the other functionality. It's all the same. So all of the functionality that we looked at in the kitchen sink application works exactly the same on an Android phone as it does on an iOS. Android support is more complicated. We've got Windows, Linux,
Android Support Challenges2:04
Android support is more complicated. We've got Windows, Linux, and Mac to support to make the development environment work. And there are many, many Android devices out in the wild with many versions of Android in use. And this ecosystem is kind of constantly evolving and changing. The range of features that are available on devices is much greater than it is on iOS.
that are available on devices is much greater than it is on iOS. So be prepared for some of the features of your applications to not work on every device. Also means that the current version of native PHP won't work with all Android devices, but we are looking to continue expanding support over the coming months for more and more devices, more and more Android versions, and making all of the features available
Next Lesson Preview2:47
and more Android versions, and making all of the features available to whatever devices we can. In the next lesson, we're gonna look at some tips and tricks that you can use to make development of your application really, really smooth.
