0% found this document useful (0 votes)
47 views36 pages

Xamarin For Mobile Development Concepts

The document discusses different topics related to mobile application development including platforms like iOS and Android, trends like augmented reality and blockchain, challenges, and tools for cross-platform development. It provides details on concepts like what mobile development is, differences between iOS and Android, and compares approaches like native and cross-platform development.

Uploaded by

kairu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views36 pages

Xamarin For Mobile Development Concepts

The document discusses different topics related to mobile application development including platforms like iOS and Android, trends like augmented reality and blockchain, challenges, and tools for cross-platform development. It provides details on concepts like what mobile development is, differences between iOS and Android, and compares approaches like native and cross-platform development.

Uploaded by

kairu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Xamarin for Mobile Development

Instructor: Pet Andrew P. Nacua, MIT


AP4

1
Lessons:
• Mobile Development concepts and theories

2
What is Mobile Development?

We can start explaining mobile development, which is not about


building phone apps, though it is a huge part of it. Actually, It’s doing
any reasonably development for any kind of mobile devices such as
developing apps for phones, tablets, smartwatches, and every form
of wearable devices that run any kind of mobile operating system.

4
Major Mobile Development Platforms
iOS
iOS is kind of arguably the “big dog” once it comes to major app
development platforms, partially because it had been the platform that
finally brought mobile development into the modern day and age by fully
reworking the concept of a mobile device and mobile software system.
iOS is of course developed by Apple, and it runs exclusively on Apple
products.
Apple provides iOS developers with many native tools and libraries to
develop iOS applications, and, though you do not have to be enforced to
use Apple’s development tools to create your apps, you just need to have
a mac running OS X to build your application.

5
Major Mobile Development Platforms
Android
Android is the other dominant player in this space, it was a bit later
participant to the game, first being released in Sept 2008, virtually a year
later than iOS but it has managed to achieve a reasonably massive share
of the mobile market.
Technically, Android is the mobile OS with the largest most dominant share
of the market with around 80% share compared to iOS’s 18 % share.
Those numbers are a bit deceiving since android may be a fragmented
market consisting of the many different devices created by different
manufacturers, running completely different versions of the Android OS.

6
What are the primary differences between iOS and
Android?
• Android is backed by Google.
• iOS is backed by Apple.
• Anyone can build an Android device, and it is designed to run on a variety
of different hardware platforms and devices with very different form
factors and capabilities.
• iOS is designed to run only on a specific set of Apple devices.
• Android is based on the Linux kernel, and Google releases the source
code for Android as open source.
• Like Apple, Google provides some native tools for Android development
but again you are not required to use them.

7
Top mobile application development trends in 2018:

Augmented Reality
Augmented reality (AR) is used to explain a true world surrounding wherever
computer-generated elements are familiar enhance what we are able to
see through a camera and in recent years, this technology has been
booming with popularity.
Not solely is AR ofttimes used in amusement apps, however, has additionally
been distinguished in education and in many varieties of sporting events.
For example, in common social media apps nowadays like Snapchat,
Instagram and Pokémon Go.

8
Top mobile application development trends in 2018:

Artificial Intelligence

Artificial intelligence (AI) has been featured in several technological


advancements as well as machine learning, language process,
automation and much more. With the fast and continuous growth of AI,
big-name corporations have been adding this feature to their mobile
apps with notable success like Amazon’s Alexa and Apple’s face
recognition software system.

9
Top mobile application development trends in 2018:

Hybrid Development

In hybrid development, standard coding languages like JavaScript are used


and only one code base must be written, as the utilized framework will
neatly wrap everything along in a very view, which may then be displayed
in their respective native Android and iOS environments.
Over the past few years, there has been an incredible increase in
corporations willing to form hybrid mobile apps because of the cross-
platform capabilities offered by hybrid development and the way apps
may be launched onto the Google Play Store and Apple App Store with
negligible resources.

10
Top mobile application development trends in 2018:

Two-Factor Authentication
With Two-Factor Authentication (2FA), users are prompted to verify a login
attempt was meant by getting into a pin through their phone or email
that is connected to their account. In modern society, our data is our
identity and with over five billion distinctive mobile phone users with an
increase of four-dimensional annually, data security is essential and more
necessary than ever.
Several internet and mobile applications like Gmail and Steam are using 2FA
to verify a user’s identity throughout log in or whenever suspicious
activities occur on their account like an IP address modification.

11
Top mobile application development trends in 2018:

Blockchain
With blockchain evolving at a speedy pace, several firms and startups are
incorporating this technology into their mobile applications creating
what is familiar these days as DApps (decentralized applications).
The blockchain is redistributed as a result of multiple devices that are
connected with each other can store an identical copy of data packed
into blocks chained together. Hence, what we call a Peer-to-Peer (P2P)
network is created and has revolutionized, however, firms control
financial risks and shield user data.

12
Mobile Application Development Challenges

• Competitive, fluid vendor landscape (Apple, Android consortium incl.


Amazon, RIM, HP) means apps need to be multi-platform for wide
adoption.
• No “standard” device (what about iOS, Windows phone devices?)
• Low bandwidth input(in most cases - what about tablets?)
• Limited screen size (tablets?)
• Unreliability in connection and device (network access, power, ambient
light, noise, at least for now)
• Integration tradeoffs with cloud and enterprise services

