SlideShare a Scribd company logo
Windows Phone App
BCSF13A019
Link to Video
https://youtu.be/jHxQ1D-HL_I
Date: June 8th
, 2016 (Wednesday)
MCQs
1) How many general states are there in which your application can be
in?
 3
 2
 1
 4
2) When user switches to other application, your old app moves to which
state?
 Running
 Not running
 Suspended
 None
3) An app can be in suspended state if,
 User switches to some other app.
 Device enters a low power state.
 Both
 None
4) After suspended state, app goes to which state:
 Running
 Not Running
 Both Possible
 None
5) Which event is used to show that user has closed the app?
 OnClose
 OnExit
 None
 Both
6) On app crash, when the user activates an app, its activation event
handler receives a value:
 ApplicationExecutionState
 ApplicationRunningState
 None
 Both
7) In how many ways a windows mobile app can be created in Visual
Studio?
 3
 4
 5
 6
8) App is a sealed class which is i herited fro App class.
 True
 False
 Unknown
 None
9) Default methods available in App.xaml.cs file are:
 OnLaunched & OnSuspended
 OnLaunched & OnSuspending
 OnLaunching & OnSuspending
 None
10) To participate in activation, your app must register to receive the
 WinJS activated event for XAML
 Override OnActivated for HTML
 WinJS activated event for HTML
 None
11) App Visibility is synchronized with:
 App Resume
 AppClose
 AppSuspend
 None
Windows Mobile App
Development
By Maryam Iqbal
BCSF13A019
Date: June 8th, 2016 (Wednesday)
Prerequisite
 VS Studio
 Download the Windows Phone SDK 8.0
 Already know C#, XAML
 Register your phone for development (Optional)
https://msdn.microsoft.com/en-
us/library/windows/apps/ff769508%28v=vs.105%29.aspx
Life Cycle of
Windows Mobile
Application
Life Cycle of Windows Mobile App
Mainly an application can be in any of the following 3 states:
 Running
 Not running
 Suspended
But other than these states, your app can be in some other states
as well which are discussed on upcoming slides.
Cont.
Cont.
 App Launch
 App Activation
 App Suspend
 App Visibility
 App Resume
 App Close
 App Crash
 App Removal
For Details:
https://channel9.msdn.com/Series/Windows-Phone-8-1-
Development-for-Absolute-Beginners/Part-12-Understanding-
the-App-s-Lifecycle-and-Managing-State
App Launch
 An app is launched whenever it is activated by the user
and the app process was previously in the NotRunning
state.
 An app could be in the NotRunning state because it has
never been launched, because it was running but then
crashed, or because it was suspended but then couldn't
be kept in memory and was terminated by the system.
App Activation
 An app can be activated by the user through a
variety of contracts and extensions.
 To participate in activation, your app must register to
receive the WinJS activated event (HTML) or override
the OnActivated method (XAML).
 For HTML, WebUIApplication.activated is another
event you can handle for activation.
App Suspend
 An app can be suspended when the user switches
away from it or when the device enters a low
power state.
 When the user moves an app to the background,
Windows waits a few seconds to see whether the
user immediately switches back to the app. If the
user does not switch back within this time window,
Windows suspends the app.
App Visibility
 When the user switches from your app to another app, your app is
no longer visible but remains in the Running state until Windows can
suspend it. If the user switches away from your app but activates or
switches back to it before it can suspended, the app remains in the
Running state.
 Your app doesn't receive an activation event when app visibility
changes, because the app is still running. Windows simply switches
to and from the app as necessary. If your app needs to do
something when the user switches away and back, it can handle
the visibilitychange event (for HTML) or Window.VisibilityChanged
event (for XAML).
 The visibility event is not serialized with the suspend/resume or
activation events. Don't assume that these events come in a
particular order.
App Resume
A suspended app is resumed when the user switches to it
or when the device comes out of a low power state.
When an app is resumed from the Suspended state, it
enters the Running state and continues from where it was
when it was suspended. No app data is lost, so long as it
was stored in memory. Therefore, most apps don't need
to do anything when they are resumed.
App Close
 Generally, users don't need to close apps, they can let Windows
manage them. However, users can choose to close an app using
the close gesture or by pressing Alt+F4 on Windows or by using the
task switcher on Windows Phone.
 There's no special event to indicate that the user has closed an
app.
 After an app has been closed by the user, it's suspended and
terminated, and then enters the NotRunning state.
 In Windows 8.1 and later, after an app has been closed by the
user, the app is removed from the screen and switch list but not
explicitly terminated.
App Crash
 Apps are required to follow the system crash experience, which is
to simply return to the Start screen.
 The system crash experience is designed to get users back to what
