SlideShare ist ein Scribd-Unternehmen logo
1 von 48
GDG DevFest @ Kathmandu, Nepal
Latest & Interesting updates
#AndroidDev
@pareshmayani
Paresh Mayani
Android Developer
Manager, GDG Ahmedabad
Interesting updates - #AndroidDev
• Android Studio
• Gradle Build System
• Volley Library
• Google Maps Android API v2
• Staged rollouts
• Alpha and Beta Testing
• Optimization Tips
• App Translation Service
@pareshmayani
Android Studio
@pareshmayani
Android Studio
• Android focused IDE (designed
specifically for Android development)
• New Android development environment
based on IntelliJ IDEA
• Similar to Eclipse with the ADT Plug-in
• Contains All the Android SDK Tools to
design, test, debug, and profile your app
@pareshmayani
Gradle Build System
@pareshmayani
Gradle Build System
• Gradle is an advanced build
management system based on Groovy
• Its an Open source build system
• Combines the power of Ant and Maven
@pareshmayani
Features of Gradle build system
• Dependency Management (Flexible approach to
dependency management that can reuse existing maven
repositories or reference local JARs)
@pareshmayani
Features of Gradle build system
• Dependency Management (Flexible approach to
dependency management that can reuse existing maven
repositories or reference local JARs)
• A single build system (Gradle is the authoritative build
across the IDE and the command-line.)
@pareshmayani
Features of Gradle build system
• Dependency Management (Flexible approach to
dependency management that can reuse existing maven
repositories or reference local JARs)
• A single build system (Gradle is the authoritative build
across the IDE and the command-line.)
• Product Flavors (Free & Paid version), Build Variants (Play
store OR Amazon OR Any other store), Build Type (Debug,
QA, Release)
@pareshmayani
Features of Gradle build system
• Dependency Management (Flexible approach to
dependency management that can reuse existing maven
repositories or reference local JARs)
• A single build system (Gradle is the authoritative build
across the IDE and the command-line.)
• Product Flavors (Free & Paid version), Build Variants (Play
store OR Amazon OR Any other store), Build Type (Debug,
QA, Release)
• Binary Bundles for Libaries (.aar) (Gradle supports the new
.aar binary bundle format for the library projects)
@pareshmayani
Volley – “the simultaneous firing of a
number of missiles”
@pareshmayani
Android – Volley library
“Volley is a library that makes networking for
Android apps easier and most importantly, faster.”
@pareshmayani
Advantages of using Volley Library
• Volley automatically schedule all network requests.
Volley will be taking care of all the network requests your app
executes for fetching response or image from web.
• Volley provides powerful customization abilities.
• Volley provides Debugging and tracing tools.
• Volley provides powerful cancellation request API.
- You can cancel a single request or
- You can set blocks or scopes of requests to cancel.
@pareshmayani
How to get started?
1. Clone the Volley project
2. Import the code into your project
@pareshmayani
Clone the Volley Project
git clone
https://android.googlesource.com/platform/frameworks/volley
@pareshmayani
2 Main classes of Volley Library
2 main classes
Request queue
It is the interest you use for
dispatching requests to the
network
It contains all the
necessary details for
making web API call
Request
@pareshmayani
Take a look at JsonObjectRequest
JsonObjectRequest ObjJsonRequest = new JsonObjectRequest(Request.Method.GET, url, null, new
Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
// Successful response
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
// Failure response
}
});
@pareshmayani
Basic Example
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.Volley;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
……
…...
RequestQueue queue = Volley.newRequestQueue(this);
String url = “Web API URL”;
// Prepare JSON Object request
queue.add(ObjJsonRequest );
}
@pareshmayani
Google Maps API v2
@pareshmayani
Google Maps Android API v2
• With v2 of Maps Android API, you can embed maps into an
activity as a fragment
@pareshmayani
Google Maps Android API v2
• With v2 of Maps Android API, you can embed maps into an
activity as a fragment
• The API is now distributed as part of the Google Play
services SDK
@pareshmayani
Google Maps Android API v2
• With v2 of Maps Android API, you can embed maps into an
activity as a fragment
• The API is now distributed as part of the Google Play
services SDK
• Maps are now 3D
@pareshmayani
Google Maps Android API v2
• With v2 of Maps Android API, you can embed maps into an
activity as a fragment
• The API is now distributed as part of the Google Play
services SDK
• Maps are now 3D
• The Maps API now uses vector tiles. Their data
representation is smaller, so maps appear in your apps faster,
and use less bandwidth.
@pareshmayani
Google Maps Android API v2
• With v2 of Maps Android API, you can embed maps into an
activity as a fragment
• The API is now distributed as part of the Google Play
services SDK
• Maps are now 3D
• The Maps API now uses vector tiles. Their data
representation is smaller, so maps appear in your apps faster,
and use less bandwidth.
• Caching is improved
@pareshmayani
Getting started with Map API v2
Step - 1 Install and Set up the Google Play Service SDK
@pareshmayani
Getting started with Map API v2
Step - 2 Run the sample
Once you've installed the Google Play services package, the
Google Maps sample is located in
<android-sdk>/extras/google-play-services/samples/maps
@pareshmayani
Basic example
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
public class BasicMapActivity extends FragmentActivity {
/**
* Note that this may be null if the Google Play services APK is not available.
*/
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.basic_demo);
mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map))
.getMap();
}
@pareshmayani
Placing Marker
// latitude and longitude
double latitude = ;
double longitude = ;
// create marker
MarkerOptions marker = new MarkerOptions().position(new LatLng(latitude, longitude)).title(“Hello World!");
// adding marker
googleMap.addMarker(marker);
@pareshmayani
Placing Marker
private static final LatLng AHMEDABAD= new LatLng(23.0300, 72.5800);
// Uses a colored icon.
Marker mBrisbane = mMap.addMarker(new MarkerOptions()
.position(AHMEDABAD)
.title(“Ahmedabad")
.snippet("Population: 5.571 million ")
.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));
// Uses a custom icon.
Marker mSydney = mMap.addMarker(new MarkerOptions()
.position(AHMEDABAD)
.title(“Ahmedabad")
.snippet("Population: 5.571 million ")
.icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow)));
// Creates a draggable marker. Long press to drag.
Marker mMelbourne = mMap.addMarker(new MarkerOptions()
.position(AHMEDABAD)
.title(“Ahmedabad")
.snippet("Population: 5.571 million ")
.draggable(true));
@pareshmayani
Staged Rollouts
@pareshmayani
Staged Rollouts
• With a staged rollout, you can
publish your app to a certain
percentage of the market first to
make sure that your app works
properly before rolling it out to
everybody.
• Users receiving the staged
rollout can leave public reviews
in Google Play.
@pareshmayani
Staged Rollouts
Step - 1 Publish APK as staged rollout
@pareshmayani
Staged Rollouts
Step - 2 Publish app to certain percentage
@pareshmayani
Alpha and Beta Testing
@pareshmayani
Alpha and Beta Testing
• Google Play Developer console
allows you to test two different
version of your app at the same
time in addition to your production
version.
• It’s FREE
• Testing by real users before app
goes live
@pareshmayani
Alpha and Beta Testing
Step - 1 Upload new APK to Beta/Alpha
@pareshmayani
Alpha and Beta Testing
Step - 2 Publish now to Beta/Alpha
@pareshmayani
Alpha and Beta Testing
Step - 3 Selecting groups of testers
@pareshmayani
Alpha and Beta Testing
Move to Alpha/Beta/Production
@pareshmayani
Google Play ServicesOptimization Tips
@pareshmayani
Optimization Tips
@pareshmayani
Optimization Tips
@pareshmayani
App Translation Service
@pareshmayani
App Translation Service
• Google Play can help you quickly find and purchase
translations of your app.
• In the Developer Console, you can browse a list of third-
party vendors who are pre-qualified by Google to offer high-
quality translation at competitive prices.
Steps:
1. Upload the strings you want translated, select the
languages you want to translate into.
2. Select your translation vendor based on time and price.
@pareshmayani
Links
1. https://github.com/PareshMayani/Android-Volley-Example
2. https://developers.google.com/maps/documentation/andro
id/
3. http://developer.android.com/distribute/googleplay/publish
/localizing.html#gp-trans
@pareshmayani
Paresh Mayani
Manager, GDG Ahmedabad
Android Developer
pareshmayani@gmail.com
@pareshmayani
< Stay in Touch >

Weitere ähnliche Inhalte

Was ist angesagt?

Droidcon2013 pro guard, optimizer and obfuscator in the android sdk_eric lafo...
Droidcon2013 pro guard, optimizer and obfuscator in the android sdk_eric lafo...Droidcon2013 pro guard, optimizer and obfuscator in the android sdk_eric lafo...
Droidcon2013 pro guard, optimizer and obfuscator in the android sdk_eric lafo...
Droidcon Berlin
 

Was ist angesagt? (20)

Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studio
 
Head first android apps dev tools
Head first android apps dev toolsHead first android apps dev tools
Head first android apps dev tools
 
Comparison between Eclipse and Android Studio for Android Development
Comparison between Eclipse and Android Studio for Android DevelopmentComparison between Eclipse and Android Studio for Android Development
Comparison between Eclipse and Android Studio for Android Development
 
Vietnam qa meetup
Vietnam qa meetupVietnam qa meetup
Vietnam qa meetup
 
Android – As a tool of innovation
Android – As a tool of innovation Android – As a tool of innovation
Android – As a tool of innovation
 
Robotium Tutorial
Robotium TutorialRobotium Tutorial
Robotium Tutorial
 
軟體測試是在測試什麼?
軟體測試是在測試什麼?軟體測試是在測試什麼?
軟體測試是在測試什麼?
 
Rapid Android Development for Hackathon
Rapid Android Development for HackathonRapid Android Development for Hackathon
Rapid Android Development for Hackathon
 
Robotium at Android Only 2010-09-29
Robotium at Android Only 2010-09-29Robotium at Android Only 2010-09-29
Robotium at Android Only 2010-09-29
 
Testing android apps with espresso
Testing android apps with espressoTesting android apps with espresso
Testing android apps with espresso
 
Intro session kotlin
Intro session kotlinIntro session kotlin
Intro session kotlin
 
Use React Patterns to Build Large Scalable App
Use React Patterns to Build Large Scalable App Use React Patterns to Build Large Scalable App
Use React Patterns to Build Large Scalable App
 
Droidcon2013 pro guard, optimizer and obfuscator in the android sdk_eric lafo...
Droidcon2013 pro guard, optimizer and obfuscator in the android sdk_eric lafo...Droidcon2013 pro guard, optimizer and obfuscator in the android sdk_eric lafo...
Droidcon2013 pro guard, optimizer and obfuscator in the android sdk_eric lafo...
 
JavaScript, React Native and Performance at react-europe 2016
JavaScript, React Native and Performance at react-europe 2016JavaScript, React Native and Performance at react-europe 2016
JavaScript, React Native and Performance at react-europe 2016
 
Android Automation Using Robotium
Android Automation Using RobotiumAndroid Automation Using Robotium
Android Automation Using Robotium
 
From zero to hero with React Native!
From zero to hero with React Native!From zero to hero with React Native!
From zero to hero with React Native!
 
Android Test Automation Workshop
Android Test Automation WorkshopAndroid Test Automation Workshop
Android Test Automation Workshop
 
Enhance react app with patterns - part 1: higher order component
Enhance react app with patterns - part 1: higher order componentEnhance react app with patterns - part 1: higher order component
Enhance react app with patterns - part 1: higher order component
 
React Native
React NativeReact Native
React Native
 
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
 

Ähnlich wie Latest & interesting updates #android dev

Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
aswapnal
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
catherinewall
 

Ähnlich wie Latest & interesting updates #android dev (20)

Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Google Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG BelgaumGoogle Cloud Developer Challenge - GDG Belgaum
Google Cloud Developer Challenge - GDG Belgaum
 
Mobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to NativeMobile Vue.js – From PWA to Native
Mobile Vue.js – From PWA to Native
 
Google Cloud Platform
Google Cloud Platform Google Cloud Platform
Google Cloud Platform
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIs
 
James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1James Jara Portfolio 2014 Part 1
James Jara Portfolio 2014 Part 1
 
Droidcon Paris 2015
Droidcon Paris 2015Droidcon Paris 2015
Droidcon Paris 2015
 
Play Framework on Google App Engine
Play Framework on Google App EnginePlay Framework on Google App Engine
Play Framework on Google App Engine
 
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
PWA - The Future of eCommerce - Magento Meetup Ahmedabad 2018
 
From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)
 