13
Android versions & iOS versions

14
Cross-Platform vs. Native Mobile App Development: Choosing the right
development tools for your project.

Building a mobile application in 2020 is not what it used to be five years


ago:
• The global mobile application market topped $106 billion in 2018 and has been
growing at a CAGR of 18.4% ever since.
• ·Android powers 74.13% of smartphones, while the iOS market share is estimated
at 24.79%. KaiOS, their closest competitor, comes third with 0.35%. Windows,
BlackBerry, Symbian, and other mobile operating systems that once enjoyed
considerable popularity have long fallen into oblivion.
• Enterprise mobility, the Internet of Things, and eCommerce have changed the
role of mobile applications. Companies that turn to app developers need a tool to
distribute their content, ensure on-the-fly access to corporate data, manage
smart devices, and help their clients complete transactions faster.

15
Cross-platform vs. Native Apps: Key Differences

A native mobile app is an application that meets the requirements of a


particular operating system by using its SDK and primary technology
stack, as well as hardware memory, camera, sensors, and other programs
installed on a device.
The advantages of native mobile apps include:
• High performance
• Robust functionality
• Seamless user experience

A cross-platform application is a mobile app that is compatible with multiple


operating systems and can, therefore, run on any smartphone, tablet, PC,
smartwatch, and connected TV.

16
Cross-platform vs. Native Apps: Key Differences

Platform-independent applications have multiple advantages:


• 70–90% reusable code
• Easy maintenance and updates
• Broader reach
• Shorter time to market

There are two types of cross-platform mobile applications:


Native cross-platform apps. Each operating system has its SDK and technology
stack: Java or Kotlin for Android and Objective-C or Swift for iOS apps. Cross-platform
app developers create a unified API running on top of a native SDK, make use of
native IDEs, and build iOS and Android apps that share the same codebase. Native
cross-platform applications are primarily built with Xamarin, React Native, and Kotlin
Multiplatform.

17
Top Cross-platform Mobile App Development Tools

According to the 2019 Stack Overflow Developer Survey, Xamarin, React Native,
Flutter, and Cordova were the most popular cross-platform frameworks used by
professional developers:

18
Top Cross-platform Mobile App Development Tools

Xamarin. Built with #C and .Net, Xamarin allows developers to create cross-platform
applications for Android, iOS, tvOS, macOS, and Windows. Xamarin applications
with shared interfaces are developed using Xamarin.Forms. If your goal is to
design a platform-specific interface, Xamarin.iOS and Xamarin.Android are the
go-to tools. Xamarin provides powerful libraries to access native and 3rd-party
APIs, and leverage smartphone hardware and functionality: sensors, camera, text
messages, connectivity, etc. Applications created with Xamarin perform on par
with native apps — even when it comes to rendering dynamic data in real time.

19
Top Cross-platform Mobile App Development Tools

React Native. Unveiled by Facebook in 2015, React Native has reigned in the cross-
platform app development market ever since. The framework is based on React
— a JavaScript library for building highly responsive user interfaces. With React
Native, you can create mobile applications that share up to 80% of their
codebase and can access certain native features like the accelerometer and
smartphone camera, although you might need separate code for iOS and Android
for that.

20
Top Cross-platform Mobile App Development Tools

Apache Cordova. Apache Cordova’s tech stack features HTML5, CSS3, and
JavaScript. The mobile app development framework provides access to a
smartphone’s built-in accelerometer, file storage, GPS, contact data, media, and
notifications. Apache Cordova boasts several advantages, including a fairly simple
API and the opportunity to employ any JS framework. However, the platform
visualizes app UIs through a web browser, which might cause lag. Also, some of
Cordova’s plugins are dated, so developers often have to write custom ones from
scratch.

21
Top Cross-platform Mobile App Development Tools

Flutter. Flutter is Google’s UI toolkit that allows developers to create natively


compiled applications for mobile devices, web browsers, and PCs using the same
codebase. Flutter is based on Dart — a relatively new programming language that
shares many features with Swift and Kotlin and can be transformed into
JavaScript code. With Flutter, you can design applications that render fast and
adapt to platform-specific UX logic. The framework is most suitable for MVP
development.

22
Pros & Cons of Cross-platform Mobile App Development

The advantages of building a cross-platform application include:

· Shorter development time. Provided you choose the right tech stack and plan
your project thoroughly, you may be able to reuse up to 80% of the original
codebase — both at the back end and UI levels — for multiple platforms. This
helps companies reduce the time required to fix back-end logic issues (which
usually takes 10–20% of total project time) and launch apps faster.
· Exposure to a larger number of users. Most cross-platform apps run on both
Android and iOS, as well as Windows, macOS, Linux, and operating systems
underpinning the logic of smartwatches and connected home appliances.

23
Pros & Cons of Cross-platform Mobile App Development

The advantages of building a cross-platform application include:

· Updates synchronization. In a world where mobile apps get up to four updates