they were doing as quickly as possible, so you shouldn't provide a
warning dialog or other notification because that'll cause a delay
for the user.
 When the user activates an app after it crashes, its activation
event handler receives an ApplicationExecutionState value of
NotRunning, and should display its initial UI and data.
 After a crash, don't routinely use the app data you would have
used for Resuming with Suspended because that data could be
corrupt
App Removal
 When a user deletes your app, the app is removed,
along with all its local data.
 Removing an app doesn't affect the user's data that
was stored in common locations, such as files in the
Documents or Pictures libraries.
5 Ways to Build
Mobile Apps with
Visual Studio
5 Ways to Build Mobile Apps with Visual
Studio
There are 5 different ways of creating a mobile app in Visual Studio, which
are:
 Web (Part 1) – Responsive Design
 Web (Part 2) – Mobile Optimized Web Pages
 Hybrid App
 Native App
 Xamarin
We’ll use “Native App Way” You can read about all of them from :
http://developer.telerik.com/featured/5-ways-to-build-mobile-apps-with-
visual-studio/
How to create
Native Mobile App
in VS
Creation
Let’s create a simple “Hello World App”
Open VS 2013 or whatever version you have (2010, 2012 etc.)
From top Menu Bar:
File → New Project or CTRL+SHIFT+N.
From new Dialogue Box:
Visual C# → Store Apps → Windows Phone Apps → Blank App
→ Give Name “HelloWolrd”
Cont.
Cont.
 Once you’ve created a project you’ll see App.xmal.cs file.
 This file represents a class names as “App” which is a sealed
class and inherited from “Application”.
 Moreover it contains some methods:
 OnLaunched
 RootFrame_FirstNavigated
 OnSuspending
 Open MainPage.xaml. You’ll see a designer view and a code
panel to design User Interface(UI).
Cont. (MainPage.xaml)
UI Code Panel
Designer View
Cont. (MainPage.xaml)
 Now, first we’ll make a button. If you know WPF then it would
be very easy.
 To make a button write these lines inside <grid></grid>
<Button Content="Click ME" Click="btnClick"
HorizontalAlignment="Left" Margin="140,94,0,0"
VerticalAlignment="Top"/>
 As, we need something where text “Hello World” can be
displayed so, we’ll use textblock not textbox because that is
for taking input. So, we’ll use textblock.
<TextBlock x:Name="myBlock" FontSize="25"
TextAlignment="Center" HorizontalAlignment="Left"
Margin="43,200,0,0" TextWrapping="Wrap"
VerticalAlignment="Top" Height="175" Width="305"/>
Cont. (MainPage.xaml)
BUTTON
TEXTBLOCK
Cont. (MainPage.xaml.cs)
 Now write click event against the button we’ve just created.
 Open MainPage.xaml.cs file or double click on button created in
design.
 Write following code in click event:
private void btnClick(object sender, RoutedEventArgs e)
{
if (myBlock.Text == "")
{
myBlock.Text = "Hello World!";
}
else
myBlock.Text = "";
}
Code to
be
added
Cont.
Now run you application.
Make sure HYPER-V option is enabled in your
computer. If not then you can enable it from “turn
windows feature on or off menu” (available in
control panel).
Select “Emulator 8.1 WVGA 4 inch 512 MB”
Press CTRL+F5 or simply click the “Emulator 8.1
WVGA 4 inch 512 MB” button.
Cont.
It’ll take some time.
So, wait.
Click this
button to see
“Hello World”
Cont.
Here’s the Hello
World in TextBlock..
If you’ll press button
again, it’ll
disappear.
For further learning, you may visit:
https://channel9.msdn.com/Series/Windows-Phone-8-1-
Development-for-Absolute-Beginners
https://msdn.microsoft.com/en-
us/library/windows/apps/ff402529%28v=vs.105%29.aspx
https://channel9.msdn.com/Series/Building-Apps-for-
Windows-Phone-8-Jump-Start
Thank You 

More Related Content

What's hot

Trimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NETTrimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NETMihir G.
 
4 Ways to Build an App Without Code | AppSheet
4 Ways to Build an App Without Code | AppSheet4 Ways to Build an App Without Code | AppSheet
4 Ways to Build an App Without Code | AppSheetAppSheet
 
AppSheet Overview -- DIY Mobile App Platform
AppSheet Overview -- DIY Mobile App PlatformAppSheet Overview -- DIY Mobile App Platform
AppSheet Overview -- DIY Mobile App Platformpravse
 

What's hot (6)

Trimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NETTrimantra - Project Portfolio_NET
Trimantra - Project Portfolio_NET
 