Portafolio
PortafolioPortafolio
Portafolio
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 
Made for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile AppsMade for Mobile - Let Office 365 Power Your Mobile Apps
Made for Mobile - Let Office 365 Power Your Mobile Apps
 
Spring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsugSpring Cloud Function & Project riff #jsug
Spring Cloud Function & Project riff #jsug
 
What's new in App Engine and intro to App Engine for Business
What's new in App Engine and intro to App Engine for BusinessWhat's new in App Engine and intro to App Engine for Business
What's new in App Engine and intro to App Engine for Business
 
Gradle build capabilities
Gradle build capabilities Gradle build capabilities
Gradle build capabilities
 
Deploying Web Apps with PaaS and Docker Tools
Deploying Web Apps with PaaS and Docker ToolsDeploying Web Apps with PaaS and Docker Tools
Deploying Web Apps with PaaS and Docker Tools
 
Android Introduction
Android IntroductionAndroid Introduction
Android Introduction
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

Latest & interesting updates #android dev

  • 1. GDG DevFest @ Kathmandu, Nepal
  • 2. Latest & Interesting updates #AndroidDev @pareshmayani
  • 4. Interesting updates - #AndroidDev • Android Studio • Gradle Build System • Volley Library • Google Maps Android API v2 • Staged rollouts • Alpha and Beta Testing • Optimization Tips • App Translation Service @pareshmayani
  • 6. Android Studio • Android focused IDE (designed specifically for Android development) • New Android development environment based on IntelliJ IDEA • Similar to Eclipse with the ADT Plug-in • Contains All the Android SDK Tools to design, test, debug, and profile your app @pareshmayani
  • 8. Gradle Build System • Gradle is an advanced build management system based on Groovy • Its an Open source build system • Combines the power of Ant and Maven @pareshmayani
  • 9. Features of Gradle build system • Dependency Management (Flexible approach to dependency management that can reuse existing maven repositories or reference local JARs) @pareshmayani
  • 10. Features of Gradle build system • Dependency Management (Flexible approach to dependency management that can reuse existing maven repositories or reference local JARs) • A single build system (Gradle is the authoritative build across the IDE and the command-line.) @pareshmayani
  • 11. Features of Gradle build system • Dependency Management (Flexible approach to dependency management that can reuse existing maven repositories or reference local JARs) • A single build system (Gradle is the authoritative build across the IDE and the command-line.) • Product Flavors (Free & Paid version), Build Variants (Play store OR Amazon OR Any other store), Build Type (Debug, QA, Release) @pareshmayani
  • 12. Features of Gradle build system • Dependency Management (Flexible approach to dependency management that can reuse existing maven repositories or reference local JARs) • A single build system (Gradle is the authoritative build across the IDE and the command-line.) • Product Flavors (Free & Paid version), Build Variants (Play store OR Amazon OR Any other store), Build Type (Debug, QA, Release) • Binary Bundles for Libaries (.aar) (Gradle supports the new .aar binary bundle format for the library projects) @pareshmayani
  • 13. Volley – “the simultaneous firing of a number of missiles” @pareshmayani
  • 14. Android – Volley library “Volley is a library that makes networking for Android apps easier and most importantly, faster.” @pareshmayani
  • 15. Advantages of using Volley Library • Volley automatically schedule all network requests. Volley will be taking care of all the network requests your app executes for fetching response or image from web. • Volley provides powerful customization abilities. • Volley provides Debugging and tracing tools. • Volley provides powerful cancellation request API. - You can cancel a single request or - You can set blocks or scopes of requests to cancel. @pareshmayani
  • 16. How to get started? 1. Clone the Volley project 2. Import the code into your project @pareshmayani
  • 17. Clone the Volley Project git clone https://android.googlesource.com/platform/frameworks/volley @pareshmayani
  • 18. 2 Main classes of Volley Library 2 main classes Request queue It is the interest you use for dispatching requests to the network It contains all the necessary details for making web API call Request @pareshmayani
  • 19. Take a look at JsonObjectRequest JsonObjectRequest ObjJsonRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { // Successful response } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { // Failure response } }); @pareshmayani
  • 20. Basic Example import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.JsonObjectRequest; import com.android.volley.toolbox.Volley; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { …… …... RequestQueue queue = Volley.newRequestQueue(this); String url = “Web API URL”; // Prepare JSON Object request queue.add(ObjJsonRequest ); } @pareshmayani
  • 21. Google Maps API v2 @pareshmayani
  • 22. Google Maps Android API v2 • With v2 of Maps Android API, you can embed maps into an activity as a fragment @pareshmayani
  • 23. Google Maps Android API v2 • With v2 of Maps Android API, you can embed maps into an activity as a fragment • The API is now distributed as part of the Google Play services SDK @pareshmayani
  • 24. Google Maps Android API v2 • With v2 of Maps Android API, you can embed maps into an activity as a fragment • The API is now distributed as part of the Google Play services SDK • Maps are now 3D @pareshmayani
  • 25. Google Maps Android API v2 • With v2 of Maps Android API, you can embed maps into an activity as a fragment • The API is now distributed as part of the Google Play services SDK • Maps are now 3D • The Maps API now uses vector tiles. Their data representation is smaller, so maps appear in your apps faster, and use less bandwidth. @pareshmayani
  • 26. Google Maps Android API v2 • With v2 of Maps Android API, you can embed maps into an activity as a fragment • The API is now distributed as part of the Google Play services SDK • Maps are now 3D • The Maps API now uses vector tiles. Their data representation is smaller, so maps appear in your apps faster, and use less bandwidth. • Caching is improved @pareshmayani
  • 27. Getting started with Map API v2 Step - 1 Install and Set up the Google Play Service SDK @pareshmayani
  • 28. Getting started with Map API v2 Step - 2 Run the sample Once you've installed the Google Play services package, the Google Maps sample is located in <android-sdk>/extras/google-play-services/samples/maps @pareshmayani
  • 29. Basic example <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <fragment android:id="@+id/map" android:name="com.google.android.gms.maps.MapFragment" android:layout_width="match_parent" android:layout_height="match_parent"/> </RelativeLayout> public class BasicMapActivity extends FragmentActivity { /** * Note that this may be null if the Google Play services APK is not available. */ private GoogleMap mMap; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.basic_demo); mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)) .getMap(); } @pareshmayani
  • 30. Placing Marker // latitude and longitude double latitude = ; double longitude = ; // create marker MarkerOptions marker = new MarkerOptions().position(new LatLng(latitude, longitude)).title(“Hello World!"); // adding marker googleMap.addMarker(marker); @pareshmayani
  • 31. Placing Marker private static final LatLng AHMEDABAD= new LatLng(23.0300, 72.5800); // Uses a colored icon. Marker mBrisbane = mMap.addMarker(new MarkerOptions() .position(AHMEDABAD) .title(“Ahmedabad") .snippet("Population: 5.571 million ") .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE))); // Uses a custom icon. Marker mSydney = mMap.addMarker(new MarkerOptions() .position(AHMEDABAD) .title(“Ahmedabad") .snippet("Population: 5.571 million ") .icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow))); // Creates a draggable marker. Long press to drag. Marker mMelbourne = mMap.addMarker(new MarkerOptions() .position(AHMEDABAD) .title(“Ahmedabad") .snippet("Population: 5.571 million ") .draggable(true)); @pareshmayani
  • 33. Staged Rollouts • With a staged rollout, you can publish your app to a certain percentage of the market first to make sure that your app works properly before rolling it out to everybody. • Users receiving the staged rollout can leave public reviews in Google Play. @pareshmayani
  • 34. Staged Rollouts Step - 1 Publish APK as staged rollout @pareshmayani
  • 35. Staged Rollouts Step - 2 Publish app to certain percentage @pareshmayani
  • 36. Alpha and Beta Testing @pareshmayani
  • 37. Alpha and Beta Testing • Google Play Developer console allows you to test two different version of your app at the same time in addition to your production version. • It’s FREE • Testing by real users before app goes live @pareshmayani
  • 38. Alpha and Beta Testing Step - 1 Upload new APK to Beta/Alpha @pareshmayani
  • 39. Alpha and Beta Testing Step - 2 Publish now to Beta/Alpha @pareshmayani
  • 40. Alpha and Beta Testing Step - 3 Selecting groups of testers @pareshmayani
  • 41. Alpha and Beta Testing Move to Alpha/Beta/Production @pareshmayani
  • 42. Google Play ServicesOptimization Tips @pareshmayani
  • 46. App Translation Service • Google Play can help you quickly find and purchase translations of your app. • In the Developer Console, you can browse a list of third- party vendors who are pre-qualified by Google to offer high- quality translation at competitive prices. Steps: 1. Upload the strings you want translated, select the languages you want to translate into. 2. Select your translation vendor based on time and price. @pareshmayani
  • 47. Links 1. https://github.com/PareshMayani/Android-Volley-Example 2. https://developers.google.com/maps/documentation/andro id/ 3. http://developer.android.com/distribute/googleplay/publish /localizing.html#gp-trans @pareshmayani
  • 48. Paresh Mayani Manager, GDG Ahmedabad Android Developer pareshmayani@gmail.com @pareshmayani < Stay in Touch >