http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=The+Death+of+the+Refresh+Button
Almost every app mobile need to synchronise data with a server, on Android too. But their is many ways to do it : AlertManagers & Services, SyncAdapter... and every ones has its pros & cons. Recently Google added a new way to do asynchronous work on Android in the L preview release : JobScheduler.
We are going to see how each techniques work and we've done it in the Capitaine Train Android application for a feedback with a complex data model.
Speaker : Mathieu Calba, Capitaine Train
Mathieu is a Mobile Software Developer at Capitaine Train, and GDG leader at Lyon with the GDG Lyon Android. Mathieu is fond of new technologies, and particularly with Android. He loves to create applications that integrate seamlessly with the system and spread his love for Android by giving some talks.
The document summarizes key points from a conference on November 9-10, 2015 about Gradle builds, Android performance, healthy code bases, and trending Android topics. It discusses optimizing Gradle builds for speed, including configuration on demand, the Gradle daemon, and avoiding expensive operations. It also covers measuring build times for different project sizes and configurations. Additional sections provide information on creating custom Gradle plugins, using data binding in Android, and new tools like Jack, Kotlin, and Eddystone beacons.
Mathieu Carrier is a 24-year-old bilingual Canadian man from New Brunswick. He received a French education through high school and is experienced in martial arts instruction, traveling with a band, and currently works as a bus boy. His achievements include martial arts belts, volunteer recognition, English fluency certification, and sports medals. His interests include martial arts, technology, politics, and video games.
How to Make Awesome SlideShares: Tips & TricksSlideShare
Turbocharge your online presence with SlideShare. We provide the best tips and tricks for succeeding on SlideShare. Get ideas for what to upload, tips for designing your deck and more.
SlideShare is a global platform for sharing presentations, infographics, videos and documents. It has over 18 million pieces of professional content uploaded by experts like Eric Schmidt and Guy Kawasaki. The document provides tips for setting up an account on SlideShare, uploading content, optimizing it for searchability, and sharing it on social media to build an audience and reputation as a subject matter expert.
This document provides an overview of Parse, a backend platform that allows developers to add functionality like user authentication, databases, file storage and push notifications to their mobile and web applications. Some key capabilities highlighted include saving and querying data from Parse databases, user signup and login functionality, integrating with third party services via cloud code, and using Parse push notifications and analytics to measure app usage.
The document summarizes Dave Isbitski's presentation on developing apps for Amazon's mobile ecosystem. The presentation covers:
1) Amazon's large customer base and opportunities for reaching customers through apps on Kindle Fire, Fire Phone, and Fire TV.
2) An introduction of Fire Phone and its unique features like Dynamic Perspective that allows tilting, auto-scrolling and peeking to interact with apps, and Firefly for identifying products.
3) A description of Dynamic Perspective and how it enables one-handed shortcuts and immersive experiences through tilting, swiveling and peeking interactions.
http://fr.droidcon.com/2014/agenda/detail?title=Extending+your+apps+to+wearables
speaker: Vitaliy Zasadnyy, GDG Lviv
Mobile developer, Google Developers Group and Gamedev Community Lviv co-founder. Interested in GameDev, Android, iOS, Google App Engine and community management. Used to work for enterprise giants like EPAM as well as for product companies such as NRavo. Nowedays work in two teams: first one make 3D MMO game using Unity, second - RnD. TEDx speaker.
http://fr.droidcon.com/2014/agenda/detail?title=Scaling+Android+Development+at+Twitter
In January 2012, nearly all Twitter for Android code was written by three engineers. As of January 2014, Twitter for Android has several dozens unique contributors from over ten different teams. In this talk, we'll discuss how Twitter moved to develop at scale from a single team-based development model to a project based development model that welcomes contributions from across the company and highlight some of the challenges that we ran into on the way.
Speaker: Jan Chong, Twitter
Jan Chong holds a BS and MS in Computer Science from Stanford University. She has Ph.D from the Management Science & Engineering Department, also from Stanford. She is currently the Engineering Manager for the Twitter for Android team. Prior to joining Twitter, Jan ran client and server software development at OnLive.
The document summarizes key points from a conference on November 9-10, 2015 about Gradle builds, Android performance, healthy code bases, and trending Android topics. It discusses optimizing Gradle builds for speed, including configuration on demand, the Gradle daemon, and avoiding expensive operations. It also covers measuring build times for different project sizes and configurations. Additional sections provide information on creating custom Gradle plugins, using data binding in Android, and new tools like Jack, Kotlin, and Eddystone beacons.
Mathieu Carrier is a 24-year-old bilingual Canadian man from New Brunswick. He received a French education through high school and is experienced in martial arts instruction, traveling with a band, and currently works as a bus boy. His achievements include martial arts belts, volunteer recognition, English fluency certification, and sports medals. His interests include martial arts, technology, politics, and video games.
How to Make Awesome SlideShares: Tips & TricksSlideShare
Turbocharge your online presence with SlideShare. We provide the best tips and tricks for succeeding on SlideShare. Get ideas for what to upload, tips for designing your deck and more.
SlideShare is a global platform for sharing presentations, infographics, videos and documents. It has over 18 million pieces of professional content uploaded by experts like Eric Schmidt and Guy Kawasaki. The document provides tips for setting up an account on SlideShare, uploading content, optimizing it for searchability, and sharing it on social media to build an audience and reputation as a subject matter expert.
This document provides an overview of Parse, a backend platform that allows developers to add functionality like user authentication, databases, file storage and push notifications to their mobile and web applications. Some key capabilities highlighted include saving and querying data from Parse databases, user signup and login functionality, integrating with third party services via cloud code, and using Parse push notifications and analytics to measure app usage.
The document summarizes Dave Isbitski's presentation on developing apps for Amazon's mobile ecosystem. The presentation covers:
1) Amazon's large customer base and opportunities for reaching customers through apps on Kindle Fire, Fire Phone, and Fire TV.
2) An introduction of Fire Phone and its unique features like Dynamic Perspective that allows tilting, auto-scrolling and peeking to interact with apps, and Firefly for identifying products.
3) A description of Dynamic Perspective and how it enables one-handed shortcuts and immersive experiences through tilting, swiveling and peeking interactions.
http://fr.droidcon.com/2014/agenda/detail?title=Extending+your+apps+to+wearables
speaker: Vitaliy Zasadnyy, GDG Lviv
Mobile developer, Google Developers Group and Gamedev Community Lviv co-founder. Interested in GameDev, Android, iOS, Google App Engine and community management. Used to work for enterprise giants like EPAM as well as for product companies such as NRavo. Nowedays work in two teams: first one make 3D MMO game using Unity, second - RnD. TEDx speaker.
http://fr.droidcon.com/2014/agenda/detail?title=Scaling+Android+Development+at+Twitter
In January 2012, nearly all Twitter for Android code was written by three engineers. As of January 2014, Twitter for Android has several dozens unique contributors from over ten different teams. In this talk, we'll discuss how Twitter moved to develop at scale from a single team-based development model to a project based development model that welcomes contributions from across the company and highlight some of the challenges that we ran into on the way.
Speaker: Jan Chong, Twitter
Jan Chong holds a BS and MS in Computer Science from Stanford University. She has Ph.D from the Management Science & Engineering Department, also from Stanford. She is currently the Engineering Manager for the Twitter for Android team. Prior to joining Twitter, Jan ran client and server software development at OnLive.
http://fr.droidcon.com/2014/agenda/detail?title=Ingredients+of+Awesome+App
There are an increasing number of apps that come with great design nowadays, and most of the carefully crafted apps resonate with the Android users due to their great and consistent User Experience (UX) design. Many developers and designers try hard to create an app with great UX by largely referring to the Android Design Guideline, however, to make remarkable UX design is certainly more than that, and often they missed certain important items from their check list. If you want to check if your app(s) is heading the right direction to awesomeness, be sure to check out this ‘advanced’ check list in making awesome Android apps.
Speaker: Taylor Ling
I am very passionate about User Experience (UX), not so much on the ethnography part, but more on the User Interface execution that can directly influence UX and Usability, particularly on the mobile devices (Android always come first!).
I am currently the GDE for UX/Design, and enjoy going around the world to share my experience on UI/UX Design.
Currently crafting pixels at snappymob.com.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Framing+the+Canvas
This talk will guide you through a topic that is often ignored: the Canvas API. Even if there's only scarce documentation for it, the Canvas API is at the heart of everything that shows a UI on Android. You'll need to tame this powerful and mysterious creature if you want to create great custom views and brilliant, lightweight UIs for your apps.
What is a Canvas? How do you Paint? Can you draw Paths? What is Skia, and who invited it anyway? What actually happens during a drawing pass? What are Shaders? What are Filters? Is it true that text is basically impossible to measure correctly? What shape does a Shape have if noone's painting it? These and other questions will get an answer during this session. Well, some of them will not, probably.
Connect the dots in the spotty documentation the Android team has assembled, and become a true pixel pusher!
Speaker: Sebastiano Poggi, Novoda
Sebastiano Poggi is a Android Software Craftsman at Novoda in London.
A self-taught and strong OSS believer who loves in beautiful and simple UX and UI, where “less is more”, he spends a big chunk of his spare time reading and writing about Android development. He also creates and maintains some FOSS apps and libraries, that span from the fun little project to more serious (and, perhaps, useful) work.
He worked some time in AKQA as a Senior Software Engineer. Before moving to London, he also worked at i’m Spa (an Italian smartwatch startup) for two years, messing with the Android platform and handling their Developer Relations. He's been toying with the Android SDK since 2010.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Deep+Dive+Into+State+Restoration
Come learn about how Android saves state in general in order to be able to restore an application in the exact same state the process was prior being killed because of a low memory condition or a configuration change. In this talk we will mainly focus on the Parcelable and Parcel objects and how Android uses them to save/restore some important stateful information such as the complete UI state.
Speaker : Cyril Mottier, Capitaine Train
Cyril Mottier is Mobile Software Engineer at Capitaine Train and Android Google Developer Expert. Passionate about technology and design, Cyril is an avid lover of Android and a multi-skilled engineer. He is actively involved in the Android community and shares his passion writing blog posts, creating open source librairies and giving talks. His motto: “Do less, but do it insanely great”
http://fr.droidcon.com/2014/agenda
http://fr.droidcon.com/2014/agenda/detail?title=Archos+Android+based+connected+home+solution
Archos has just launched a full connected home solution based on an Android tablet and relying on Bluetooth Low Energy accessories.
The purpose of the talk is to detail:
- how Android can play a major role in the connected home revolution
- the overall system architecture based on Android BLE, Google Cloud Messaging, Google Apps Engine, STUN/ICE remote connection
- the strategy to open up the Archos applications and accessories
Speaker : Marc de Courville, Archos CTO.
Archos is a French company and has been a player in the Android arena since Android 1.5: first to introduce Android tablets on the market and a Google certified Android TV (Archos TV Connect).
Archos is now a recognized brand for Android based tablets, phones and recently for Android based connected home solution.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Porting+VLC+on+Android
VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files, discs and streams. VLC runs on most platforms and is developed by volunteers.
This talk will explain how we ported VLC to Android using the NDK, the issues we faced and how we solved most of them. It will also detail the future of VLC on the Android platform.
Speaker : Jean-Baptiste Kempf, VideoLan
Jean-Baptiste Kempf is the president of the VideoLAN non-profit organization and one of the main developers of VLC.
Jean-Baptiste led some of the ports of VLC on mobile devices, including the Android port, and is the current release manager of VLC.
http://fr.droidcon.com/2014/agenda
http://fr.droidcon.com/2014/agenda/detail?title=Robotium+vs+Espresso%3A+Get+ready+to+rumble+!
Ladies and gentlemen, boys and girls. Dans le coin rouge, accusant un poids de 104KB, le plus populaire de tous les frameworks de test: Robotium. Dans le coin bleu, avec un poids de 262KB et le support des équipes Google, celui qu’on qualifie de “new comer” : Espresso. Que le match commence !!
Au programme nous verrons avec du code le fonctionnement de ces bibliothèques, leurs avantages mais aussi leurs inconvénients. Nous y parlerons également de Calabash Android et de UI Automator.
Speaker : Thomas Guerin, Xebia
Thomas Guerin est consultant pour Xebia depuis 2011. Passionné de développement Android et adepte des bonnes pratiques de développement, il s'intéresse de près au déploiement continu sur mobile.
http://fr.droidcon.com/2014/agenda
http://fr.droidcon.com/2014/agenda/detail?title=buildsystem.mk
##
## This module is about android build system, especially its makefiles and how to use them well
##
## @authors : Remy Gottschalk, Charles-Henry Prunier
LOCAL_PATH:= $(call for-paper)
include $(CLEAR_VARS)
LOCAL_MODULE := buildsystem.mk
LOCAL_SRC_FILES := \
Android.mk \
BoardConfig.mk \
AndroidProducts.mk \
CleanSpec.mk \
device.mk
LOCAL_CONF_FLAGS := -Obuild_system
LOCAL_CONF_FLAGS += -DHAVE_CUSTOM_ROM -IRomCooking
LOCAL_CONF_INCLUDES += \
definitions \
fonctionnement \
mots_cles \
utilisation \
modifications \
bonnes_pratiques
LOCAL_MODULE_PATH := $(TARGET_OUT_BRAIN)
LOCAL_MODULE_TAGS := eng
include $(BUILD_CONFERENCE)
Speaker : Remy Gottschalk and Charles-Henry Prunier, Genymobile
Remy et charly sont tous les deux ingénieurs conception et développement chez Genymobile, spécialisés dans la customisation de roms a destination des professionnels.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Maximize+App+engagement+and+monetization
Learn how you can turn your app into a business.
Discover the different mobile apps monetization models and trends.
Speaker : Jean Maisonnial, Google
Jean has been working at Google for more than 3 years. He is a Mobile Apps Consultant and works with French developers to help them to grow, distribute and monetize their apps.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=The+Android+Native+Development+Kit
The Android NDK is used to integrate C/C++ code into Android applications and libraries.
Learn how you can use the NDK and NDK-based libraries with Eclipse and Android Studio, and how you can debug and optimize your code.
Discover what changes from the new Android Runtime may break your integration, and how you can target new 64-bit architectures with the upcoming android L-release.
Speaker : Alexander Weggerle, Intel
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Holo+-%3E+Material+Design+Transition
Avec l'arrivée d'Android L, Google a décidé d'apporter à son OS mobile un nouvel ensemble de règles visuelles nommé Material Design. Mais il n'est pour autant pas nécessaire de changer intégralement le design de son application pour respecter ces nouvelles guidelines.
Cette conférence vous montrera en direct comment passer de Holo à Material au travers d'une application. Du floating button aux cartes à la Google Now, en passant par les nouvelles APIs d'animation, vous saurez tout ce qui est nécessaire pour effectuer une transition en douceur.
Speaker : Quentin Sallat, iD.apps
Android Developer for more than three years, I'm a huge fan of mobile and web development. I've been blogging for years about .NET, HTML5 and Java development, and I'm now a Professional Android developer.
I'm especially interested in app design, and with more than fifteen apps published under my personal account, Aerilys, I've some things I'd like to share with my fellow developers!
The document discusses weaknesses with password authentication and proposes alternative authentication methods. It notes that many users reuse passwords or use weak passwords that are susceptible to hacking. It then explores options like passwordless authentication, two-factor authentication, OAuth, OpenID, and biometric authentication as more secure replacements for passwords. The presentation argues that authentication and authorization are different, and that user experience should not be impaired by security measures.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Google+Glass%3A+which+framework+depending+for+which+usage
Ready to develop your first Google Glass app? I guess that you will be asking yourself the same questions we had :
• How to sign in your users without keyboard?
• How to scan or detect an object just by looking at it?
• How to provide an intuitive and interactive UX?
• How to deal with your IT system and share information between users?
We will show you which dependencies to add to your build.gradle to satisfy your user's wildest dreams and provide them a full compatible app for connected glasses.
You're not ready? Don't panic, our ideas will convince you to buy glasses. And with our code you will discover that a Google Glass app is nothing else but an Android App.
Speaker : Mathieu Hausherr, OCTO Technology
Mathieu Hausherr is a native mobile app developer at Octo Technology. He develops iOS and Android apps. He believes in mobile development industrialization, unit testing and continuous integration. He loves testing new devices like glasses or watches.
Follow him on twitter (@mhausherr)
Speaker : Cédric Pointel, OCTO Technology
Cédric Pointel is as mobile developer at OCTO Technology since 4 years. He develops mobile apps, mostly on iOS, for bank, insurance, luxury or social media. He also helps companies to improve theirs skills on mobile knowledge, code quality and continuous integration. Interested in robotics and connected objects, he has started testing new devices like Google Glass since the beginning of the year.
Follow him on twitter (@cpointel)
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Petit+design+pour+grande+humanit%C3%A9
Comment le design se rend-il utile à nos vies ? L'imaginaire social autour de la création relève souvent du mythe (le design ça n'est pas rendre beau!) cependant, il suffit parfois de petites choses intelligentes pour innover et faire grandir l'humain de façon individuelle et collective ou collaborative. Au travers d'exemples et d'éléments clefs, je vous invite à découvrir, autour du monde, comment la création de services, de produits, d'objets, d'expériences peuvent changer nos vies.
Speaker : Geoffrey Dorne, Design & Human
Designer. Hacker. Researcher —
This document summarizes some of the new features in Android 4.4 KitKat presented by Chet Haase and Romain Guy. It discusses the new storage access framework which allows browsing local and cloud documents through a standard interface. Printing capabilities are expanded through new PDF generation and printing APIs. The user interface is enhanced with translucent system bars, immersive full-screen mode, and a new WebView based on Chromium. Scene and transition animations can now be defined through code, resources, or a transition manager.
The document discusses efficient image processing techniques for Android, focusing on the RenderScript framework. It provides an overview of RenderScript, how to write kernels in C, and how to call them from Java. Examples are given for common image processing tasks like grayscale conversion, bloom effects, and local adjustments. Caching strategies and handling low-memory devices are also covered to ensure performance across all hardware.
The document discusses designing user interfaces for Android applications that work well across multiple screen sizes. It recommends using a navigation drawer for the main application navigation, with four top-level screens as a minimum structure. Content should be organized into fragments that can be reused on phones and tablets. Layouts should be designed to fork the UI between phone and tablet configurations by checking resource boolean values that specify screen size and orientation. Sample wireframes demonstrate how the same app content can be presented differently for phones versus tablets.
This document discusses various techniques for improving mobile app responsiveness and performance, including:
- Loading pages within 4 seconds to avoid high bounce rates.
- Caching data and images to reduce network usage.
- Avoiding work on the UI thread and blocking the UI to ensure responsiveness.
- Optimizing rendering, memory usage, and network requests to achieve smooth 60 frames-per-second performance.
- Profiling tools like Systrace, Hierarchy Viewer and GPU Overdraw can help detect issues.
The document summarizes Mark Kirstein's presentation at the 2011 APAC Developer Conference about RhoMobile Suite. It provides an overview of RhoMobile Suite which allows developing cross-platform native mobile applications using HTML5, discusses key features like cross-platform portability and exploiting device capabilities, and previews new features of RhoMobile Suite 4.0 like expanded device support and improvements to RhoElements, RhoStudio, and RhoConnect. It also promotes the RhoMobile developer community and resources for getting started with RhoMobile development.
http://fr.droidcon.com/2014/agenda/detail?title=Ingredients+of+Awesome+App
There are an increasing number of apps that come with great design nowadays, and most of the carefully crafted apps resonate with the Android users due to their great and consistent User Experience (UX) design. Many developers and designers try hard to create an app with great UX by largely referring to the Android Design Guideline, however, to make remarkable UX design is certainly more than that, and often they missed certain important items from their check list. If you want to check if your app(s) is heading the right direction to awesomeness, be sure to check out this ‘advanced’ check list in making awesome Android apps.
Speaker: Taylor Ling
I am very passionate about User Experience (UX), not so much on the ethnography part, but more on the User Interface execution that can directly influence UX and Usability, particularly on the mobile devices (Android always come first!).
I am currently the GDE for UX/Design, and enjoy going around the world to share my experience on UI/UX Design.
Currently crafting pixels at snappymob.com.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Framing+the+Canvas
This talk will guide you through a topic that is often ignored: the Canvas API. Even if there's only scarce documentation for it, the Canvas API is at the heart of everything that shows a UI on Android. You'll need to tame this powerful and mysterious creature if you want to create great custom views and brilliant, lightweight UIs for your apps.
What is a Canvas? How do you Paint? Can you draw Paths? What is Skia, and who invited it anyway? What actually happens during a drawing pass? What are Shaders? What are Filters? Is it true that text is basically impossible to measure correctly? What shape does a Shape have if noone's painting it? These and other questions will get an answer during this session. Well, some of them will not, probably.
Connect the dots in the spotty documentation the Android team has assembled, and become a true pixel pusher!
Speaker: Sebastiano Poggi, Novoda
Sebastiano Poggi is a Android Software Craftsman at Novoda in London.
A self-taught and strong OSS believer who loves in beautiful and simple UX and UI, where “less is more”, he spends a big chunk of his spare time reading and writing about Android development. He also creates and maintains some FOSS apps and libraries, that span from the fun little project to more serious (and, perhaps, useful) work.
He worked some time in AKQA as a Senior Software Engineer. Before moving to London, he also worked at i’m Spa (an Italian smartwatch startup) for two years, messing with the Android platform and handling their Developer Relations. He's been toying with the Android SDK since 2010.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Deep+Dive+Into+State+Restoration
Come learn about how Android saves state in general in order to be able to restore an application in the exact same state the process was prior being killed because of a low memory condition or a configuration change. In this talk we will mainly focus on the Parcelable and Parcel objects and how Android uses them to save/restore some important stateful information such as the complete UI state.
Speaker : Cyril Mottier, Capitaine Train
Cyril Mottier is Mobile Software Engineer at Capitaine Train and Android Google Developer Expert. Passionate about technology and design, Cyril is an avid lover of Android and a multi-skilled engineer. He is actively involved in the Android community and shares his passion writing blog posts, creating open source librairies and giving talks. His motto: “Do less, but do it insanely great”
http://fr.droidcon.com/2014/agenda
http://fr.droidcon.com/2014/agenda/detail?title=Archos+Android+based+connected+home+solution
Archos has just launched a full connected home solution based on an Android tablet and relying on Bluetooth Low Energy accessories.
The purpose of the talk is to detail:
- how Android can play a major role in the connected home revolution
- the overall system architecture based on Android BLE, Google Cloud Messaging, Google Apps Engine, STUN/ICE remote connection
- the strategy to open up the Archos applications and accessories
Speaker : Marc de Courville, Archos CTO.
Archos is a French company and has been a player in the Android arena since Android 1.5: first to introduce Android tablets on the market and a Google certified Android TV (Archos TV Connect).
Archos is now a recognized brand for Android based tablets, phones and recently for Android based connected home solution.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Porting+VLC+on+Android
VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files, discs and streams. VLC runs on most platforms and is developed by volunteers.
This talk will explain how we ported VLC to Android using the NDK, the issues we faced and how we solved most of them. It will also detail the future of VLC on the Android platform.
Speaker : Jean-Baptiste Kempf, VideoLan
Jean-Baptiste Kempf is the president of the VideoLAN non-profit organization and one of the main developers of VLC.
Jean-Baptiste led some of the ports of VLC on mobile devices, including the Android port, and is the current release manager of VLC.
http://fr.droidcon.com/2014/agenda
http://fr.droidcon.com/2014/agenda/detail?title=Robotium+vs+Espresso%3A+Get+ready+to+rumble+!
Ladies and gentlemen, boys and girls. Dans le coin rouge, accusant un poids de 104KB, le plus populaire de tous les frameworks de test: Robotium. Dans le coin bleu, avec un poids de 262KB et le support des équipes Google, celui qu’on qualifie de “new comer” : Espresso. Que le match commence !!
Au programme nous verrons avec du code le fonctionnement de ces bibliothèques, leurs avantages mais aussi leurs inconvénients. Nous y parlerons également de Calabash Android et de UI Automator.
Speaker : Thomas Guerin, Xebia
Thomas Guerin est consultant pour Xebia depuis 2011. Passionné de développement Android et adepte des bonnes pratiques de développement, il s'intéresse de près au déploiement continu sur mobile.
http://fr.droidcon.com/2014/agenda
http://fr.droidcon.com/2014/agenda/detail?title=buildsystem.mk
##
## This module is about android build system, especially its makefiles and how to use them well
##
## @authors : Remy Gottschalk, Charles-Henry Prunier
LOCAL_PATH:= $(call for-paper)
include $(CLEAR_VARS)
LOCAL_MODULE := buildsystem.mk
LOCAL_SRC_FILES := \
Android.mk \
BoardConfig.mk \
AndroidProducts.mk \
CleanSpec.mk \
device.mk
LOCAL_CONF_FLAGS := -Obuild_system
LOCAL_CONF_FLAGS += -DHAVE_CUSTOM_ROM -IRomCooking
LOCAL_CONF_INCLUDES += \
definitions \
fonctionnement \
mots_cles \
utilisation \
modifications \
bonnes_pratiques
LOCAL_MODULE_PATH := $(TARGET_OUT_BRAIN)
LOCAL_MODULE_TAGS := eng
include $(BUILD_CONFERENCE)
Speaker : Remy Gottschalk and Charles-Henry Prunier, Genymobile
Remy et charly sont tous les deux ingénieurs conception et développement chez Genymobile, spécialisés dans la customisation de roms a destination des professionnels.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Maximize+App+engagement+and+monetization
Learn how you can turn your app into a business.
Discover the different mobile apps monetization models and trends.
Speaker : Jean Maisonnial, Google
Jean has been working at Google for more than 3 years. He is a Mobile Apps Consultant and works with French developers to help them to grow, distribute and monetize their apps.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=The+Android+Native+Development+Kit
The Android NDK is used to integrate C/C++ code into Android applications and libraries.
Learn how you can use the NDK and NDK-based libraries with Eclipse and Android Studio, and how you can debug and optimize your code.
Discover what changes from the new Android Runtime may break your integration, and how you can target new 64-bit architectures with the upcoming android L-release.
Speaker : Alexander Weggerle, Intel
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Holo+-%3E+Material+Design+Transition
Avec l'arrivée d'Android L, Google a décidé d'apporter à son OS mobile un nouvel ensemble de règles visuelles nommé Material Design. Mais il n'est pour autant pas nécessaire de changer intégralement le design de son application pour respecter ces nouvelles guidelines.
Cette conférence vous montrera en direct comment passer de Holo à Material au travers d'une application. Du floating button aux cartes à la Google Now, en passant par les nouvelles APIs d'animation, vous saurez tout ce qui est nécessaire pour effectuer une transition en douceur.
Speaker : Quentin Sallat, iD.apps
Android Developer for more than three years, I'm a huge fan of mobile and web development. I've been blogging for years about .NET, HTML5 and Java development, and I'm now a Professional Android developer.
I'm especially interested in app design, and with more than fifteen apps published under my personal account, Aerilys, I've some things I'd like to share with my fellow developers!
The document discusses weaknesses with password authentication and proposes alternative authentication methods. It notes that many users reuse passwords or use weak passwords that are susceptible to hacking. It then explores options like passwordless authentication, two-factor authentication, OAuth, OpenID, and biometric authentication as more secure replacements for passwords. The presentation argues that authentication and authorization are different, and that user experience should not be impaired by security measures.
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Google+Glass%3A+which+framework+depending+for+which+usage
Ready to develop your first Google Glass app? I guess that you will be asking yourself the same questions we had :
• How to sign in your users without keyboard?
• How to scan or detect an object just by looking at it?
• How to provide an intuitive and interactive UX?
• How to deal with your IT system and share information between users?
We will show you which dependencies to add to your build.gradle to satisfy your user's wildest dreams and provide them a full compatible app for connected glasses.
You're not ready? Don't panic, our ideas will convince you to buy glasses. And with our code you will discover that a Google Glass app is nothing else but an Android App.
Speaker : Mathieu Hausherr, OCTO Technology
Mathieu Hausherr is a native mobile app developer at Octo Technology. He develops iOS and Android apps. He believes in mobile development industrialization, unit testing and continuous integration. He loves testing new devices like glasses or watches.
Follow him on twitter (@mhausherr)
Speaker : Cédric Pointel, OCTO Technology
Cédric Pointel is as mobile developer at OCTO Technology since 4 years. He develops mobile apps, mostly on iOS, for bank, insurance, luxury or social media. He also helps companies to improve theirs skills on mobile knowledge, code quality and continuous integration. Interested in robotics and connected objects, he has started testing new devices like Google Glass since the beginning of the year.
Follow him on twitter (@cpointel)
http://fr.droidcon.com/2014/agenda/
http://fr.droidcon.com/2014/agenda/detail?title=Petit+design+pour+grande+humanit%C3%A9
Comment le design se rend-il utile à nos vies ? L'imaginaire social autour de la création relève souvent du mythe (le design ça n'est pas rendre beau!) cependant, il suffit parfois de petites choses intelligentes pour innover et faire grandir l'humain de façon individuelle et collective ou collaborative. Au travers d'exemples et d'éléments clefs, je vous invite à découvrir, autour du monde, comment la création de services, de produits, d'objets, d'expériences peuvent changer nos vies.
Speaker : Geoffrey Dorne, Design & Human
Designer. Hacker. Researcher —
This document summarizes some of the new features in Android 4.4 KitKat presented by Chet Haase and Romain Guy. It discusses the new storage access framework which allows browsing local and cloud documents through a standard interface. Printing capabilities are expanded through new PDF generation and printing APIs. The user interface is enhanced with translucent system bars, immersive full-screen mode, and a new WebView based on Chromium. Scene and transition animations can now be defined through code, resources, or a transition manager.
The document discusses efficient image processing techniques for Android, focusing on the RenderScript framework. It provides an overview of RenderScript, how to write kernels in C, and how to call them from Java. Examples are given for common image processing tasks like grayscale conversion, bloom effects, and local adjustments. Caching strategies and handling low-memory devices are also covered to ensure performance across all hardware.
The document discusses designing user interfaces for Android applications that work well across multiple screen sizes. It recommends using a navigation drawer for the main application navigation, with four top-level screens as a minimum structure. Content should be organized into fragments that can be reused on phones and tablets. Layouts should be designed to fork the UI between phone and tablet configurations by checking resource boolean values that specify screen size and orientation. Sample wireframes demonstrate how the same app content can be presented differently for phones versus tablets.
This document discusses various techniques for improving mobile app responsiveness and performance, including:
- Loading pages within 4 seconds to avoid high bounce rates.
- Caching data and images to reduce network usage.
- Avoiding work on the UI thread and blocking the UI to ensure responsiveness.
- Optimizing rendering, memory usage, and network requests to achieve smooth 60 frames-per-second performance.
- Profiling tools like Systrace, Hierarchy Viewer and GPU Overdraw can help detect issues.
The document summarizes Mark Kirstein's presentation at the 2011 APAC Developer Conference about RhoMobile Suite. It provides an overview of RhoMobile Suite which allows developing cross-platform native mobile applications using HTML5, discusses key features like cross-platform portability and exploiting device capabilities, and previews new features of RhoMobile Suite 4.0 like expanded device support and improvements to RhoElements, RhoStudio, and RhoConnect. It also promotes the RhoMobile developer community and resources for getting started with RhoMobile development.
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsDianaGray10
Join us to learn how UiPath Apps can directly and easily interact with prebuilt connectors via Integration Service--including Salesforce, ServiceNow, Open GenAI, and more.
The best part is you can achieve this without building a custom workflow! Say goodbye to the hassle of using separate automations to call APIs. By seamlessly integrating within App Studio, you can now easily streamline your workflow, while gaining direct access to our Connector Catalog of popular applications.
We’ll discuss and demo the benefits of UiPath Apps and connectors including:
Creating a compelling user experience for any software, without the limitations of APIs.
Accelerating the app creation process, saving time and effort
Enjoying high-performance CRUD (create, read, update, delete) operations, for
seamless data management.
Speakers:
Russell Alfeche, Technology Leader, RPA at qBotic and UiPath MVP
Charlie Greenberg, host
How information systems are built or acquired puts information, which is what they should be about, in a secondary place. Our language adapted accordingly, and we no longer talk about information systems but applications. Applications evolved in a way to break data into diverse fragments, tightly coupled with applications and expensive to integrate. The result is technical debt, which is re-paid by taking even bigger "loans", resulting in an ever-increasing technical debt. Software engineering and procurement practices work in sync with market forces to maintain this trend. This talk demonstrates how natural this situation is. The question is: can something be done to reverse the trend?
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...Alex Pruden
Folding is a recent technique for building efficient recursive SNARKs. Several elegant folding protocols have been proposed, such as Nova, Supernova, Hypernova, Protostar, and others. However, all of them rely on an additively homomorphic commitment scheme based on discrete log, and are therefore not post-quantum secure. In this work we present LatticeFold, the first lattice-based folding protocol based on the Module SIS problem. This folding protocol naturally leads to an efficient recursive lattice-based SNARK and an efficient PCD scheme. LatticeFold supports folding low-degree relations, such as R1CS, as well as high-degree relations, such as CCS. The key challenge is to construct a secure folding protocol that works with the Ajtai commitment scheme. The difficulty, is ensuring that extracted witnesses are low norm through many rounds of folding. We present a novel technique using the sumcheck protocol to ensure that extracted witnesses are always low norm no matter how many rounds of folding are used. Our evaluation of the final proof system suggests that it is as performant as Hypernova, while providing post-quantum security.
Paper Link: https://eprint.iacr.org/2024/257
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving
Manufacturing custom quality metal nameplates and badges involves several standard operations. Processes include sheet prep, lithography, screening, coating, punch press and inspection. All decoration is completed in the flat sheet with adhesive and tooling operations following. The possibilities for creating unique durable nameplates are endless. How will you create your brand identity? We can help!
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyScyllaDB
Freshworks creates AI-boosted business software that helps employees work more efficiently and effectively. Managing data across multiple RDBMS and NoSQL databases was already a challenge at their current scale. To prepare for 10X growth, they knew it was time to rethink their database strategy. Learn how they architected a solution that would simplify scaling while keeping costs under control.
In our second session, we shall learn all about the main features and fundamentals of UiPath Studio that enable us to use the building blocks for any automation project.
📕 Detailed agenda:
Variables and Datatypes
Workflow Layouts
Arguments
Control Flows and Loops
Conditional Statements
💻 Extra training through UiPath Academy:
Variables, Constants, and Arguments in Studio
Control Flow in Studio
Must Know Postgres Extension for DBA and Developer during MigrationMydbops
Mydbops Opensource Database Meetup 16
Topic: Must-Know PostgreSQL Extensions for Developers and DBAs During Migration
Speaker: Deepak Mahto, Founder of DataCloudGaze Consulting
Date & Time: 8th June | 10 AM - 1 PM IST
Venue: Bangalore International Centre, Bangalore
Abstract: Discover how PostgreSQL extensions can be your secret weapon! This talk explores how key extensions enhance database capabilities and streamline the migration process for users moving from other relational databases like Oracle.
Key Takeaways:
* Learn about crucial extensions like oracle_fdw, pgtt, and pg_audit that ease migration complexities.
* Gain valuable strategies for implementing these extensions in PostgreSQL to achieve license freedom.
* Discover how these key extensions can empower both developers and DBAs during the migration process.
* Don't miss this chance to gain practical knowledge from an industry expert and stay updated on the latest open-source database trends.
Mydbops Managed Services specializes in taking the pain out of database management while optimizing performance. Since 2015, we have been providing top-notch support and assistance for the top three open-source databases: MySQL, MongoDB, and PostgreSQL.
Our team offers a wide range of services, including assistance, support, consulting, 24/7 operations, and expertise in all relevant technologies. We help organizations improve their database's performance, scalability, efficiency, and availability.
Contact us: info@mydbops.com
Visit: https://www.mydbops.com/
Follow us on LinkedIn: https://in.linkedin.com/company/mydbops
For more details and updates, please follow up the below links.
Meetup Page : https://www.meetup.com/mydbops-databa...
Twitter: https://twitter.com/mydbopsofficial
Blogs: https://www.mydbops.com/blog/
Facebook(Meta): https://www.facebook.com/mydbops/
Discover top-tier mobile app development services, offering innovative solutions for iOS and Android. Enhance your business with custom, user-friendly mobile applications.
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor IvaniukFwdays
At this talk we will discuss DDoS protection tools and best practices, discuss network architectures and what AWS has to offer. Also, we will look into one of the largest DDoS attacks on Ukrainian infrastructure that happened in February 2022. We'll see, what techniques helped to keep the web resources available for Ukrainians and how AWS improved DDoS protection for all customers based on Ukraine experience
Dandelion Hashtable: beyond billion requests per second on a commodity serverAntonios Katsarakis
This slide deck presents DLHT, a concurrent in-memory hashtable. Despite efforts to optimize hashtables, that go as far as sacrificing core functionality, state-of-the-art designs still incur multiple memory accesses per request and block request processing in three cases. First, most hashtables block while waiting for data to be retrieved from memory. Second, open-addressing designs, which represent the current state-of-the-art, either cannot free index slots on deletes or must block all requests to do so. Third, index resizes block every request until all objects are copied to the new index. Defying folklore wisdom, DLHT forgoes open-addressing and adopts a fully-featured and memory-aware closed-addressing design based on bounded cache-line-chaining. This design offers lock-free index operations and deletes that free slots instantly, (2) completes most requests with a single memory access, (3) utilizes software prefetching to hide memory latencies, and (4) employs a novel non-blocking and parallel resizing. In a commodity server and a memory-resident workload, DLHT surpasses 1.6B requests per second and provides 3.5x (12x) the throughput of the state-of-the-art closed-addressing (open-addressing) resizable hashtable on Gets (Deletes).
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
From Natural Language to Structured Solr Queries using LLMsSease
This talk draws on experimentation to enable AI applications with Solr. One important use case is to use AI for better accessibility and discoverability of the data: while User eXperience techniques, lexical search improvements, and data harmonization can take organizations to a good level of accessibility, a structural (or “cognitive” gap) remains between the data user needs and the data producer constraints.
That is where AI – and most importantly, Natural Language Processing and Large Language Model techniques – could make a difference. This natural language, conversational engine could facilitate access and usage of the data leveraging the semantics of any data source.
The objective of the presentation is to propose a technical approach and a way forward to achieve this goal.
The key concept is to enable users to express their search queries in natural language, which the LLM then enriches, interprets, and translates into structured queries based on the Solr index’s metadata.
This approach leverages the LLM’s ability to understand the nuances of natural language and the structure of documents within Apache Solr.
The LLM acts as an intermediary agent, offering a transparent experience to users automatically and potentially uncovering relevant documents that conventional search methods might overlook. The presentation will include the results of this experimental work, lessons learned, best practices, and the scope of future work that should improve the approach and make it production-ready.
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...DanBrown980551
This LF Energy webinar took place June 20, 2024. It featured:
-Alex Thornton, LF Energy
-Hallie Cramer, Google
-Daniel Roesler, UtilityAPI
-Henry Richardson, WattTime
In response to the urgency and scale required to effectively address climate change, open source solutions offer significant potential for driving innovation and progress. Currently, there is a growing demand for standardization and interoperability in energy data and modeling. Open source standards and specifications within the energy sector can also alleviate challenges associated with data fragmentation, transparency, and accessibility. At the same time, it is crucial to consider privacy and security concerns throughout the development of open source platforms.
This webinar will delve into the motivations behind establishing LF Energy’s Carbon Data Specification Consortium. It will provide an overview of the draft specifications and the ongoing progress made by the respective working groups.
Three primary specifications will be discussed:
-Discovery and client registration, emphasizing transparent processes and secure and private access
-Customer data, centering around customer tariffs, bills, energy usage, and full consumption disclosure
-Power systems data, focusing on grid data, inclusive of transmission and distribution networks, generation, intergrid power flows, and market settlement data
19. What is syncing?
Executing a
BACKGROUND JOB
to update local data
WHEN APPROPRIATE
20. BACKGROUND JOB
• Non-user facing operation
• Upload and/or download
• Requires network connectivity
• Always leave the data in good state
21. What is syncing?
Executing a
BACKGROUND JOB
to update local data
WHEN APPROPRIATE
22. WHEN APPROPRIATE
aka scheduling & triggering
• Only when needed, and when relevant
(network availability, battery level, etc)
• Restore after reboot
• Exponential back-off
• Be careful with battery life
• etc.
23. WHEN APPROPRIATE
aka scheduling & triggering
• Best solution: push message
• Not always available, fallback: periodic
polling
24. What is syncing?
Executing a
BACKGROUND JOB
to update local data
WHEN APPROPRIATE
28. AsyncTask & AlarmManager
Create your AsyncTask:
!
public final class PeriodicTaskRunnable extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... voids) {
// TODO the task !
return null;
}
}
Start the periodic run with the AlarmManager:
private void triggerPeriodicAsyncTask() {
final Intent intent = new Intent(this, PeriodicTaskReceiver.class);
final PendingIntent receiverPendingIntent = PendingIntent.
getBroadcast(this, 140916, intent, PendingIntent.FLAG_UPDATE_CURRENT);
final AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
alarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, //
SystemClock.elapsedRealtime() + AlarmManager.INTERVAL_HOUR, //
AlarmManager.INTERVAL_HOUR, //
receiverPendingIntent);
}
29. Create your BroadcastReceiver:
!
public class PeriodicTaskReceiver extends BroadcastReceiver {
public static final String ACTION_SYNC = “com.mathieucalba.tasks.ACTION_SYNC";
@Override
public void onReceive(Context context, Intent intent) {
if (ACTION_SYNC.equals(intent.getAction())) {
new PeriodicTaskRunnable().execute();
}
}
}
And declare it in the Manifest:
!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mathieucalba.testjobscheduler">
<application>
<receiver
android:name=".tasks.PeriodicTaskReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.mathieucalba.tasks.ACTION_SYNC" />
</intent-filter>
</receiver>
</application>
</manifest>
AsyncTask & AlarmManager
30. AsyncTask & AlarmManager
• AsyncTask & Receiver can be replaced by an
IntentService for simplicity
• Restoring periodic sync after a reboot?
• Handling connectivity availability?
• Indicate sync state to others
• etc.
32. Definition
One method to do the
UPLOAD & DOWNLOAD SYNC
(SyncAdapter)
for one DATA PROVIDER (ContentProvider)
associated with a USER ACCOUNT
(AccountAuthenticator)
which can be TRIGGERED MANUALLY
or by the SYSTEM.
33. public final class AccountAuthenticator extends AbstractAccountAuthenticator {
public static final String ACCOUNT_TYPE = "com.mathieucalba.testjobscheduler";
public static final String ACCOUNT_NAME_SYNC = "com.mathieucalba.testjobscheduler";
public AccountAuthenticator(Context context) {
super(context);
}
@Override
public Bundle addAccount(AccountAuthenticatorResponse response, String accountType,
String authTokenType, String[] requiredFeatures, Bundle options)
throws NetworkErrorException {
return null;
}
@Override
public Bundle confirmCredentials(AccountAuthenticatorResponse response, Account account,
Bundle options) throws NetworkErrorException {
return null;
}
@Override
public Bundle editProperties(AccountAuthenticatorResponse response, String accountType) {
throw new UnsupportedOperationException();
}
//…
}
1- Account
34. public final class AccountAuthenticator extends AbstractAccountAuthenticator {
//…
@Override
public Bundle getAuthToken(AccountAuthenticatorResponse response, Account account,
String authTokenType, Bundle options) throws NetworkErrorException {
throw new UnsupportedOperationException();
}
@Override
public String getAuthTokenLabel(String authTokenType) {
throw new UnsupportedOperationException();
}
@Override
public Bundle hasFeatures(AccountAuthenticatorResponse response, Account account,
String[] features) throws NetworkErrorException {
throw new UnsupportedOperationException();
}
@Override
public Bundle updateCredentials(AccountAuthenticatorResponse response, Account account,
String authTokenType, Bundle options)
throws NetworkErrorException {
throw new UnsupportedOperationException();
}
}
1- Account
35. Bind the AccountAuthenticator to the framework:
!
public final class AccountAuthenticatorService extends Service {
private static final Object LOCK = new Object();
private static AccountAuthenticator sAuthenticator;
@Override
public void onCreate() {
super.onCreate();
synchronized (LOCK) {
if (sAuthenticator == null) {
sAuthenticator = new AccountAuthenticator(getApplicationContext());
}
}
}
@Override
public IBinder onBind(Intent intent) {
synchronized (LOCK) {
return sAuthenticator.getIBinder();
}
}
}
1- Account
37. Add the Account required by the framework:
!
private void initAccountAuthenticator() {
final AccountManager accountManager = AccountManager.get(this);
final Account[] accounts = accountManager.getAccountsByType(AccountAuthenticator.ACCOUNT_TYPE);
for (Account account : accounts) {
if (AccountAuthenticator.ACCOUNT_NAME_SYNC.equals(account.name)) {
return;
}
}
accountManager.addAccountExplicitly(new Account(AccountAuthenticator.ACCOUNT_NAME_SYNC,
AccountAuthenticator.ACCOUNT_TYPE), null, null);
}
1- Account
For more info on implementing an AccountAuthenticator: http://
udinic.wordpress.com/2013/04/24/write-your-own-android-authenticator/
38. Create a stub ContentProvider:
!
public class StubProvider extends ContentProvider {
@Override
public boolean onCreate() { return true; }
@Override
public String getType(Uri uri) { return new String(); }
@Override
public Cursor query(Uri uri, String[] strings, String s, String[] strings2, String s2) {
return null;
}
@Override
public Uri insert(Uri uri, ContentValues contentValues) { return null; }
@Override
public int update(Uri uri, ContentValues contentValues, String s, String[] strings) { return 0; }
@Override
public int delete(Uri uri, String s, String[] strings) { return 0; }
}
2- ContentProvider
39. Declare your ContentProvider in the Manifest:
!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mathieucalba.testsyncadapter">
<application>
<provider
android:authorities="com.mathieucalba.testsyncadapter.provider.stub"
android:exported="false"
android:name=".provider.StubProvider"
android:syncable="true" />
</application>
</manifest>
2- ContentProvider
For more details about ContentProviders,
see my slides at http://bit.ly/ContentProvider
40. Implement the synchronization mechanism:
!
public class SyncAdapter extends AbstractThreadedSyncAdapter {
public SyncAdapter(Context context) {
super(context, false, false); // Context, auto initialize, parallel sync
}
@Override
public void onPerformSync(Account account, Bundle extras, String authority,
ContentProviderClient provider, SyncResult syncResult) {
// TODO the sync
}
}
3- SyncAdapter
41. Bind the SyncAdapter to the framework:
!
public class SyncAdapterService extends Service {
private static final Object LOCK = new Object();
private static SyncAdapter sSyncAdapter = null;
@Override
public void onCreate() {
super.onCreate();
synchronized (LOCK) {
if (sSyncAdapter == null) {
sSyncAdapter = new SyncAdapter(getApplicationContext());
}
}
}
@Override
public IBinder onBind(Intent intent) {
synchronized (LOCK) {
return sSyncAdapter.getSyncAdapterBinder();
}
}
}
3- SyncAdapter
44. How to trigger a one time sync:
!
private static void triggerSyncAdapter(Account account, boolean now) {
final Bundle extras = new Bundle();
if (now) {
// ignore backoff && settings
extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
// put the request at the front of the queue
extras.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
}
ContentResolver.requestSync(account, StubProvider.AUTHORITY, extras);
}
4- Triggering
45. How to configure an account for periodic sync, auto sync when network is up:
!
public static void setupSync(Account account) {
if (account == null) {
return;
}
// Inform the system that this account supports sync
ContentResolver.setIsSyncable(account, StubProvider.AUTHORITY, 1);
// Inform the system that this account is eligible for auto sync when the network is up
ContentResolver.setSyncAutomatically(account, StubProvider.AUTHORITY, true);
// Recommend a schedule for automatic synchronisation. The system may modify this based
// on other scheduled syncs and network utilisation.
ContentResolver.addPeriodicSync(account, //
StubProvider.AUTHORITY, //
new Bundle(), //
TimeUnit.HOURS.toSeconds(1));
}
4- Triggering
!
Periodic & automatic sync doesn’t works
if user has deactivated it
47. Mark the item to be deleted instead of deleting it:
!
@Override
public int delete(Uri uri, String s, String[] strings) {
final int count;
if (StubContract.hasNeedSyncToNetworkParameter(uri)) {
final int match = URI_MATCHER.match(uri);
switch (match) {
case OPTION_ID:
final ContentValues values = new ContentValues();
values.put(SyncColumns.SYNC_DELETED, SyncColumns.SYNC_DELETED_MARKED);
count = buildSimpleSelection(uri).
where(selection, selectionArgs).
update(getDatabaseHelper().getWritableDatabase(), values);
break;
default:
throw new SyncToNetworkUnknownUriException(uri);
}
} else {
count = buildSimpleSelection(uri).
where(selection, selectionArgs).
delete(getDatabaseHelper().getWritableDatabase());
}
if (count > 0) {
notifyChange(uri);
}
return count;
}
5- ContentProvider Triggering
48. Notify the change to the SyncAdapter:
!
private void notifyChange(Uri uri) {
getContext().getContentResolver().
notifyChange(uri, null, isCallerUriUploadReady(uri) && !isCallerSyncAdapter(uri));
}
public boolean isCallerSyncAdapter(Uri uri) {
return StubContract.hasCallerIsSyncAdapterParameter(uri);
}
private boolean isCallerUriUploadReady(Uri uri) {
if (StubContract.hasNeedSyncToNetworkParameter(uri)) {
final int match = URI_MATCHER.match(uri);
switch (match) {
case OPTION_ID:
return true;
default:
throw new SyncToNetworkUnknownUriException(uri);
}
}
return false;
}
5- ContentProvider Triggering
49. How we detect an URI if from the SyncAdapter, and when a SyncAdapter trigger is needed:
!
interface SyncExtras {
String IS_CALLER_SYNC_ADAPTER = "is_caller_sync_adapter";
String NEED_SYNC_TO_NETWORK = "need_sync_to_network";
}
public static Uri addCallerIsSyncAdapterParameter(Uri uri) {
return uri.buildUpon().appendQueryParameter(SyncExtras.IS_CALLER_SYNC_ADAPTER,
Boolean.toString(true)).build();
}
public static boolean hasCallerIsSyncAdapterParameter(Uri uri) {
final String parameter = uri.getQueryParameter(SyncExtras.IS_CALLER_SYNC_ADAPTER);
return parameter != null && Boolean.parseBoolean(parameter);
}
public static Uri addNeedSyncToNetworkParameter(Uri uri) {
return uri.buildUpon().appendQueryParameter(SyncExtras.NEED_SYNC_TO_NETWORK,
Boolean.toString(true)).build();
}
public static boolean hasNeedSyncToNetworkParameter(Uri uri) {
final String parameter = uri.getQueryParameter(SyncExtras.NEED_SYNC_TO_NETWORK);
return parameter != null && Boolean.parseBoolean(parameter);
}
5- ContentProvider Triggering
50. 5- ContentProvider Triggering
Be careful, your corresponding query should not
return the deleted data if it’s not the
SyncAdapter querying.
51. SyncAdapter
• Google way
• Easily triggered by the system when
appropriate (network availability,
change in associated
ContentProvider)
• Needs an AccountAuthenticator (at
least a stub)
• Needs a ContentProvider (at least a
stub)
53. Definition
SCHEDULE the execution of a JOB (via a
Service)
with VARIOUS PARAMETERS
about WHEN
the execution SHOULD HAPPEN
(during a window of time, periodically, with network
needed, etc.)
54. The JobService is where we are awaken:
!
public class MyJobService extends JobService {
private ExecutorService mExecutor;
private final Handler mHandler = new Handler(Looper.getMainLooper());
@Override
public void onCreate() {
super.onCreate();
mExecutor = Executors.newSingleThreadExecutor();
}
@Override
public void onDestroy() {
mExecutor.shutdown();
super.onDestroy();
}
@Override
public boolean onStartJob(JobParameters jobParameters) {
// We are on the Main thread, so post the Task to a background thread
mExecutor.execute(new Task(jobParameters));
return true;
}
@Override
public boolean onStopJob(JobParameters jobParameters) {
// TODO interrupt Task
return true;
}
}
1- JobService
55. private final class Task implements Runnable {
private final JobParameters mJobParameters;
private Task(JobParameters jobParameters) { mJobParameters = jobParameters; }
@Override
public void run() {
// TODO the network call
mHandler.post(new FinishedTask(mJobParameters, true));
}
}
private final class FinishedTask implements Runnable {
private final JobParameters mJobParameters;
private final boolean mIsSuccess;
private FinishedTask(JobParameters jobParameters, boolean isSuccess) {
mJobParameters = jobParameters;
mIsSuccess = isSuccess;
}
@Override
public void run() {
// Notify that the job has ended
jobFinished(mJobParameters, mIsSuccess);
}
}
1- JobService
56. Declare your MyJobService into the Manifest:
!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mathieucalba.testjobscheduler">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application>
<service
android:name=".tasks.MyJobService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="true"/>
</application>
</manifest>
1- JobService
57. 2- Triggering
Exemple for triggering a one time Job:
!
JobInfo.Builder builder = new JobInfo.Builder(JOB_ID_1, new ComponentName(this, MyJobService.class)).
setBackoffCriteria(TimeUnit.MINUTES.toMillis(1),
JobInfo.BackoffPolicy.EXPONENTIAL).
setMinimumLatency(TimeUnit.SECONDS.toMillis(5)).
setOverrideDeadline(TimeUnit.HOURS.toMillis(1)).
setRequiredNetworkCapabilities(JobInfo.NetworkType.ANY);
((JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE)).schedule(builder.build());
!
Exemple for triggering a periodic Job:
!
builder = new JobInfo.Builder(JOB_ID_PERIODIC, new ComponentName(this, MyJobService.class)).
setPeriodic(TimeUnit.HOURS.toMillis(1)).
setRequiredNetworkCapabilities(JobInfo.NetworkType.UNMETERED).
setRequiresDeviceIdle(true).
setRequiresCharging(true);
((JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE)).schedule(builder.build());
58. JobScheduler
• Configurable scheduling (idle-mode,
network availability, etc) across all the
system
• Simple, based upon a Service
• Persisted state
• Android-L+ only
60. Conclusion
• SyncAdapter perfect if account and
ContentProvider, great otherwise but can be
tricky
• JobScheduler very promising, but Android L+
only, a limited compat library would help
spread its use (based upon Service &
AlarmManager).
61. Conclusion
• We have the tools to create an app the
works seamlessly without an internet
connection so the user never have to worry
about his internet connection
63. Credits
• Up & Down icons by Guillaume Berry
• The Search Underneath the Bed by Arielle Nadel
• Yorkshire Moors Milky Way 3 by Matthew Savage
• Injured Piggy Bank With Crutches by Ken Teegardin
• No Internet by Marcelo Graciolli
• Balancing The Account By Hand by Ken Teegardin
• Rage by Amy McTigue
• Daniel Foster by Online Shopping
• 3D Bright Idea by Chris Potter
• Landscape by Ben Simo
• Christmas Eve Sunrise by Jay Parker