Xamarin For Mobile Development Concepts
Xamarin For Mobile Development Concepts
1
Lessons:
• Mobile Development concepts and theories
2
What is Mobile Development?
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
9
Top mobile application development trends in 2018:
Hybrid Development
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
13
Android versions & iOS versions
14
Cross-Platform vs. Native Mobile App Development: Choosing the right
development tools for your project.
16
Cross-platform vs. Native Apps: Key Differences
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
22
Pros & Cons of Cross-platform Mobile App Development
· 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
24
Pros & Cons of Cross-platform Mobile App Development
· 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.
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
32
Intent
33
What is Intent?
34
What is Explicit Intent?
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?
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.
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.
✋👆👉👍👤👦👧👨👩👪💃🏃
💑❤😂😉😋😒😭👶😸🐟🍒
🍔💣📌📖🔨🎃🎈🎨🏈🏰🌏
🔌🔑 and many more... 38