4 Ways to Build an App Without Code | AppSheet
4 Ways to Build an App Without Code | AppSheet4 Ways to Build an App Without Code | AppSheet
4 Ways to Build an App Without Code | AppSheet
 
Migrating JavaME Apps to Android
Migrating JavaME Apps to AndroidMigrating JavaME Apps to Android
Migrating JavaME Apps to Android
 
AppSheet Overview -- DIY Mobile App Platform
AppSheet Overview -- DIY Mobile App PlatformAppSheet Overview -- DIY Mobile App Platform
AppSheet Overview -- DIY Mobile App Platform
 
Windows 8 Developer Preview
Windows 8 Developer PreviewWindows 8 Developer Preview
Windows 8 Developer Preview
 
ARIA Serious
ARIA SeriousARIA Serious
ARIA Serious
 

Viewers also liked

Viewers also liked (11)

Chua viet
Chua vietChua viet
Chua viet
 
Política ecuatoriana
Política ecuatorianaPolítica ecuatoriana
Política ecuatoriana
 
John lennon
John lennonJohn lennon
John lennon
 
Abraham lincoln
Abraham lincolnAbraham lincoln
Abraham lincoln
 
Malaysian Nuclear Agencies
Malaysian Nuclear AgenciesMalaysian Nuclear Agencies
Malaysian Nuclear Agencies
 
Portfolio
PortfolioPortfolio
Portfolio
 
Dinh lang
Dinh langDinh lang
Dinh lang
 
Yes is-more
Yes is-more Yes is-more
Yes is-more
 
Sk rpt bahasa malaysia tahun 3 by spa jp pahang
Sk rpt bahasa malaysia tahun 3 by spa jp pahangSk rpt bahasa malaysia tahun 3 by spa jp pahang
Sk rpt bahasa malaysia tahun 3 by spa jp pahang
 
The Importance of Play
The Importance of PlayThe Importance of Play
The Importance of Play
 
Campos de sabara y chatila
Campos de sabara y chatilaCampos de sabara y chatila
Campos de sabara y chatila
 

Similar to Bcsf13a019_mcqs_ead

Windows phone 8 session 9
Windows phone 8 session 9Windows phone 8 session 9
Windows phone 8 session 9hitesh chothani
 
android_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last semandroid_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last semaswinbiju1652
 
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1Banking at Ho Chi Minh city
 
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfPERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfarfa442827
 
The Future of Web Apps
The Future of Web AppsThe Future of Web Apps
The Future of Web AppsiCiDIGITAL
 
Android building blocks and application life cycle-chapter3
Android building blocks and application life cycle-chapter3Android building blocks and application life cycle-chapter3
Android building blocks and application life cycle-chapter3Dr. Ramkumar Lakshminarayanan
 
Guidelines for Android application design.pptx
Guidelines for Android application design.pptxGuidelines for Android application design.pptx
Guidelines for Android application design.pptxdebasish duarah
 
Android Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesAndroid Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesChandrakantDivate1
 
Android application development
Android application developmentAndroid application development
Android application developmentMd. Mujahid Islam
 
App anatomy and life cycle
App anatomy and life cycleApp anatomy and life cycle
App anatomy and life cycleSV.CO
 
Introduction to State Restoration in Flutter
Introduction to State Restoration in FlutterIntroduction to State Restoration in Flutter
Introduction to State Restoration in FlutterDave Chao
 
Overview of wrap Features in Power Apps.pptx
Overview of wrap Features in Power Apps.pptxOverview of wrap Features in Power Apps.pptx
Overview of wrap Features in Power Apps.pptxConcetto Labs
 

Similar to Bcsf13a019_mcqs_ead (20)

Windows phone 8 session 9
Windows phone 8 session 9Windows phone 8 session 9
Windows phone 8 session 9
 
android_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last semandroid_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last sem
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
 
Unit2
Unit2Unit2
Unit2
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
How to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step GuideHow to build your own Android App -Step by Step Guide
How to build your own Android App -Step by Step Guide
 
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1IBM MobileFirst Platform  v7.0 POT App Mgmt Lab v1.1
IBM MobileFirst Platform v7.0 POT App Mgmt Lab v1.1
 
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdfPERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
PERTEMUAN 3_INTRO TO ANDROID APP DEV.pdf
 
Build Your First Android App
Build Your First Android AppBuild Your First Android App
Build Your First Android App
 
The Future of Web Apps
The Future of Web AppsThe Future of Web Apps
The Future of Web Apps
 
Android building blocks and application life cycle-chapter3
Android building blocks and application life cycle-chapter3Android building blocks and application life cycle-chapter3
Android building blocks and application life cycle-chapter3
 
