Zenika at Singapore’s first DroidCon

0

The first Singapore DroidCon took place in the Google Offices the 5th of April, 2018. Zenika was, of course, present for the whole day and this article will take you through all the event’s compelling moments.

DroidCon, started in 2009 in Berlin, has since spread all over the world, traversing 26 cities such as Tunis, Nairobi, Beijing and now Singapore. Its purpose is to provide a forum for the Android community to gather and share technical insights through talks and workshops about current topics like core Android development, testing, IoT, augmented reality and so on.

 The Singapore DroidCon featured 10 informative talks from expert developers, as well as an open discussion about Internet of Things. Although all of the presentations at DroidCon Singapore were insightful, in the interests of space, only some of them will be covered in detail in this article.

 

The day began at 8am, with us walking into the offices of Google’s stunning new Singapore Headquarters. We retrieved our attendee cards and began networking while the guests arrived. Being early in the morning, when the conference room opened its doors, the first stop for most guests was the tea and coffee station. There were plenty of goodies from the partners (SP, Carousell and Firebase). For their gift, Firebase, the development platform acquired by Google in 2014, decided to play with fire. Literally – with a bottle of original firebase hot sauce! We’ve not tried it yet but it is definitely an innovative goody!

After settling into the main hall, we were welcomed by Geraldine Yong and Khang Toh, two of the co-organizers, who handed over to the first speaker.


Morning conferences

Improving code quality and reliability through automated checks
By Frieder Bluemle Principal Software Engineer @ SP Group

