SlideShare a Scribd company logo
1 of 180
Introduction to Course(LEC#1)
• We will discus:
• Introduction to course(1.1)
• This course in for(1.2)
• Recipes of this course(1.3)
• Tips for get most of from this course(1.4)
Android Development
Recipes(1.1)
This courser is fully practical course where we will create &
discus about real time android app development by using
java.
This course is for(1.2)
• This course is for those who want to be a good android
developer and wants to use java as their programming language.
• This course will be easy for those who have some experience in
java.
• For those who have some knowledge about Android Studio
Recipes of this course(1.3)
• Introduction
1. Set up the environment
2. CreatingVirtual device
3. Run 1st program
4.Run program on Physical Device
5. Run Program onVirtual Device
6.Tips for using android studio Effectively
Recipes of this course(1.3)
• Activities
7. Declaring an activity
8. Starting a new activity with an intent object
9. Switching between activities
10.Passing data to another activity
11.Returning a result from an activity
12.Saving an activity's state
13.Storing persistent activity data
14.Understanding the activity lifecycle
Recipes of this course(1.3)
• Layouts
15.Defining and inflating a layout
16.Using RelativeLayout
17.Using LinearLayout
18.Creating tables –TableLayout and GridLayout
19.Using ListView, GridView, and Adapters
20.Changing layout properties during runtime
21.Optimizing layouts with the HierarchyViewer
Recipes of this course(1.3)
• Views,Widgets, and Styles
22.Inserting a widget into a layout
23.Using graphics to show the button state
24.Creating a widget at runtime
25.Creating a custom component
26.Applying a style to aView
27.Turning a style into a theme
28.Selecting a theme based on the Android OS version
Recipes of this course(1.3)
• Menus
29.Creating an Options menu
30.Modifying menus and menu items during runtime
31.EnablingContextual Action Mode for a view
32.Using Contextual Batch Mode with a ListView
33.Creating a pop-up menu
Recipes of this course(1.3)
• Exploring Fragments, AppWidgets, and the System UI
34.Creating and using a Fragment
35.Adding and removing Fragments during runtime
36.Passing data between Fragments
37.Creating a shortcut on the Home screen
38.Creating a Home screen widget
39.Adding Search to the Action Bar
40.Showing your app full screen
Recipes of this course(1.3)
• Working with Data
41.Storing simple data
42.Read and write a text file to internal storage
43.Read and write a text file to external storage
44.Including resource files in your project
45.Creating and using an SQLite database
46.Access data in the background using a Loader
Recipes of this course(1.3)
• Alerts and Notifications
47.Lights, Action, and Sound – getting the user's attention!
48.Creating aToast using a custom layout
49.Displaying a message box with AlertDialog
50.Displaying a progress dialog
51.Lights, Action, and Sound Redux using Notifications
52.Creating a Media Player Notification
53.Making a Flashlight with a Heads-Up Notification
Recipes of this course(1.3)
• Using theTouchscreen and Sensors
54.Listening for click and long-press events
55.Recognizing tap and other common gestures
56.Pinch-to-zoom with multi-touch gestures
57.Swipe-to-Refresh
58.Listing available sensors – an introduction to theAndroid Sensor
Framework
59.Reading sensor data – using the Android Sensor Framework events
60.Reading device orientation
Recipes of this course(1.3)
• Graphics and Animation
61.Scaling down large images to avoid Out of Memory exceptions
62.transition animation – defining scenes and applying a transition
63.Creating a Compass using sensor data and RotateAnimation
64.Creating a slideshow withViewPager
65.Creating a Card FlipAnimation with Fragments
66.Creating a Zoom Animation with a CustomTransition
Recipes of this course(1.3)
• A First Look at OpenGL ES
67.Setting up the OpenGL ES environment
68.Drawing shapes on GLSurfaceView
69.Applying projection and camera view while drawing
70.Moving the triangle with rotation
71.Rotating the triangle with user input
Recipes of this course(1.3)
• Multimedia
72.Playing sound effects with SoundPool
73.Playing audio with MediaPlayer
74.Responding to hardware media controls in your app
75.Taking a photo with the default camera app
76.Taking a photo using the (old) Camera API
77.Taking a photo using the Camera2 (the new) API
Recipes of this course(1.3)
• Telephony, Networks, and theWeb
78. How to make a phone call
79. Monitoring phone call events
80. How to send SMS (text) messages
81. Receiving SMS messages
82. Displaying a web page in your application
83. Checking online status and connection type
84. Getting started with Volley for Internet requests
85. Canceling a Volley request
86. Using Volley to request a JSON response
87. Using Volley to request an image
88. Using Volley's NetworkImageView and ImageLoader
Recipes of this course(1.3)
• Getting Location and Using Geofencing
89.How to get the last location
90.Resolving problems reported with the GoogleApiClient
OnConnectionFailedListener
91.How to receive location updates
92.Create and monitor a Geofence
Recipes of this course(1.3)
• Getting your app ready for the Play Store
93.The new Android 6.0 Run-Time permission model
94.How to schedule an alarm
95.Receive notification of device boot
96.Using AsyncTask for background work
97.Adding speech recognition to your app
98.Push Notification using Google Cloud Messaging
99.How to add Google sign-in to your app
Recipes of this course(1.3)
• The Backend as a Service(BaaS) Options
100.App42
101.Backendless
102.Buddy
103.Firebase
104.Kinvey
Tips to get most of from this course(1.4)
• Practice as a discuss
• 1st understand then write
• Comment if any query
• Follow all discussions
• Do not skip
• Try that concept by your self
Introduction recipes(2.0)
• Introduction
1. Set up the environment(2.1)
2. Run 1st program(2.2)
3. CreatingVirtual device(2.3)
4.Run program on Physical Device(2.4)
5. Run Program onVirtual Device(2.5)
6.Tips for using android studio Effectively(2.6)
Introduction recipe(2.0.0)
• What is Android?
• Android is an operating system and programming platform developed by
Google for smartphones and other mobile devices(such as tablets). I
• t can run on many different devices from many different manufacturers.
• Android includes a software development kit for writing original code and
assembling software modules to create apps for Android users.
• It also provides a marketplace to distribute apps.
• All together,Android represents an ecosystem for mobile apps.
Introduction recipe(2.0.1)
• Why develop apps for Android?
• Apps are developed for a variety of reasons:
• addressing business requirements, building new services, creating
new businesses, and providing games and other types of content
for users
• Developers choose to develop for Android in order to reach the
majority of mobile device users.
Introduction recipe(2.0.2)
• Most popular platform for mobile apps:
• As the world's most popular mobile platform, Android powers
hundreds of millions of mobile devices in more than 190 countries
around the world.
• It has the largest installed base of any mobile platform and is still
growing fast.
• Every day another million users power up their Android devices for
the first time and start looking for apps, games, and other digital
content.
Introduction recipe(2.0.3)
• Best experience for app users:
• Android provides a touch-screen user interface (UI) for interacting with
apps.
• Android's user interface is mainly based on direct manipulation, using
touch gestures such as swiping, tapping and pinching to manipulate
on-screen objects.
• In addition to the keyboard, there’s a customizable virtual keyboard for
text input.
• Android can also support game controllers and full-size physical
keyboards connected by Bluetooth or USB.
• Android can also play multimedia content such as music, animation,
and video.
Introduction recipe(2.0.3)
• Android is designed to provide immediate response to user input.
Besides a fluid touch interface, the vibration capabilities of an Android
device can provide haptic feedback.
• Internal hardware such as accelerometers, gyroscopes and proximity
sensors, are used by many apps to respond to additional user actions.
• These sensors can detect rotation of the screen
• from portrait to landscape for a wider view or it can allow the user to
steer a virtual vehicle in a racing game by rotating the device as if it
were a steering wheel.
• Android devices are usually battery-powered,Android is designed to
manage processes to keep power consumption at a minimum,
providing longer battery use.
Introduction recipe(2.0.4)
• Easy to develop apps:
• Use the Android software development kit (SDK) to develop apps that take
advantage of the Android operating system and UI.
• To develop apps using the SDK, use the Java programming language for
developing the app and Extensible Markup Language (XML) files for describing
data resources.
• By writing the code in Java and creating a single app binary, you will have an app
that can run on both phone and tablet form factors.
• Google offers a full Java Integrated Development Environment (IDE) called
Android Studio, with advanced features for developing, debugging, and
packaging Android apps.
• Android Studio, help to develop on any available Android device, or create
virtual devices that emulate any hardware configuration.
Introduction recipe(2.0.4)
• Android provides a rich development architecture.You don’t need
to know much about the components of this architecture, but it is
useful to know what is available in the system for your app to use.
Introduction recipe(2.0.5)
• Many distribution options:
• You can distribute your Android app in many different ways:
email, website or an app marketplace such as Google Play.
• Google Play is a digital distribution service, operated and
developed by Google, that serves as the official appstore for
Android, allowing consumers to browse and download apps
developed with the Android SDK and published through Google.
Introduction recipe(2.0.6)
• The challenges of Android app development:
• While the Android platform provide rich functionality for app
development, there are still a number of challenges you need to
address, such as:
• Building for a multi-screen world
• Getting performance right
• Keeping your code and your users secure
• Remaining compatible with older platform versions
• Understanding the market and the user.
Setup the environment recipe(2.1)
• JDK(2.1.1)
• Download
• Install
• Set EnvironmentVariable(2.1.2)
• Android Studio(2.1.3)
• download
• InstallAndroid Studio(2.1.4)
• Install
• Install android SDK
Create new Project recipe(2.2)
• Create new ProjectTest(2.2.0)
• Name the projectTest
• Select Minimum support version
• ExploreAndroid Studio(2.2.1)
CreatingVirtual Device recipe(2.3)
• Create virtual Device
• CreateVirtual Device
• Select device
• Select device Version
• Download Version
• Run project onVirtual Device
Run Recipe on Physical Device(2.4)
• Run recipe on physical real device
• Connect your device with PC
• Take Cable
• Take android Device
• Connect Device with PC by cable
• Run Project
Tips for using Android Studio recipe(2.5)
• Tips for UsingAndroid Studio
1. Prioritize
2. ChangeThem to black
3. Increase font size
4. Auto Import
Activities Recipes(3.0)
• Activities
7. Declaring an activity (3.1)
8. Starting a new activity with an intent object (3.2)
9. Switching between activities (3.3)
10.Passing data to another activity (3.4)
11.Returning a result from an activity (3.5)
12.Saving an activity's state (3.6)
13.Storing persistent activity data (3.7)
14.Understanding the activity lifecycle (3.8)
Activities Recipes(3.0)
• An activity represents a single screen in your app with an
interface the user can interact with.
• Your app is a collection of activities that you either create
yourself, or that you reuse from other apps.
• activities in your app work together to form a cohesive user
experience in your app, each one is independent of the others.
This enables your app to start activities in other apps, and other
apps can start your activities (if your app allows it).
Activities Recipes(3.0)
Activities Recipes(3.0)
• one activity in an app is specified as the "main" activity, which is
presented to the user when launching the application for the first
time. Each activity can then start other activities in order to
perform different actions.
• Each time a new activity starts, the previous activity is stopped,
but the system preserves the activity in a stack (the "back
stack").When the user is done with the current activity and
presses the Back button, it is popped from the stack (and
destroyed) and the previous activity resumes.
Declare An Activity(3.1)
1. Create new project named DeclareActivity
2. Launch MainActivity
3. Create New SecondActivity
4.Change launcher to second Activity from Manifest file
Starting a new Activity with an intent Recipe(3.2)
1. Understand Intent(R 3.2.0)
1. Intent ?
• Intents are message objects that make a request to the Android runtime to start an activity or other
app component in your app or in some other app.
2. Explicit Intent
• Explicit intents specify the receiving activity (or other component) by that activity's fully-qualified
class name. Use an explicit intent to start a component in your own app
3. Implicit Intent
• Implicit intents do not specify a specific activity or other component to receive the intent. Instead
you declare a general action to perform in the intent.
2. Create New Project Intent. (R 3.2.1)
3. Create other Activity SecondActivity.
4. Create a button to move to SecondActivity.
5. Launch App
6. Click button and go to SecondActivity.
Switch B/w Activities Recipe(3.3)
Understand Back Stack Operation in Android
• Create new Project SwitchActivities
• Create 2 more activities named SecondActivity,ThirdActivty.
• Use Explicit intent to switch.
• Create 1 button each to switch
• Main to 2nd
• 2nd to 3rd
• 3rd to main
• Set views to understand about current Activity & states
• Run app & use IT
• Understand the states of activities.
Passing data to an other activity Recipe(3.4)
1. Create new Project IntentData.
2. CreateTwo Activities one for sending data & other for receiving.
3. Create button for sending the data & text field for receiving the
data.
4.LaunchApp & Understand Operations by using.
Returning a result from a activity Recipe(3.5)
• Create Project Return Results with two Activities.
• One for sending the data & other for receiving.
• Create EditText field from which we will get results to 1st .
Saving a activity’s state Recipe(3.6)
• SavingState of activity
Storing persistentActivity data Recipe(3.7)
Understanding the activity life cycle Recipe(3.8)
Layouts recipe(4.0)
• Layouts
15.Defining and inflating a layout (4.1)
16.Using RelativeLayout (4.2)
17.Using LinearLayout (4.3)
18.Creating tables –TableLayout and GridLayout (4.4)
19.Using ListView, GridView, and Adapters (4.5)
20.Changing layout properties during runtime (4.6)
21.Optimizing layouts with the HierarchyViewer (4.7)
Layouts recipe(4.0)
Defining & Inflating a layout recipe(4.1)
Using relative Layout recipe(4.2)
Using Linear Layout recipe(4.3)
CreatingTables recipe(4.4.1)
Table Layout recipe(4.4.2)
Grid Layout recipe(4.4.3)
Using List view recipe(4.5.1)
Using GridView recipe(4.5.2)
Using Adapters recipe(4.5.3)
Changing Layout properties during runtime recipe(4.6)
Optimizing Layouts with the hierarchy viewer recipe(4.7)
View,Widgets & Styles Recipes(5.0)
• Views,Widgets, and Styles
22.Inserting a widget into a layout (5.1)
23.Using graphics to show the button state (5.2)
24.Creating a widget at runtime (5.3)
25.Creating a custom component (5.4)
26.Applying a style to aView (5.5)
27.Turning a style into a theme (5.6)
28.Selecting a theme based on the Android OS version (5.7)
View,Widgets & Styles Recipe(5.0)
Inserting a widget into a layout Recipe(5.1)
Using graphics to show the button state Recipe(5.2)
Creating a widget at runtime Recipe(5.3)
Creating a custom component Recipe(5.4)
Applying a style to a view Recipe(5.5)
Turing a style into a theme Recipe(5.6)
Selecting a theme based on the android OS version Recipe(5.7)
Menus Recipes(6.0)
• Menus
29.Creating an Options menu (6.1)
30.Modifying menus and menu items during runtime (6.2)
31.EnablingContextual Action Mode for a view (6.3)
32.Using Contextual Batch Mode with a ListView (6.4)
33.Creating a pop-up menu (6.5)
Menu Recipe(6.0)
Creating a option menu Recipe(6.1)
Modifying menus & menu items during runtime Recipe(6.2)
Enabling contextual action mode for a view Recipe(6.3)
Using contextual batch mode with a list view Recipe(6.4)
Creating a pop-up Menu Recipe(6.5)
Exploring Fragments, AppWidgets, and the System UI recipes(7.0)
• Exploring Fragments, AppWidgets, and the System UI
34.Creating and using a Fragment (7.1)
35.Adding and removing Fragments during runtime (7.2)
36.Passing data between Fragments (7.3)
37.Creating a shortcut on the Home screen (7.4)
38.Creating a Home screen widget (7.5)
39.Adding Search to the Action Bar (7.6)
40.Showing your app full screen (7.7)
Exploring Fragments, AppWidgets, and the System UI recipe(7.0)
Creating & using a fragment recipe(7.1)
Adding & Removing fragments during run time recipe(7.2)
Passing data b/w fragments recipe(7.3)
Creating a shortcut on the home screen recipe(7.4)
Creating a home screen widget recipe(7.5)
Adding search to the action bar recipe(7.6)
Showing your app full screen recipe(7.7)
Working with data recipes(8.0)
• Working with Data
41.Storing simple data (8.1)
42.Read and write a text file to internal storage (8.2)
43.Read and write a text file to external storage (8.3)
44.Including resource files in your project (8.4)
45.Creating and using an SQLite database (8.5)
46.Access data in the background using a Loader (8.6)
Working with data recipe(8.0)
Storing simple data recipe(8.1)
Read and write a text file to internal storage recipe(8.2)
Read and write a text file to external storage recipe(8.3)
Including resource files in your project recipe(8.4)
Creating and using an SQLite database recipe(8.5)
Access data in the background using a Loader recipe(8.6)
Alerts and Notifications Recipes(9.0)
• Alerts and Notifications
47.Lights, Action, and Sound – getting the user's attention! (9.1)
48.Creating aToast using a custom layout (9.2)
49.Displaying a message box with AlertDialog (9.3)
50.Displaying a progress dialog (9.4)
51.Lights, Action, and Sound Redux using Notifications (9.5)
52.Creating a Media Player Notification (9.6)
53.Making a Flashlight with a Heads-Up Notification (9.7)
Alerts and Notifications Recipe(9.0)
Lights, Action, and Sound – getting the user's attention! Recipe(9.1)
Creating aToast using a custom layout Recipe(9.2)
Displaying a message box with AlertDialog Recipe(9.3)
Displaying a progress dialog Recipe(9.4)
Lights,Action, and Sound Redux using Notifications Recipe(9.5)
Creating a Media Player Notification Recipe(9.6)
Making a Flashlight with a Heads-Up Notification Recipe(9.7)
Using theTouchscreen and Sensors
Recipes(10.0)
• Using theTouchscreen and Sensors
54.Listening for click and long-press events (10.1)
55.Recognizing tap and other common gestures (10.2)
56.Pinch-to-zoom with multi-touch gestures (10.3)
57.Swipe-to-Refresh (10.4)
58.Listing available sensors – an introduction to theAndroid Sensor
Framework (10.5)
59.Reading sensor data – using theAndroid Sensor Framework events
(10.6)
60.Reading device orientation (10.7)
Using theTouchscreen and Sensors Recipe(10.0)
Listening for click and long-press events Recipe(10.1)
Recognizing tap and other common gestures Recipe(10.2)
Pinch-to-zoom with multi-touch gestures Recipe(10.3)
Swipe-to-Refresh Recipe(10.4)
Listing available sensors – an introduction to theAndroid Sensor Framework Recipe(10.5)
Reading sensor data – using the Android Sensor Framework events Recipe(10.6)
Reading device orientation Recipe(10.7)
Graphics and Animation recipes(11.0)
• Graphics and Animation
61.Scaling down large images to avoid Out of Memory exceptions
(11.1)
62.transition animation – defining scenes and applying a transition
(11.2)
63.Creating a Compass using sensor data and RotateAnimation
(11.3)
64.Creating a slideshow withViewPager (11.4)
65.Creating a Card FlipAnimation with Fragments (11.5)
66.Creating a Zoom Animation with a CustomTransition (11.6)
Graphics and Animation recipe(11.0)
Scaling down large images to avoid Out of Memory exceptions recipe(11.1)
transition animation – defining scenes and applying a transition recipe(11.2)
Creating a Compass using sensor data and RotateAnimation recipe(11.3)
Creating a slideshow withViewPager recipe(11.4)
Creating a Card Flip Animation with Fragments recipe(11.5)
Creating a Zoom Animation with a CustomTransition recipe(11.6)
A First Look at OpenGL ES Recipes(12.0)
• A First Look at OpenGL ES
67.Setting up the OpenGL ES environment (12.1)
68.Drawing shapes on GLSurfaceView (12.2)
69.Applying projection and camera view while drawing (12.3)
70.Moving the triangle with rotation (12.4)
71.Rotating the triangle with user input (12.5)
A First Look at OpenGL ES Recipe(12.0)
Setting up the OpenGL ES environment Recipe(12.1)
Drawing shapes of GL-surface-view Recipe(12.2)
Applying projection and camera view while drawing Recipe(12.3)
Moving the triangle with rotation Recipe(12.4)
Rotating the triangle with user inputs Recipe(12.5)
Multimedia recipes(13.0)
• Multimedia
72.Playing sound effects with SoundPool (13.1)
73.Playing audio with MediaPlayer (13.2)
74.Responding to hardware media controls in your app (13.3)
75.Taking a photo with the default camera app (13.4)
76.Taking a photo using the (old) Camera API (13.5)
77.Taking a photo using the Camera2 (the new) API (13.6)
Multimedia recipe(13.0)
Playing sound effects with sound-pool recipe(13.1)
Playing audio with media player recipe(13.2)
Responding to hardware media controls in your app recipe(13.3)
Taking a photo with the default camera App recipe(13.4)
Taking a photo with the old camera API recipe(13.5)
Taking a photo using the camera2 new API recipe(13.6)
Telephony, Networks, and theWeb Recipes (14.0)
• Telephony, Networks, and theWeb
78. How to make a phone call (14.1)
79. Monitoring phone call events (14.2)
80. How to send SMS (text) messages (14.3)
81. Receiving SMS messages (14.4)
82. Displaying a web page in your application (14.5)
83. Checking online status and connection type (14.6)
84. Getting started with Volley for Internet requests (14.7)
85. Canceling a Volley request (14.8)
86. Using Volley to request a JSON response(14.9)
87. Using Volley to request an image (14.10)
88. Using Volley's NetworkImageView and ImageLoader (14.11)
Telephony, Networks, and theWeb Recipe (14.0)
How to make a phone call Recipe (14.1)
Monitor phone call events Recipe (14.2)
How to send SMS(text) messages Recipe (14.3)
Receive SMS messages Recipe (14.4)
Displaying a webpage in your application Recipe (14.5)
Check online status & connectionType Recipe (14.6)
Getting started with volley for internet requests Recipe (14.7)
Canceling a volley requests Recipe (14.8)
Using volley to request a json response Recipe (14.9)
Using volley to request an image Recipe (14.10)
UsingVolley’s Network-image-view & Image-loader Recipe (14.11)
Getting Location and UsingGeofencing recipes(15.0)
• Getting Location and Using Geofencing
89.How to get the last location (15.1)
90.Resolving problems reported with the GoogleApiClient
OnConnectionFailedListener (15.2)
91.How to receive location updates (15.3)
92.Create and monitor a Geofence (15.4)
Getting Location and UsingGeofencing recipe(15.0)
How to get the last location recipe(15.1)
Resolving problems reported with google-api-client-on-connection-failed-listener recipe(15.2)
How to receive location updates recipe(15.3)
Create & monitor a Geofence recipe(15.4)
Getting your app ready for the Play Store recipes (16.0)
• Getting your app ready for the Play Store
93.The new Android 6.0 Run-Time permission model (16.1)
94.How to schedule an alarm (16.2)
95.Receive notification of device boot (16.3)
96.Using AsyncTask for background work (16.4)
97.Adding speech recognition to your app (16.5)
98.Push Notification using Google Cloud Messaging (16.6)
99.How to add Google sign-in to your app (16.7)
Getting your app ready for the Play Store recipe (16.0)
The newAndroid run-time permissions model recipe (16.1)
How to schedule a alarm recipe (16.2)
Receive notification of device boot recipe (16.3)
Using async-task for background work recipe (16.4)
Adding speech recognition to your phone recipe (16.5)
Push notification using google cloud messaging recipe (16.6)
How to add google sign-in into your app recipe (16.7)
The BackendAs Service Options Recipes(17.0)
• The Backend as a Service Options
100.App42 (17.1)
101.Backendless (17.2)
102.Buddy (17.3)
103.Firebase (17.4)
104.Kinvey (17.5)
The BackendAs Service Options Recipe(17.0)
• As your application and user base grow, it's likely you'll want to
connect your app across devices and even users, such as a high
score leaderboard.You have two choices:
• Create and maintain your own server
• Use a Backend as a Service (BaaS) provider
The BackendAs Service Options Recipe(17.0)
• take a look at several BaaS providers with features specifically
targeting Android developers.
App42 Recipe(17.1)
• App42 is the BaaSAPI product of ShepHertz, a cloud provider
of multiple services, including gaming platforms, Platform as
a Service, and Marketing Analytics.
• They have a very rich feature set, including many services
especially useful for games.
App42 Recipe(17.1)
• The App42 Android SDK supports the following:
• User service
• Storage service (Storage as a service (SaaS) is a business model
in which a company leases or rents its storage infrastructure to
another company or individuals to store data.)
• Custom code service (Custom Programming means custom-
developed software and modifications to other software,
including Source Code, Object Code and related Documentation)
App42 Recipe(17.1)
• Push notification service (A push notification is a short in-app, or
web-based pop-up message. Push notifications are used for
various purposes: from sending system messages and in-app
updates to promotions.The key idea of sending push
notifications is to provide users with more value and keep them
engaged.)
• Event service (An instance or occasion of assistance received by a
client from a service provider.)
• Gift management service (A gift is property, money, or assets that
one person gives to another while receiving nothing or less than fair
market value in return.)
App42 Recipe(17.1)
• Timer service (Timer service is a JEE utility that can be used to schedule
notifications in enterprise applications. )
• Social service (Social services are a range of public services provided by the
government, private, profit and non-profit organizations.)
• A/B test service (A/B testing (also known as split testing or bucket testing) is a
method of comparing two versions of a webpage or app against each other to
determine which one performs better.)
• Buddy service (The buddy system is a procedure in which two individuals, the
"buddies", operate together as a single unit so that they are able to monitor and
help each other.)
• Avatar service (Graphical representation of user & user characters)
• Achievement service (An achievement is a great accomplishment—something
achieved with great effort or skill. )
App42 Recipe(17.1)
• Leaderboard service (It's a collection of high scores achieved in a
game session during a specific time segment in a specific portion of
a game for a specific set of users.)
• Reward service (something that is given in return for good or evil
done or received or that is offered or given for some service or
attainment the police offered a reward for his capture.)
• Upload service (Uploading means data is being sent from your
computer to the Internet. Examples of uploading include sending
email, posting photos on a social media site and using your
webcam.)
• Gallery service
App42 Recipe(17.1)
• Geo service ('Geo services' can be used to define an industry
encompassing all interactive digital mapping and location-
based services.)
• Session service (a session refers to a limited time of
communication between two systems. Some sessions involve a
client and a server, while other sessions involve two personal
computers. A common type of client/server session is aWeb or
HTTP session.)
App42 Recipe(17.1)
• Review service (A service review is a review of an
organization's services designed to identify
potential service delivery improvements.
• Cart service (CART Service means CommunicationAccess Real-
timeTranslation Service.CART Service provides instantaneous
translation of what is being said into visual print display so that it
can be read (instead of heard). CART Service is one means of
communication access for deaf or hard of hearing individuals
who read English fluently)
• Catalogue service
App42 Recipe(17.1)
• Message service (SMS (short message service) is
a text messaging service component of most telephone, Internet, and
mobile device systems.)
• Recommender service(The goal of a recommender system is to generate
meaningful recommendations to a collection of users for items or products
that might interest them.)
• Email service (Email services offer user-friendly features to
manage mailing lists, email design, and metrics to monitor your success.)
• Logging service (Logging as a service (LaaS) is an IT architectural model for
centrally ingesting and collecting any type of log files coming from any
given source or location; such as servers, applications, devices etc.)
App42 Recipe (Practical)
1. Create a new project in Android Studio and call it App42. Use the
default Phone &Tablet option and select Empty Activity when
prompted for ActivityType.
• Download and extract the App42 SDK from the following link:
• https://github.com/shephertz/App42_ANDROID_SDK/archive/master.z
ip
• After creating your App42 account
1. log in to the AppHQ ManagementConsole,
2. register your app.
• You will need the ApiKey and SecretKey.
App42 Recipe (Practical)
• To add support for App42 to your project, start by opening the Android
Manifest and following these steps:
1. Add the following permissions:
<uses-permission android:name= "android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
2. Open the following folder in your file browser: <project folder>App42app libs
(if the libs folder does not exist, create it) and copy the App42_ANDROID-
CAMPAIGN_x.x.jar file to the applibs folder.
3. Open the app module's Gradle build file: build.gradle (Module: app) and add the
following to the dependencies section:
compile files('libs/App42_ANDROID-CAMPAIGN_x.x.jar')
App42 Recipe (Practical)
4. OpenActivityMain.java and add the following import:
import com.shephertz.app42.paas.sdk.android.App42API;
5. Add the following code to the onCreate() callback:
App42API.initialize(this, "YOUR_API_KEY",
"YOUR_SECRET_KEY");
6. You're ready to run the application on a device or emulator.
Backendless Recipe(17.2)
Buddy Recipe(17.3)
Firebase Recipe(17.4)
Kinvey Recipe(17.5)

More Related Content

Similar to Android Development recipes with java.pptx

Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
Joe Jacob
 
City search documentation
City search documentationCity search documentation
City search documentation
Rajesh Varanasi
 
summer file - Copy
summer file - Copysummer file - Copy
summer file - Copy
Rakesh Kumar
 

Similar to Android Development recipes with java.pptx (20)

Android Seminar BY Suleman Khan.pdf
Android Seminar BY Suleman Khan.pdfAndroid Seminar BY Suleman Khan.pdf
Android Seminar BY Suleman Khan.pdf
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android ppt
Android ppt Android ppt
Android ppt
 
Android Applications
Android ApplicationsAndroid Applications
Android Applications
 
Synapse india reviews on i phone and android os
Synapse india reviews on i phone and android osSynapse india reviews on i phone and android os
Synapse india reviews on i phone and android os
 
Synapse india mobile apps update
Synapse india mobile apps updateSynapse india mobile apps update
Synapse india mobile apps update
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Basic of Android App Development
Basic of Android App DevelopmentBasic of Android App Development
Basic of Android App Development
 
City search documentation
City search documentationCity search documentation
City search documentation
 
summer file - Copy
summer file - Copysummer file - Copy
summer file - Copy
 
Android
AndroidAndroid
Android
 
Language learning using augmented reality
Language learning using augmented realityLanguage learning using augmented reality
Language learning using augmented reality
 
Engineering and Industrial Mobile Application (APP) Development
Engineering and Industrial Mobile Application (APP) DevelopmentEngineering and Industrial Mobile Application (APP) Development
Engineering and Industrial Mobile Application (APP) Development
 
Android quick talk
Android quick talkAndroid quick talk
Android quick talk
 
Webinar on How to use MyAppConverter
Webinar on How to use  MyAppConverterWebinar on How to use  MyAppConverter
Webinar on How to use MyAppConverter
 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android Application
 
Android Seminar || history || versions||application developement
Android Seminar || history || versions||application developement Android Seminar || history || versions||application developement
Android Seminar || history || versions||application developement
 
App42 Student Lab - Android Game Dev Series V 0.1
App42 Student Lab - Android Game Dev Series V 0.1App42 Student Lab - Android Game Dev Series V 0.1
App42 Student Lab - Android Game Dev Series V 0.1
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 

Android Development recipes with java.pptx

  • 1. Introduction to Course(LEC#1) • We will discus: • Introduction to course(1.1) • This course in for(1.2) • Recipes of this course(1.3) • Tips for get most of from this course(1.4)
  • 2. Android Development Recipes(1.1) This courser is fully practical course where we will create & discus about real time android app development by using java.
  • 3. This course is for(1.2) • This course is for those who want to be a good android developer and wants to use java as their programming language. • This course will be easy for those who have some experience in java. • For those who have some knowledge about Android Studio
  • 4. Recipes of this course(1.3) • Introduction 1. Set up the environment 2. CreatingVirtual device 3. Run 1st program 4.Run program on Physical Device 5. Run Program onVirtual Device 6.Tips for using android studio Effectively
  • 5. Recipes of this course(1.3) • Activities 7. Declaring an activity 8. Starting a new activity with an intent object 9. Switching between activities 10.Passing data to another activity 11.Returning a result from an activity 12.Saving an activity's state 13.Storing persistent activity data 14.Understanding the activity lifecycle
  • 6. Recipes of this course(1.3) • Layouts 15.Defining and inflating a layout 16.Using RelativeLayout 17.Using LinearLayout 18.Creating tables –TableLayout and GridLayout 19.Using ListView, GridView, and Adapters 20.Changing layout properties during runtime 21.Optimizing layouts with the HierarchyViewer
  • 7. Recipes of this course(1.3) • Views,Widgets, and Styles 22.Inserting a widget into a layout 23.Using graphics to show the button state 24.Creating a widget at runtime 25.Creating a custom component 26.Applying a style to aView 27.Turning a style into a theme 28.Selecting a theme based on the Android OS version
  • 8. Recipes of this course(1.3) • Menus 29.Creating an Options menu 30.Modifying menus and menu items during runtime 31.EnablingContextual Action Mode for a view 32.Using Contextual Batch Mode with a ListView 33.Creating a pop-up menu
  • 9. Recipes of this course(1.3) • Exploring Fragments, AppWidgets, and the System UI 34.Creating and using a Fragment 35.Adding and removing Fragments during runtime 36.Passing data between Fragments 37.Creating a shortcut on the Home screen 38.Creating a Home screen widget 39.Adding Search to the Action Bar 40.Showing your app full screen
  • 10. Recipes of this course(1.3) • Working with Data 41.Storing simple data 42.Read and write a text file to internal storage 43.Read and write a text file to external storage 44.Including resource files in your project 45.Creating and using an SQLite database 46.Access data in the background using a Loader
  • 11. Recipes of this course(1.3) • Alerts and Notifications 47.Lights, Action, and Sound – getting the user's attention! 48.Creating aToast using a custom layout 49.Displaying a message box with AlertDialog 50.Displaying a progress dialog 51.Lights, Action, and Sound Redux using Notifications 52.Creating a Media Player Notification 53.Making a Flashlight with a Heads-Up Notification
  • 12. Recipes of this course(1.3) • Using theTouchscreen and Sensors 54.Listening for click and long-press events 55.Recognizing tap and other common gestures 56.Pinch-to-zoom with multi-touch gestures 57.Swipe-to-Refresh 58.Listing available sensors – an introduction to theAndroid Sensor Framework 59.Reading sensor data – using the Android Sensor Framework events 60.Reading device orientation
  • 13. Recipes of this course(1.3) • Graphics and Animation 61.Scaling down large images to avoid Out of Memory exceptions 62.transition animation – defining scenes and applying a transition 63.Creating a Compass using sensor data and RotateAnimation 64.Creating a slideshow withViewPager 65.Creating a Card FlipAnimation with Fragments 66.Creating a Zoom Animation with a CustomTransition
  • 14. Recipes of this course(1.3) • A First Look at OpenGL ES 67.Setting up the OpenGL ES environment 68.Drawing shapes on GLSurfaceView 69.Applying projection and camera view while drawing 70.Moving the triangle with rotation 71.Rotating the triangle with user input
  • 15. Recipes of this course(1.3) • Multimedia 72.Playing sound effects with SoundPool 73.Playing audio with MediaPlayer 74.Responding to hardware media controls in your app 75.Taking a photo with the default camera app 76.Taking a photo using the (old) Camera API 77.Taking a photo using the Camera2 (the new) API
  • 16. Recipes of this course(1.3) • Telephony, Networks, and theWeb 78. How to make a phone call 79. Monitoring phone call events 80. How to send SMS (text) messages 81. Receiving SMS messages 82. Displaying a web page in your application 83. Checking online status and connection type 84. Getting started with Volley for Internet requests 85. Canceling a Volley request 86. Using Volley to request a JSON response 87. Using Volley to request an image 88. Using Volley's NetworkImageView and ImageLoader
  • 17. Recipes of this course(1.3) • Getting Location and Using Geofencing 89.How to get the last location 90.Resolving problems reported with the GoogleApiClient OnConnectionFailedListener 91.How to receive location updates 92.Create and monitor a Geofence
  • 18. Recipes of this course(1.3) • Getting your app ready for the Play Store 93.The new Android 6.0 Run-Time permission model 94.How to schedule an alarm 95.Receive notification of device boot 96.Using AsyncTask for background work 97.Adding speech recognition to your app 98.Push Notification using Google Cloud Messaging 99.How to add Google sign-in to your app
  • 19. Recipes of this course(1.3) • The Backend as a Service(BaaS) Options 100.App42 101.Backendless 102.Buddy 103.Firebase 104.Kinvey
  • 20. Tips to get most of from this course(1.4) • Practice as a discuss • 1st understand then write • Comment if any query • Follow all discussions • Do not skip • Try that concept by your self
  • 21. Introduction recipes(2.0) • Introduction 1. Set up the environment(2.1) 2. Run 1st program(2.2) 3. CreatingVirtual device(2.3) 4.Run program on Physical Device(2.4) 5. Run Program onVirtual Device(2.5) 6.Tips for using android studio Effectively(2.6)
  • 22. Introduction recipe(2.0.0) • What is Android? • Android is an operating system and programming platform developed by Google for smartphones and other mobile devices(such as tablets). I • t can run on many different devices from many different manufacturers. • Android includes a software development kit for writing original code and assembling software modules to create apps for Android users. • It also provides a marketplace to distribute apps. • All together,Android represents an ecosystem for mobile apps.
  • 23. Introduction recipe(2.0.1) • Why develop apps for Android? • Apps are developed for a variety of reasons: • addressing business requirements, building new services, creating new businesses, and providing games and other types of content for users • Developers choose to develop for Android in order to reach the majority of mobile device users.
  • 24. Introduction recipe(2.0.2) • Most popular platform for mobile apps: • As the world's most popular mobile platform, Android powers hundreds of millions of mobile devices in more than 190 countries around the world. • It has the largest installed base of any mobile platform and is still growing fast. • Every day another million users power up their Android devices for the first time and start looking for apps, games, and other digital content.
  • 25. Introduction recipe(2.0.3) • Best experience for app users: • Android provides a touch-screen user interface (UI) for interacting with apps. • Android's user interface is mainly based on direct manipulation, using touch gestures such as swiping, tapping and pinching to manipulate on-screen objects. • In addition to the keyboard, there’s a customizable virtual keyboard for text input. • Android can also support game controllers and full-size physical keyboards connected by Bluetooth or USB. • Android can also play multimedia content such as music, animation, and video.
  • 26. Introduction recipe(2.0.3) • Android is designed to provide immediate response to user input. Besides a fluid touch interface, the vibration capabilities of an Android device can provide haptic feedback. • Internal hardware such as accelerometers, gyroscopes and proximity sensors, are used by many apps to respond to additional user actions. • These sensors can detect rotation of the screen • from portrait to landscape for a wider view or it can allow the user to steer a virtual vehicle in a racing game by rotating the device as if it were a steering wheel. • Android devices are usually battery-powered,Android is designed to manage processes to keep power consumption at a minimum, providing longer battery use.
  • 27. Introduction recipe(2.0.4) • Easy to develop apps: • Use the Android software development kit (SDK) to develop apps that take advantage of the Android operating system and UI. • To develop apps using the SDK, use the Java programming language for developing the app and Extensible Markup Language (XML) files for describing data resources. • By writing the code in Java and creating a single app binary, you will have an app that can run on both phone and tablet form factors. • Google offers a full Java Integrated Development Environment (IDE) called Android Studio, with advanced features for developing, debugging, and packaging Android apps. • Android Studio, help to develop on any available Android device, or create virtual devices that emulate any hardware configuration.
  • 28. Introduction recipe(2.0.4) • Android provides a rich development architecture.You don’t need to know much about the components of this architecture, but it is useful to know what is available in the system for your app to use.
  • 29. Introduction recipe(2.0.5) • Many distribution options: • You can distribute your Android app in many different ways: email, website or an app marketplace such as Google Play. • Google Play is a digital distribution service, operated and developed by Google, that serves as the official appstore for Android, allowing consumers to browse and download apps developed with the Android SDK and published through Google.
  • 30. Introduction recipe(2.0.6) • The challenges of Android app development: • While the Android platform provide rich functionality for app development, there are still a number of challenges you need to address, such as: • Building for a multi-screen world • Getting performance right • Keeping your code and your users secure • Remaining compatible with older platform versions • Understanding the market and the user.
  • 31. Setup the environment recipe(2.1) • JDK(2.1.1) • Download • Install • Set EnvironmentVariable(2.1.2) • Android Studio(2.1.3) • download • InstallAndroid Studio(2.1.4) • Install • Install android SDK
  • 32. Create new Project recipe(2.2) • Create new ProjectTest(2.2.0) • Name the projectTest • Select Minimum support version • ExploreAndroid Studio(2.2.1)
  • 33. CreatingVirtual Device recipe(2.3) • Create virtual Device • CreateVirtual Device • Select device • Select device Version • Download Version • Run project onVirtual Device
  • 34. Run Recipe on Physical Device(2.4) • Run recipe on physical real device • Connect your device with PC • Take Cable • Take android Device • Connect Device with PC by cable • Run Project
  • 35. Tips for using Android Studio recipe(2.5) • Tips for UsingAndroid Studio 1. Prioritize 2. ChangeThem to black 3. Increase font size 4. Auto Import
  • 36. Activities Recipes(3.0) • Activities 7. Declaring an activity (3.1) 8. Starting a new activity with an intent object (3.2) 9. Switching between activities (3.3) 10.Passing data to another activity (3.4) 11.Returning a result from an activity (3.5) 12.Saving an activity's state (3.6) 13.Storing persistent activity data (3.7) 14.Understanding the activity lifecycle (3.8)
  • 37. Activities Recipes(3.0) • An activity represents a single screen in your app with an interface the user can interact with. • Your app is a collection of activities that you either create yourself, or that you reuse from other apps. • activities in your app work together to form a cohesive user experience in your app, each one is independent of the others. This enables your app to start activities in other apps, and other apps can start your activities (if your app allows it).
  • 39. Activities Recipes(3.0) • one activity in an app is specified as the "main" activity, which is presented to the user when launching the application for the first time. Each activity can then start other activities in order to perform different actions. • Each time a new activity starts, the previous activity is stopped, but the system preserves the activity in a stack (the "back stack").When the user is done with the current activity and presses the Back button, it is popped from the stack (and destroyed) and the previous activity resumes.
  • 40. Declare An Activity(3.1) 1. Create new project named DeclareActivity 2. Launch MainActivity 3. Create New SecondActivity 4.Change launcher to second Activity from Manifest file
  • 41. Starting a new Activity with an intent Recipe(3.2) 1. Understand Intent(R 3.2.0) 1. Intent ? • Intents are message objects that make a request to the Android runtime to start an activity or other app component in your app or in some other app. 2. Explicit Intent • Explicit intents specify the receiving activity (or other component) by that activity's fully-qualified class name. Use an explicit intent to start a component in your own app 3. Implicit Intent • Implicit intents do not specify a specific activity or other component to receive the intent. Instead you declare a general action to perform in the intent. 2. Create New Project Intent. (R 3.2.1) 3. Create other Activity SecondActivity. 4. Create a button to move to SecondActivity. 5. Launch App 6. Click button and go to SecondActivity.
  • 42. Switch B/w Activities Recipe(3.3) Understand Back Stack Operation in Android • Create new Project SwitchActivities • Create 2 more activities named SecondActivity,ThirdActivty. • Use Explicit intent to switch. • Create 1 button each to switch • Main to 2nd • 2nd to 3rd • 3rd to main • Set views to understand about current Activity & states • Run app & use IT • Understand the states of activities.
  • 43. Passing data to an other activity Recipe(3.4) 1. Create new Project IntentData. 2. CreateTwo Activities one for sending data & other for receiving. 3. Create button for sending the data & text field for receiving the data. 4.LaunchApp & Understand Operations by using.
  • 44. Returning a result from a activity Recipe(3.5) • Create Project Return Results with two Activities. • One for sending the data & other for receiving. • Create EditText field from which we will get results to 1st .
  • 45. Saving a activity’s state Recipe(3.6) • SavingState of activity
  • 47. Understanding the activity life cycle Recipe(3.8)
  • 48. Layouts recipe(4.0) • Layouts 15.Defining and inflating a layout (4.1) 16.Using RelativeLayout (4.2) 17.Using LinearLayout (4.3) 18.Creating tables –TableLayout and GridLayout (4.4) 19.Using ListView, GridView, and Adapters (4.5) 20.Changing layout properties during runtime (4.6) 21.Optimizing layouts with the HierarchyViewer (4.7)
  • 50. Defining & Inflating a layout recipe(4.1)
  • 51. Using relative Layout recipe(4.2)
  • 52. Using Linear Layout recipe(4.3)
  • 56. Using List view recipe(4.5.1)
  • 59. Changing Layout properties during runtime recipe(4.6)
  • 60. Optimizing Layouts with the hierarchy viewer recipe(4.7)
  • 61. View,Widgets & Styles Recipes(5.0) • Views,Widgets, and Styles 22.Inserting a widget into a layout (5.1) 23.Using graphics to show the button state (5.2) 24.Creating a widget at runtime (5.3) 25.Creating a custom component (5.4) 26.Applying a style to aView (5.5) 27.Turning a style into a theme (5.6) 28.Selecting a theme based on the Android OS version (5.7)
  • 62. View,Widgets & Styles Recipe(5.0)
  • 63. Inserting a widget into a layout Recipe(5.1)
  • 64. Using graphics to show the button state Recipe(5.2)
  • 65. Creating a widget at runtime Recipe(5.3)
  • 66. Creating a custom component Recipe(5.4)
  • 67. Applying a style to a view Recipe(5.5)
  • 68. Turing a style into a theme Recipe(5.6)
  • 69. Selecting a theme based on the android OS version Recipe(5.7)
  • 70. Menus Recipes(6.0) • Menus 29.Creating an Options menu (6.1) 30.Modifying menus and menu items during runtime (6.2) 31.EnablingContextual Action Mode for a view (6.3) 32.Using Contextual Batch Mode with a ListView (6.4) 33.Creating a pop-up menu (6.5)
  • 72. Creating a option menu Recipe(6.1)
  • 73. Modifying menus & menu items during runtime Recipe(6.2)
  • 74. Enabling contextual action mode for a view Recipe(6.3)
  • 75. Using contextual batch mode with a list view Recipe(6.4)
  • 76. Creating a pop-up Menu Recipe(6.5)
  • 77. Exploring Fragments, AppWidgets, and the System UI recipes(7.0) • Exploring Fragments, AppWidgets, and the System UI 34.Creating and using a Fragment (7.1) 35.Adding and removing Fragments during runtime (7.2) 36.Passing data between Fragments (7.3) 37.Creating a shortcut on the Home screen (7.4) 38.Creating a Home screen widget (7.5) 39.Adding Search to the Action Bar (7.6) 40.Showing your app full screen (7.7)
  • 78. Exploring Fragments, AppWidgets, and the System UI recipe(7.0)
  • 79. Creating & using a fragment recipe(7.1)
  • 80. Adding & Removing fragments during run time recipe(7.2)
  • 81. Passing data b/w fragments recipe(7.3)
  • 82. Creating a shortcut on the home screen recipe(7.4)
  • 83. Creating a home screen widget recipe(7.5)
  • 84. Adding search to the action bar recipe(7.6)
  • 85. Showing your app full screen recipe(7.7)
  • 86. Working with data recipes(8.0) • Working with Data 41.Storing simple data (8.1) 42.Read and write a text file to internal storage (8.2) 43.Read and write a text file to external storage (8.3) 44.Including resource files in your project (8.4) 45.Creating and using an SQLite database (8.5) 46.Access data in the background using a Loader (8.6)
  • 87. Working with data recipe(8.0)
  • 88. Storing simple data recipe(8.1)
  • 89. Read and write a text file to internal storage recipe(8.2)
  • 90. Read and write a text file to external storage recipe(8.3)
  • 91. Including resource files in your project recipe(8.4)
  • 92. Creating and using an SQLite database recipe(8.5)
  • 93. Access data in the background using a Loader recipe(8.6)
  • 94. Alerts and Notifications Recipes(9.0) • Alerts and Notifications 47.Lights, Action, and Sound – getting the user's attention! (9.1) 48.Creating aToast using a custom layout (9.2) 49.Displaying a message box with AlertDialog (9.3) 50.Displaying a progress dialog (9.4) 51.Lights, Action, and Sound Redux using Notifications (9.5) 52.Creating a Media Player Notification (9.6) 53.Making a Flashlight with a Heads-Up Notification (9.7)
  • 96. Lights, Action, and Sound – getting the user's attention! Recipe(9.1)
  • 97. Creating aToast using a custom layout Recipe(9.2)
  • 98. Displaying a message box with AlertDialog Recipe(9.3)
  • 99. Displaying a progress dialog Recipe(9.4)
  • 100. Lights,Action, and Sound Redux using Notifications Recipe(9.5)
  • 101. Creating a Media Player Notification Recipe(9.6)
  • 102. Making a Flashlight with a Heads-Up Notification Recipe(9.7)
  • 103. Using theTouchscreen and Sensors Recipes(10.0) • Using theTouchscreen and Sensors 54.Listening for click and long-press events (10.1) 55.Recognizing tap and other common gestures (10.2) 56.Pinch-to-zoom with multi-touch gestures (10.3) 57.Swipe-to-Refresh (10.4) 58.Listing available sensors – an introduction to theAndroid Sensor Framework (10.5) 59.Reading sensor data – using theAndroid Sensor Framework events (10.6) 60.Reading device orientation (10.7)
  • 104. Using theTouchscreen and Sensors Recipe(10.0)
  • 105. Listening for click and long-press events Recipe(10.1)
  • 106. Recognizing tap and other common gestures Recipe(10.2)
  • 107. Pinch-to-zoom with multi-touch gestures Recipe(10.3)
  • 109. Listing available sensors – an introduction to theAndroid Sensor Framework Recipe(10.5)
  • 110. Reading sensor data – using the Android Sensor Framework events Recipe(10.6)
  • 111. Reading device orientation Recipe(10.7)
  • 112. Graphics and Animation recipes(11.0) • Graphics and Animation 61.Scaling down large images to avoid Out of Memory exceptions (11.1) 62.transition animation – defining scenes and applying a transition (11.2) 63.Creating a Compass using sensor data and RotateAnimation (11.3) 64.Creating a slideshow withViewPager (11.4) 65.Creating a Card FlipAnimation with Fragments (11.5) 66.Creating a Zoom Animation with a CustomTransition (11.6)
  • 113. Graphics and Animation recipe(11.0)
  • 114. Scaling down large images to avoid Out of Memory exceptions recipe(11.1)
  • 115. transition animation – defining scenes and applying a transition recipe(11.2)
  • 116. Creating a Compass using sensor data and RotateAnimation recipe(11.3)
  • 117. Creating a slideshow withViewPager recipe(11.4)
  • 118. Creating a Card Flip Animation with Fragments recipe(11.5)
  • 119. Creating a Zoom Animation with a CustomTransition recipe(11.6)
  • 120. A First Look at OpenGL ES Recipes(12.0) • A First Look at OpenGL ES 67.Setting up the OpenGL ES environment (12.1) 68.Drawing shapes on GLSurfaceView (12.2) 69.Applying projection and camera view while drawing (12.3) 70.Moving the triangle with rotation (12.4) 71.Rotating the triangle with user input (12.5)
  • 121. A First Look at OpenGL ES Recipe(12.0)
  • 122. Setting up the OpenGL ES environment Recipe(12.1)
  • 123. Drawing shapes of GL-surface-view Recipe(12.2)
  • 124. Applying projection and camera view while drawing Recipe(12.3)
  • 125. Moving the triangle with rotation Recipe(12.4)
  • 126. Rotating the triangle with user inputs Recipe(12.5)
  • 127. Multimedia recipes(13.0) • Multimedia 72.Playing sound effects with SoundPool (13.1) 73.Playing audio with MediaPlayer (13.2) 74.Responding to hardware media controls in your app (13.3) 75.Taking a photo with the default camera app (13.4) 76.Taking a photo using the (old) Camera API (13.5) 77.Taking a photo using the Camera2 (the new) API (13.6)
  • 129. Playing sound effects with sound-pool recipe(13.1)
  • 130. Playing audio with media player recipe(13.2)
  • 131. Responding to hardware media controls in your app recipe(13.3)
  • 132. Taking a photo with the default camera App recipe(13.4)
  • 133. Taking a photo with the old camera API recipe(13.5)
  • 134. Taking a photo using the camera2 new API recipe(13.6)
  • 135. Telephony, Networks, and theWeb Recipes (14.0) • Telephony, Networks, and theWeb 78. How to make a phone call (14.1) 79. Monitoring phone call events (14.2) 80. How to send SMS (text) messages (14.3) 81. Receiving SMS messages (14.4) 82. Displaying a web page in your application (14.5) 83. Checking online status and connection type (14.6) 84. Getting started with Volley for Internet requests (14.7) 85. Canceling a Volley request (14.8) 86. Using Volley to request a JSON response(14.9) 87. Using Volley to request an image (14.10) 88. Using Volley's NetworkImageView and ImageLoader (14.11)
  • 136. Telephony, Networks, and theWeb Recipe (14.0)
  • 137. How to make a phone call Recipe (14.1)
  • 138. Monitor phone call events Recipe (14.2)
  • 139. How to send SMS(text) messages Recipe (14.3)
  • 140. Receive SMS messages Recipe (14.4)
  • 141. Displaying a webpage in your application Recipe (14.5)
  • 142. Check online status & connectionType Recipe (14.6)
  • 143. Getting started with volley for internet requests Recipe (14.7)
  • 144. Canceling a volley requests Recipe (14.8)
  • 145. Using volley to request a json response Recipe (14.9)
  • 146. Using volley to request an image Recipe (14.10)
  • 147. UsingVolley’s Network-image-view & Image-loader Recipe (14.11)
  • 148. Getting Location and UsingGeofencing recipes(15.0) • Getting Location and Using Geofencing 89.How to get the last location (15.1) 90.Resolving problems reported with the GoogleApiClient OnConnectionFailedListener (15.2) 91.How to receive location updates (15.3) 92.Create and monitor a Geofence (15.4)
  • 149. Getting Location and UsingGeofencing recipe(15.0)
  • 150. How to get the last location recipe(15.1)
  • 151. Resolving problems reported with google-api-client-on-connection-failed-listener recipe(15.2)
  • 152. How to receive location updates recipe(15.3)
  • 153. Create & monitor a Geofence recipe(15.4)
  • 154. Getting your app ready for the Play Store recipes (16.0) • Getting your app ready for the Play Store 93.The new Android 6.0 Run-Time permission model (16.1) 94.How to schedule an alarm (16.2) 95.Receive notification of device boot (16.3) 96.Using AsyncTask for background work (16.4) 97.Adding speech recognition to your app (16.5) 98.Push Notification using Google Cloud Messaging (16.6) 99.How to add Google sign-in to your app (16.7)
  • 155. Getting your app ready for the Play Store recipe (16.0)
  • 156. The newAndroid run-time permissions model recipe (16.1)
  • 157. How to schedule a alarm recipe (16.2)
  • 158. Receive notification of device boot recipe (16.3)
  • 159. Using async-task for background work recipe (16.4)
  • 160. Adding speech recognition to your phone recipe (16.5)
  • 161. Push notification using google cloud messaging recipe (16.6)
  • 162. How to add google sign-in into your app recipe (16.7)
  • 163. The BackendAs Service Options Recipes(17.0) • The Backend as a Service Options 100.App42 (17.1) 101.Backendless (17.2) 102.Buddy (17.3) 103.Firebase (17.4) 104.Kinvey (17.5)
  • 164. The BackendAs Service Options Recipe(17.0) • As your application and user base grow, it's likely you'll want to connect your app across devices and even users, such as a high score leaderboard.You have two choices: • Create and maintain your own server • Use a Backend as a Service (BaaS) provider
  • 165. The BackendAs Service Options Recipe(17.0) • take a look at several BaaS providers with features specifically targeting Android developers.
  • 166. App42 Recipe(17.1) • App42 is the BaaSAPI product of ShepHertz, a cloud provider of multiple services, including gaming platforms, Platform as a Service, and Marketing Analytics. • They have a very rich feature set, including many services especially useful for games.
  • 167. App42 Recipe(17.1) • The App42 Android SDK supports the following: • User service • Storage service (Storage as a service (SaaS) is a business model in which a company leases or rents its storage infrastructure to another company or individuals to store data.) • Custom code service (Custom Programming means custom- developed software and modifications to other software, including Source Code, Object Code and related Documentation)
  • 168. App42 Recipe(17.1) • Push notification service (A push notification is a short in-app, or web-based pop-up message. Push notifications are used for various purposes: from sending system messages and in-app updates to promotions.The key idea of sending push notifications is to provide users with more value and keep them engaged.) • Event service (An instance or occasion of assistance received by a client from a service provider.) • Gift management service (A gift is property, money, or assets that one person gives to another while receiving nothing or less than fair market value in return.)
  • 169. App42 Recipe(17.1) • Timer service (Timer service is a JEE utility that can be used to schedule notifications in enterprise applications. ) • Social service (Social services are a range of public services provided by the government, private, profit and non-profit organizations.) • A/B test service (A/B testing (also known as split testing or bucket testing) is a method of comparing two versions of a webpage or app against each other to determine which one performs better.) • Buddy service (The buddy system is a procedure in which two individuals, the "buddies", operate together as a single unit so that they are able to monitor and help each other.) • Avatar service (Graphical representation of user & user characters) • Achievement service (An achievement is a great accomplishment—something achieved with great effort or skill. )
  • 170. App42 Recipe(17.1) • Leaderboard service (It's a collection of high scores achieved in a game session during a specific time segment in a specific portion of a game for a specific set of users.) • Reward service (something that is given in return for good or evil done or received or that is offered or given for some service or attainment the police offered a reward for his capture.) • Upload service (Uploading means data is being sent from your computer to the Internet. Examples of uploading include sending email, posting photos on a social media site and using your webcam.) • Gallery service
  • 171. App42 Recipe(17.1) • Geo service ('Geo services' can be used to define an industry encompassing all interactive digital mapping and location- based services.) • Session service (a session refers to a limited time of communication between two systems. Some sessions involve a client and a server, while other sessions involve two personal computers. A common type of client/server session is aWeb or HTTP session.)
  • 172. App42 Recipe(17.1) • Review service (A service review is a review of an organization's services designed to identify potential service delivery improvements. • Cart service (CART Service means CommunicationAccess Real- timeTranslation Service.CART Service provides instantaneous translation of what is being said into visual print display so that it can be read (instead of heard). CART Service is one means of communication access for deaf or hard of hearing individuals who read English fluently) • Catalogue service
  • 173. App42 Recipe(17.1) • Message service (SMS (short message service) is a text messaging service component of most telephone, Internet, and mobile device systems.) • Recommender service(The goal of a recommender system is to generate meaningful recommendations to a collection of users for items or products that might interest them.) • Email service (Email services offer user-friendly features to manage mailing lists, email design, and metrics to monitor your success.) • Logging service (Logging as a service (LaaS) is an IT architectural model for centrally ingesting and collecting any type of log files coming from any given source or location; such as servers, applications, devices etc.)
  • 174. App42 Recipe (Practical) 1. Create a new project in Android Studio and call it App42. Use the default Phone &Tablet option and select Empty Activity when prompted for ActivityType. • Download and extract the App42 SDK from the following link: • https://github.com/shephertz/App42_ANDROID_SDK/archive/master.z ip • After creating your App42 account 1. log in to the AppHQ ManagementConsole, 2. register your app. • You will need the ApiKey and SecretKey.
  • 175. App42 Recipe (Practical) • To add support for App42 to your project, start by opening the Android Manifest and following these steps: 1. Add the following permissions: <uses-permission android:name= "android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 2. Open the following folder in your file browser: <project folder>App42app libs (if the libs folder does not exist, create it) and copy the App42_ANDROID- CAMPAIGN_x.x.jar file to the applibs folder. 3. Open the app module's Gradle build file: build.gradle (Module: app) and add the following to the dependencies section: compile files('libs/App42_ANDROID-CAMPAIGN_x.x.jar')
  • 176. App42 Recipe (Practical) 4. OpenActivityMain.java and add the following import: import com.shephertz.app42.paas.sdk.android.App42API; 5. Add the following code to the onCreate() callback: App42API.initialize(this, "YOUR_API_KEY", "YOUR_SECRET_KEY"); 6. You're ready to run the application on a device or emulator.