Guidelines for Android application design.pptx
Guidelines for Android application design.pptxGuidelines for Android application design.pptx
Guidelines for Android application design.pptx
 
Android Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesAndroid Application Components with Implementation & Examples
Android Application Components with Implementation & Examples
 
Android application development
Android application developmentAndroid application development
Android application development
 
App anatomy and life cycle
App anatomy and life cycleApp anatomy and life cycle
App anatomy and life cycle
 
Introduction to State Restoration in Flutter
Introduction to State Restoration in FlutterIntroduction to State Restoration in Flutter
Introduction to State Restoration in Flutter
 
Overview of wrap Features in Power Apps.pptx
Overview of wrap Features in Power Apps.pptxOverview of wrap Features in Power Apps.pptx
Overview of wrap Features in Power Apps.pptx
 

Recently uploaded

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...Sri Ambati
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Product School
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsVlad Stirbu
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoTAnalytics
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsPaul Groth
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform EngineeringJemma Hussein Allen
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
 

Recently uploaded (20)

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 

Bcsf13a019_mcqs_ead

  • 1. Windows Phone App BCSF13A019 Link to Video https://youtu.be/jHxQ1D-HL_I Date: June 8th , 2016 (Wednesday)
  • 2. MCQs 1) How many general states are there in which your application can be in?  3  2  1  4 2) When user switches to other application, your old app moves to which state?  Running  Not running  Suspended  None 3) An app can be in suspended state if,  User switches to some other app.  Device enters a low power state.  Both  None 4) After suspended state, app goes to which state:  Running  Not Running  Both Possible  None 5) Which event is used to show that user has closed the app?  OnClose  OnExit  None  Both
  • 3. 6) On app crash, when the user activates an app, its activation event handler receives a value:  ApplicationExecutionState  ApplicationRunningState  None  Both 7) In how many ways a windows mobile app can be created in Visual Studio?  3  4  5  6 8) App is a sealed class which is i herited fro App class.  True  False  Unknown  None 9) Default methods available in App.xaml.cs file are:  OnLaunched & OnSuspended  OnLaunched & OnSuspending  OnLaunching & OnSuspending  None 10) To participate in activation, your app must register to receive the  WinJS activated event for XAML  Override OnActivated for HTML  WinJS activated event for HTML  None
  • 4. 11) App Visibility is synchronized with:  App Resume  AppClose  AppSuspend  None
  • 5. Windows Mobile App Development By Maryam Iqbal BCSF13A019 Date: June 8th, 2016 (Wednesday)
  • 6. Prerequisite  VS Studio  Download the Windows Phone SDK 8.0  Already know C#, XAML  Register your phone for development (Optional) https://msdn.microsoft.com/en- us/library/windows/apps/ff769508%28v=vs.105%29.aspx
  • 7. Life Cycle of Windows Mobile Application
  • 8. Life Cycle of Windows Mobile App Mainly an application can be in any of the following 3 states:  Running  Not running  Suspended But other than these states, your app can be in some other states as well which are discussed on upcoming slides.
  • 10. Cont.  App Launch  App Activation  App Suspend  App Visibility  App Resume  App Close  App Crash  App Removal For Details: https://channel9.msdn.com/Series/Windows-Phone-8-1- Development-for-Absolute-Beginners/Part-12-Understanding- the-App-s-Lifecycle-and-Managing-State
  • 11. App Launch  An app is launched whenever it is activated by the user and the app process was previously in the NotRunning state.  An app could be in the NotRunning state because it has never been launched, because it was running but then crashed, or because it was suspended but then couldn't be kept in memory and was terminated by the system.
  • 12. App Activation  An app can be activated by the user through a variety of contracts and extensions.  To participate in activation, your app must register to receive the WinJS activated event (HTML) or override the OnActivated method (XAML).  For HTML, WebUIApplication.activated is another event you can handle for activation.
  • 13. App Suspend  An app can be suspended when the user switches away from it or when the device enters a low power state.  When the user moves an app to the background, Windows waits a few seconds to see whether the user immediately switches back to the app. If the user does not switch back within this time window, Windows suspends the app.
  • 14. App Visibility  When the user switches from your app to another app, your app is no longer visible but remains in the Running state until Windows can suspend it. If the user switches away from your app but activates or switches back to it before it can suspended, the app remains in the Running state.  Your app doesn't receive an activation event when app visibility changes, because the app is still running. Windows simply switches to and from the app as necessary. If your app needs to do something when the user switches away and back, it can handle the visibilitychange event (for HTML) or Window.VisibilityChanged event (for XAML).  The visibility event is not serialized with the suspend/resume or activation events. Don't assume that these events come in a particular order.
  • 15. App Resume A suspended app is resumed when the user switches to it or when the device comes out of a low power state. When an app is resumed from the Suspended state, it enters the Running state and continues from where it was when it was suspended. No app data is lost, so long as it was stored in memory. Therefore, most apps don't need to do anything when they are resumed.
  • 16. App Close  Generally, users don't need to close apps, they can let Windows manage them. However, users can choose to close an app using the close gesture or by pressing Alt+F4 on Windows or by using the task switcher on Windows Phone.  There's no special event to indicate that the user has closed an app.  After an app has been closed by the user, it's suspended and terminated, and then enters the NotRunning state.  In Windows 8.1 and later, after an app has been closed by the user, the app is removed from the screen and switch list but not explicitly terminated.
  • 17. App Crash  Apps are required to follow the system crash experience, which is to simply return to the Start screen.  The system crash experience is designed to get users back to what they were doing as quickly as possible, so you shouldn't provide a warning dialog or other notification because that'll cause a delay for the user.  When the user activates an app after it crashes, its activation event handler receives an ApplicationExecutionState value of NotRunning, and should display its initial UI and data.  After a crash, don't routinely use the app data you would have used for Resuming with Suspended because that data could be corrupt
  • 18. App Removal  When a user deletes your app, the app is removed, along with all its local data.  Removing an app doesn't affect the user's data that was stored in common locations, such as files in the Documents or Pictures libraries.
  • 19. 5 Ways to Build Mobile Apps with Visual Studio
  • 20. 5 Ways to Build Mobile Apps with Visual Studio There are 5 different ways of creating a mobile app in Visual Studio, which are:  Web (Part 1) – Responsive Design  Web (Part 2) – Mobile Optimized Web Pages  Hybrid App  Native App  Xamarin We’ll use “Native App Way” You can read about all of them from : http://developer.telerik.com/featured/5-ways-to-build-mobile-apps-with- visual-studio/
  • 21. How to create Native Mobile App in VS
  • 22. Creation Let’s create a simple “Hello World App” Open VS 2013 or whatever version you have (2010, 2012 etc.) From top Menu Bar: File → New Project or CTRL+SHIFT+N. From new Dialogue Box: Visual C# → Store Apps → Windows Phone Apps → Blank App → Give Name “HelloWolrd”
  • 23. Cont.
  • 24. Cont.  Once you’ve created a project you’ll see App.xmal.cs file.  This file represents a class names as “App” which is a sealed class and inherited from “Application”.  Moreover it contains some methods:  OnLaunched  RootFrame_FirstNavigated  OnSuspending  Open MainPage.xaml. You’ll see a designer view and a code panel to design User Interface(UI).
  • 25. Cont. (MainPage.xaml) UI Code Panel Designer View
  • 26. Cont. (MainPage.xaml)  Now, first we’ll make a button. If you know WPF then it would be very easy.  To make a button write these lines inside <grid></grid> <Button Content="Click ME" Click="btnClick" HorizontalAlignment="Left" Margin="140,94,0,0" VerticalAlignment="Top"/>  As, we need something where text “Hello World” can be displayed so, we’ll use textblock not textbox because that is for taking input. So, we’ll use textblock. <TextBlock x:Name="myBlock" FontSize="25" TextAlignment="Center" HorizontalAlignment="Left" Margin="43,200,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="175" Width="305"/>
  • 28. Cont. (MainPage.xaml.cs)  Now write click event against the button we’ve just created.  Open MainPage.xaml.cs file or double click on button created in design.  Write following code in click event: private void btnClick(object sender, RoutedEventArgs e) { if (myBlock.Text == "") { myBlock.Text = "Hello World!"; } else myBlock.Text = ""; }
  • 30. Cont. Now run you application. Make sure HYPER-V option is enabled in your computer. If not then you can enable it from “turn windows feature on or off menu” (available in control panel). Select “Emulator 8.1 WVGA 4 inch 512 MB” Press CTRL+F5 or simply click the “Emulator 8.1 WVGA 4 inch 512 MB” button.
  • 31. Cont. It’ll take some time. So, wait. Click this button to see “Hello World”
  • 32. Cont. Here’s the Hello World in TextBlock.. If you’ll press button again, it’ll disappear.
  • 33. For further learning, you may visit: https://channel9.msdn.com/Series/Windows-Phone-8-1- Development-for-Absolute-Beginners https://msdn.microsoft.com/en- us/library/windows/apps/ff402529%28v=vs.105%29.aspx https://channel9.msdn.com/Series/Building-Apps-for- Windows-Phone-8-Jump-Start