This talk gave a valuable window into how developers can utilize testing tools in order to improve the quality of the code. Frieder Bluemle began by explaining some important features of code quality and tools such as consistency, reliability and learning. Consistency is crucial to saving time in code reviews, freeing up time for other important matters. Reliability enables the early detection of possible memory leaks or other problems. Learning is very important since without it, improving applications and creating better ones is impossible. As such, the tools should suggest practices in order to improve the coding style.

 For Java, the tools discussed were Checkstyle, Findbugs, JaCoCo, Jdepend and PMD, while three were presented for Kotlin: Detekt, Ktlint and Android Lint. On this github repository (https://github.com/friederbluemle/android-quality-template), you can see for yourself some samples of checkstyle, FindBugs, Jdepend and PMD.

 Frieder also gave us some tips about code coverage, putting dependency constraints with gradle and the utilization of Android components (https://developer.android.com/topic/libraries/architecture/index.html).

Introduction to ARCore
By Wim Meeussen Engineering Manager @ Google, ARCore

Augmented reality (AR) is one of the hottest topics of the moment and Wim Meeussen introduced us to ARCore, the new Android platform for developing AR apps.

 For him, AR represents a new way for us to interact with the world through our smartphones. Wim took us through the three groundbreaking technologies in ARCore:

  1. Motion tracking; allowing the phone to understand and track its position and orientation.
  2. Environment understanding; enabling the phone to detect the size and location of flat horizontal surfaces like the ground or a desk.
  3. Light estimation; allowing the phone to estimate the environment’s current lighting conditions.

With this new platform, it is no longer necessary for phones to have the infrared and fisheye used in the Tango phone (released in 2014) for a good rendering in augmented reality apps. Some phones which fully support ARCore are the Asus Zenfone, Google Pixel (1 and 2), P20 from Huawei. You can find the full list at https://developers.google.com/ar/discover/). The number of compatible phones should grow in future as Google verifies phone by phone if all the features are supported.

Wim then shared some examples of markets where augmented reality has already found its place. In social media, AR allows for the inclusion of virtual elements in photos and videos. AR greatly enhances the retail experience. For example, shoppers will be able to visualize new sofas in their living rooms before deciding to buy it. We can also use AR as new tools for, as an example, easily measuring the size of a table or any other object. Games are also, of course, another important field in which AR is present.

After explaining these markets, he covered some tips for the development of augmented reality applications:

  1. Guide users on how to use AR. Since AR is a new concept, it is important to explain features in order for users to fully use them.
  2. Provide feedback on surface detection to show to the user that the application is understanding the environment.
  3. Adapt the experience to the real world by anticipating all the possible obstacles that the user can be exposed.
  4. Consider the user’s safety by avoiding making them walk backwards or do anything else which could cause injury.
  5. Design with the scale of your world in mind. Virtual elements in one app might be on a single surface (like a table), while in another on all the surfaces of an entire room. Developers need to make sure their ideas match environments. The image illustrates the idea.
  6. Use visual effects to improve the experience. Using a shadow under the object or a destination point where the user wants to add something are some examples.
  7. Be careful with the rotation of the phone. Even though a user may rotate their phone, the image should stay the same as it is representing the real world.

 Wim finally presented some other Google tools to simplify the development of AR apps. Poly offers thousands of free 3D assets, Block and Tilt brush can be used for creating 3D assets. Apps can be tested in sample environments with Android Emulator and later debugged with GAPID.


The morning session was rounded out with two other talks.

ConstraintLayout – one layout to rule them all by Andrew Kelly @ Bilue described a very effective way to design the layout of mobile applications. Implementation of Smart Listings on Carousell by Denis Sakhapov and Zachary Tong from @ Carousell, showcased how an innovative solution enabled their listings to achieve greater flexibility and scalability in their application.


After four stimulating talks, the guests broke for lunch and networking in a relaxed atmosphere. We were then ready to start the afternoon talks.

Afternoon conferences

Fun with DSL
By Iñaki Villar Android GDE Thailand, Android Engineer @ Agoda

Kicking off the afternoon talks was Fun with DSL by Iñaki Villar from Agoda. His presentation focused on using Kotlin as a Domain Specific Language. He began by explaining the differences between internal and external DSL as well as outlining DSL as a concept. Defined in a simple way, DSL corresponds to a language used (or created) for a particular domain (“business”). HTML is an example of DSL being used mainly for web pages.

 

Iñaki then amused the audience with a live coding of Kotlin DSL while the famous Star Wars song played in the background. For those who are interested in DSL, he suggested two books for further reading: Domain-Specific Languages by Martin Fowler & Rebecca Parsons and Domain-Driven Design by Eric Evans.

Connect your Android Things with Firebase
By Doug Stevenson Google Developer Advocate @ Firebase

Doug Stevenson of Firebase gave the next talk, titled Connect your Android Things with Firebase.

He illustrated how Firebase can be used to communicate with “things” with the example of creating an intelligent digital doorbell connected to a phone. To make this smart doorbell possible, he used the Cloud Storage, the Cloud Functions, the Cloud Firestore and the Cloud Messaging of Firebase.


1000 and 1 problems we’ve solved in Grab
By Ruslan Kim Android Engineering @ Grab

You have most likely heard of Grab, the transportation company which has just bought all the Southeast Asian Uber operations. During this talk, Grab’s developers outlined the problems they faced in trying to improve the Grab Android application while their team of staff grew.  The solution was a bold one, indeed.

 

To contextualize their problems, he showed us the amount of code for the taxi booking activity. It was more than three thousand lines! Adding to the complications was the fact that Grab was rapidly adding new features, not to mention that their team was also growing fast (from 10 just one and a half years ago to 47 today). Action was needed in order to improve their code and their efficiency!  

Their initial strategy was to simplify the code through refactoring. Instead of the traditional git flow, they decided to use trunk-based development. However, the refactoring failed… The code was too highly coupled, and the parallel development of features was causing too many problems. Omnipresent global states made simplifying the code impossible beyond a certain point. Despite their best efforts, they only managed to shrink the taxi booking file to around two thousand lines. Better than in the beginning, of course, but they wanted to find a better solution…

After much searching, they came up with a brilliant idea! To rewrite the whole App! Yes, you read correctly, Grab decided to redevelop the entire Android application from the ground up in order to rethink the whole architecture. Thanks to the motivation of a dedicated team and the support of Grab executive committee, they embarked on this new challenge!

The teams were split into small families, like little squads. Each of them had a development purpose: one for the payment, one for the booking, one for food delivery, etc. They replaced Java with Kotlin, used a multi-module project, followed the new best practices and created a new architecture with fewer dependencies between the different features.

Thanks to their daring vision and hard work they finally managed to rewrite the elephantine taxi booking file into several smaller files. In the end, the booking core had just 200 lines, more than 15 times fewer than before! This excellent result shows that sometimes it is better to break everything than struggling with maintaining an old source code…

Android CI with Kubernetes
By Anton Malinskiy Development Manager @ Agoda

 

Anton Malinskiy of Agoda presented us an excellent talk, Android Continuous Integration with Kubernetes. His talk first described all the prerequisites necessary to do CI with Android, then how to deploy it and create the unit test. Finally, Anton covered how to do instrumentation testing, self-healing and monitoring. It was a technical talk that covered the topic with extensive detail. You can find his slide deck at https://goo.gl/KB6VS9.

Then we had an open discussion about the Internet of Things (IOT) and Android Things.

During this discussion, the speakers emphasized how simple it is to start creating connected devices without using large amounts of money. You can use, for example, the well-known Raspberry Pi which costs less than $50 and if you want you can buy some sensors for a few bucks. So, if you have an idea, making it happen is easier than you think! And if you are worried about security, common best practices like using https or always encrypting your data before sending can be used.

Speaking of security, the next talk was focused on this very subject.

Decoding insecure Android applications
By Esther Lim Security Analyst @ Deloitte Australia

Did you know that in 2016, they were 197 billion mobile application downloads? And can you imagine that in 2021, just 4 years from now, that number will have grown 352.9 billion! With this skyrocketing growth, having guidelines about security is critical. One to recommend is the famous OWASP Mobile Security Project.

 

During her talk, Esther focused on the most common vulnerabilities discovered in Android applications by OWASP:

  1. Improper platform usage (51%): be careful not to do allow permission outside the required use of the application like enabling read/write of calendar events, accessing documents…
  2. Insecure data storage (49%): credentials should never be hardcoded within the android application. Even the IP/URL disclosure should not be available in the source code.
  3. Insecure communication (16%): always configure communication to avoid the famous man in the middle attack. Be careful during the implementation of SSL.
  4. Insufficient cryptography (21%): choose a cryptographic function carefully. For example, SHA1 should not be used because it is corrupted.

Android OS Internals
By Dr Jeannie Lee Associate Professor @ Singapore Institute of Technology

Concluding the day was a talk on Android OS Internals by Dr. Jeannie Lee Associate Professor @ Singapore Institute of Technology. She explained to us the different layers composing the Android OS (Kernel, HAL, Native C/C++ Libraries and Runtine, Java API Framework and Apps as the last layer). The audience learned an interesting fact – that the very first process launched by the Android OS is named zygote, the beginning of every human life and Android! 

Like all great events, this one finished with a party! We listened to good music, had dinner, discussed the day with other guests and, naturally, drank some of Singapore’s famous Tiger beer.

DroidCon 2018 was a resounding success. The presentations were very rich in cutting-edge knowledge. It was a pleasure to discover new Android features and, as always, to meet with the incredible people in the IT industry.

For more information about past DroidCons, visit the official website: www.droidcon.sg. See you at the next Singapore DroidCon (or for my next article)! I hope you have enjoyed this one! 🙂


Written by Hassen Makni, Software Engineer at Zenika Singapore.

Zenika is a consultancy company which drives change through IT innovation. Our areas of expertise are consulting, project development and training.

Partagez cet article.

A propos de l'auteur

Ajouter un commentaire