every month, maintenance costs can consume a large amount of app revenue —
and that’s where cross-platform apps walk away the clear winner.
And here’s where platform-independent applications might fall short:
· Performance. When it comes to CPU and GPU-heavy tasks, there is a
considerable performance gap between native and hybrid applications. Apps
built with Xamarin.iOS and Xamarin.Android, on the other hand, display nearly-
native results.

24
Pros & Cons of Cross-platform Mobile App Development

The advantages of building a cross-platform application include:

· Steep learning curve. Due to the high level of abstraction, cross-platform code is
hard to write. Developers who specialize in platform-independent applications
must have a good understanding of both the iOS and Android ecosystems, as well
as the cross-platform tools of their choice.

· Limited support of 3rd-party libraries. Not all 3rd-party libraries and SDKs work
in sync with cross-platform app development frameworks. This prompts
developers to consider alternatives or find a way to integrate the desired
functionality into a mobile app, which is time-consuming.

25
Who Xamarin is for and How it works
Xamarin is for developers with the following goals: (1) Share code, test and business
logic across platforms. (2) Write cross-platform applications in C# with Visual
Studio.

26
Xamarin at its initial phase

With its initial release, Xamarin was not understood as a perfect solution to develop
apps on multiple platforms and deal with obstacles arriving in the process.
Initially, it took much time to learn the native library classes for all platforms and
Xamarin is only provider to cover the native API, instead of providing its own API.

The next most challenging stuff is the need of buying an Apple computer for iOS app
development. Finally, the initial free version of the Xamarin technology
comprised of a very limited and unstable debugger.

28
Who Xamarin.Forms is for
Xamarin.Forms is for developers with the following goals:
• Share UI layout and design across platforms.
• Share code, test and business logic across platforms.
• Write cross-platform apps in C# with Visual Studio.

How Xamarin.Forms works


Xamarin.Forms provides a consistent API for creating UI elements across platforms.
This API can be implemented in either XAML or C# and supports data binding for
patterns such as Model-View-ViewModel (MVVM).
At runtime, Xamarin.Forms utilizes platform renderers to convert the cross-platform
UI elements into native controls on Xamarin.Android, Xamarin.iOS and UWP. This
allows developers to get the native look, feel and performance while realizing the
benefits of code sharing across platforms.

29
Additional functionality
Xamarin.Forms has a large ecosystem of libraries that add diverse functionality to
applications. Below describes some of this additional functionality.

Xamarin.Essentials
Xamarin.Essentials is a library that provides cross-platform APIs for native device
features. Like Xamarin itself, Xamarin.Essentials is an abstraction that simplifies the
process of accessing native utilities. Some examples of utilities provided by
Xamarin.Essentials include:
• Device info
• File system
• Accelerometer
• Phone dialer
• Text-to-speech
• Screen lock

30
Platform-specifics
Xamarin.Forms provides a common API that renders native controls across platforms,
but a specific platform may have functionality that doesn't exist on other
platforms. For example, the Android platform has native functionality for Fast
Scrolling in a ListView but iOS does not. Xamarin.Forms platform-specifics allow
you to utilize functionality that is only available on a specific platform without
creating custom renderers or effects.
Xamarin.Forms includes pre-built solutions for a variety of platform-specific
functionality. For more information, see:
• Xamarin.Forms platform-specifics
• Android platform-specifics
• iOS platform-specifics
• Windows platform-specifics

31
Material Visual

Xamarin.Forms Material Visual is used to apply Material Design rules to


Xamarin.Forms applications. Xamarin.Forms Material Visual utilizes the Visual
property to selectively apply custom renderers to the UI, resulting in an
application with a consistent look and feel across iOS and Android.

32
Intent

33
What is Intent?

✓ Intent is an “Intention” to perform and action.


✓ Mostly used for start activity, send broadcast receiver, start
services and send messages between activities.

34
What is Explicit Intent?

✓ It can only communicate within our application.

Example:
▪ Start activity
▪ Send data between activities
▪ Start services etc.
Intent send = new Intent(MainActivitiy.this,SeconActivity.class);
startActivity(send);

35
What is Implicit Intent?

✓ It can communicate outside application

Example:
▪ Call
▪ Send SMS
▪ Share Contents to another application etc.
Intent whatsappIntent = new Intent(Intent.ACTION_SEND);
whatsappIntent.setType(“text/plain”);
whatsappIntent.setPackage(“com.whatsapp”);
whatsappIntent..putExtra(Intent.EXTRA_TEXT, “The text you wanted to share”);

36
SlidesCarnival icons are editable shapes.

This means that you can:


● Resize them without losing quality.
● Change fill color and opacity.

Isn’t that nice? :)

Examples:

37
Now you can use any emoji as an icon!

😉 And of course it resizes without losing quality and you can change the color.

How? Follow Google instructions


https://twitter.com/googledocs/status/730087240156643328

✋👆👉👍👤👦👧👨👩👪💃🏃
💑❤😂😉😋😒😭👶😸🐟🍒
🍔💣📌📖🔨🎃🎈🎨🏈🏰🌏
🔌🔑 and many more... 38

You might also like