This document provides guidance on writing Android libraries. It discusses getting started by creating a library module in Android Studio or using the command line. It emphasizes the importance of testing libraries using tools like JUnit, Burst, and Jenkins. The document also covers publishing libraries to Bintray and generating AAR and JAR files. More advanced topics discussed include annotation processing, using the NDK for native code, and including native libraries in the published JAR file. The key takeaways are to embrace Gradle, explore Gradle plugins, automate testing, use Bintray for publishing, and that writing libraries can be very rewarding.
With growth in app market it is essential to guard our android apps against possible threats, in this presentation we will walk through various tools and techniques which some one can use to reverse engineer an android app, we will see how some one can get access to APP DB, CODE, API, PREFERENCES.
We will also see different tools and techniques to guard our app against possible threats from code obfuscation with tools like dexgaurd to newer methods like verification of api calls using google play services.
This session was taken in Barcamp 13 bangalore http://barcampbangalore.org/bcb/bcb13/reverse-engineering-an-android-app-securing-your-android-apps-against-attacks
and bangalore android user group meetup Jan meetup http://www.meetup.com/blrdroid/events/100360682/
Using Native Development Toolkit . Information collected from many sources http://lyaug.fr/slides/presentation-ndk/#/step-11
http://psrdotcom.blogspot.fr/2011/12/android-ndk-jni-windows-xp7-with-3264.html
During one of my personal projects I decided to study the internals of Android and the potential of altering the Dalvik VM (e.g. Xposed framework and Cydia) and application behaviour. Not going into detail about runtime hooking of constructors and classes like these two tools provide, I also explored the possibility of reverse engineering and modifying existing applications.
In the web you can find multiple tutorials on Android reverse engineering of applications but not many that do it with real applications that are often subject to obfuscation or with complex execution flows. So in order to learn I decided to pick a common application such as Skype and do the following:
decompile it
study contents and completely remove some functionality (e.g. ads)
change some resources (not described in presentation bellow)
recompile, sign and install.
Used tools include :
apktool – for (de)compiling android applications
jarsigner – for signing android applications
xposed – for intercepting runtime execution flow (will make public in future)
The following presentation describes the steps taken in order to completely remove the ads from skype. This includes any computation or data plan usage the ads consume. Please note the disclaimer of the presentation as this information is for educational purposes only.
Check my website : www.marioalmeida.eu
Android applications are an interesting target for
reverse engineering. They are written in Java, which is tradi-
tionally good to decompile and are executed by Google’s custom
Java virtual machine, making them interesting to study. In this
paper we present the basic methods and approaches as well as
the necessary tools to reverse engineer Android applications. We
discuss how to change Android applications and show alternative
approaches including man-in-the-middle attacks and automation.
Learn How to Unit Test Your Android Application (with Robolectric)Marakana Inc.
Robolectric is an open source Android unit testing framework that makes it possible to run unit tests against your Android application code outside of the emulator - in the IDE. Robolectric gives you the scaffolding to run your tests quickly so you can make fast iterations and refactor your code with confidence.
** Check out the video for this presentation at marakana.com: http://mrkn.co/f/192 **
This presentation was given at the San Francisco Android User Group on Oct. 26, 2010.
Lecture on Android unit testing and instrumentation testing, mDevCamp 2015.
Overview of available libraries and frameworks, and their capabilities and drawbacks.
With growth in app market it is essential to guard our android apps against possible threats, in this presentation we will walk through various tools and techniques which some one can use to reverse engineer an android app, we will see how some one can get access to APP DB, CODE, API, PREFERENCES.
We will also see different tools and techniques to guard our app against possible threats from code obfuscation with tools like dexgaurd to newer methods like verification of api calls using google play services.
This session was taken in Barcamp 13 bangalore http://barcampbangalore.org/bcb/bcb13/reverse-engineering-an-android-app-securing-your-android-apps-against-attacks
and bangalore android user group meetup Jan meetup http://www.meetup.com/blrdroid/events/100360682/
Using Native Development Toolkit . Information collected from many sources http://lyaug.fr/slides/presentation-ndk/#/step-11
http://psrdotcom.blogspot.fr/2011/12/android-ndk-jni-windows-xp7-with-3264.html
During one of my personal projects I decided to study the internals of Android and the potential of altering the Dalvik VM (e.g. Xposed framework and Cydia) and application behaviour. Not going into detail about runtime hooking of constructors and classes like these two tools provide, I also explored the possibility of reverse engineering and modifying existing applications.
In the web you can find multiple tutorials on Android reverse engineering of applications but not many that do it with real applications that are often subject to obfuscation or with complex execution flows. So in order to learn I decided to pick a common application such as Skype and do the following:
decompile it
study contents and completely remove some functionality (e.g. ads)
change some resources (not described in presentation bellow)
recompile, sign and install.
Used tools include :
apktool – for (de)compiling android applications
jarsigner – for signing android applications
xposed – for intercepting runtime execution flow (will make public in future)
The following presentation describes the steps taken in order to completely remove the ads from skype. This includes any computation or data plan usage the ads consume. Please note the disclaimer of the presentation as this information is for educational purposes only.
Check my website : www.marioalmeida.eu
Android applications are an interesting target for
reverse engineering. They are written in Java, which is tradi-
tionally good to decompile and are executed by Google’s custom
Java virtual machine, making them interesting to study. In this
paper we present the basic methods and approaches as well as
the necessary tools to reverse engineer Android applications. We
discuss how to change Android applications and show alternative
approaches including man-in-the-middle attacks and automation.
Learn How to Unit Test Your Android Application (with Robolectric)Marakana Inc.
Robolectric is an open source Android unit testing framework that makes it possible to run unit tests against your Android application code outside of the emulator - in the IDE. Robolectric gives you the scaffolding to run your tests quickly so you can make fast iterations and refactor your code with confidence.
** Check out the video for this presentation at marakana.com: http://mrkn.co/f/192 **
This presentation was given at the San Francisco Android User Group on Oct. 26, 2010.
Lecture on Android unit testing and instrumentation testing, mDevCamp 2015.
Overview of available libraries and frameworks, and their capabilities and drawbacks.
Esta presentación expone las principales herramientas y técnicas a utilizar para llevar a cabo un proceso de ingeniería inversa sobre una aplicación Android, con el objetivo de identificar código malicioso en la misma. En la exposición se presenta, desde el punto de vista de un analista de seguridad y de una forma práctica, el proceso de análisis de una aplicación existente en la Google Play Store.
Overview of Android NDK (Native Development Toolkit).
Android application development is primarily done with the Android SDK.
Apps are written in Java thus benefitting from the high-level constructs
of the managed environment as well as the wealth of functionality provided
by the Android application platform.
However, sometimes it is necessary to implement certain functionality natively
in C++, e.g. when access to hardware is required or 3rd party stacks have to
be included that are only available as C++ code.
The NDK is a lightweight development toolkit for writing native applications
and libraries that can interwork with Java application code.
Droidcon Greece '15 - Reverse Engineering in Android: Countermeasures and ToolsDario Incalza
Reverse Engineering (RE) is the art of taking an application apart and try to understand the internal mechanisms.
There’s a positive side and a negative side to this approach. The positive side is the fact that RE gives us a means to research and understand malware.
The negative side is that distributed binaries can be torn apart to look at intellectual property or to inject it with malicious code.
The talk will guide you through the Android app build process and learn some countermeasures to make it harder for hackers to reverse engineer your Android code. Further more the talk will cover opensource tools that you can use to reverse engineer Android applications to inspect it for malware.
Native development kit (ndk) introductionRakesh Jha
Native development kit (ndk) introduction
Topics covered include •
o What is an NDK and Why NDK? •
o Java Native Interface (JNI) •
o Using NDK •
o NDK and JNI by Example •
o NDK's Stable APIs
• Android NDK Multithreading
o Introduction To NDK Native Threading
o Creating and terminating native threads at Android NDK
Build with pthreads
Thread creation
Thread termination
o Synchronizing native threads with conditional variables at Android NDK
Initialize and destroy conditional variables
o Synchronizing native threads with semaphore at Android NDK
Initialize and destroy a semaphore
o Managing data for native threads at Android NDK
ProbeDroid - Crafting Your Own Dynamic Instrument Tool on Android for App Beh...ZongXian Shen
The design memo and hack note of ProbeDroid
A dynamic binary instrumentation kit targeting Android(Lollipop) 5.0 and above
This is the first complete draft.
Improved version will be updated in a few days.
O Android NDK é a ferramenta que permite a utilização de código nativo (C/C++) em sua aplicação Android. Nesta apresentação conheça alguns usos interessantes do NDK, as vantagens e desvantagens de utilizá-lo, além de como começar a usar esta ferramenta com o Android Studio.
Decompiling Android apps
Ever dreamed of reverse engineering an application? We'll show you how to decompile Android apps and quickly overview the tools required in the process. We'll also demonstrate what Proguard does to protect your code.
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
This is First Lecture of java Programming which cover all basic points (ie. History and feature of java, Introduction to java, about variables data type and compilation....
(CISC 2013) Real-Time Record and Replay on Android for Malware AnalysisZongXian Shen
1. The assessment for the appropriate record and replay architecture for real time Android malware analysis.
2. The prototype implementation and demonstration.
Android 101 - Introduction to Android DevelopmentAndy Scherzinger
Introduction to Android development at the relaunch meetup of the Mobile Development FFM User Group in Frankfurt giving an introduction to basic principles like Activities, Fragments, life cycle, activity state, how to deal with fragmentation and some best practices and hints at the end.
In this session you will learn:
1. Principles of Object-Oriented Programming
2. Writing your first Java Application
3. Elements of Java programming language
4. Built in Data Types
5. Conditional Statements
6. Loops
In this core java training session, you will learn Elements of Java programming. Topics covered in this session are:
• Quick review of some important concepts from last class
• History of Java
• JDK and JRE
• Byte Code and JVM (Java Virtual Machine)
• Platform Independence
• Principles of Object Oriented Programming
• Writing your first Java Application
• Elements of Java programming language
• Built in Data Types
• Conditional Statements
• Loops
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
Esta presentación expone las principales herramientas y técnicas a utilizar para llevar a cabo un proceso de ingeniería inversa sobre una aplicación Android, con el objetivo de identificar código malicioso en la misma. En la exposición se presenta, desde el punto de vista de un analista de seguridad y de una forma práctica, el proceso de análisis de una aplicación existente en la Google Play Store.
Overview of Android NDK (Native Development Toolkit).
Android application development is primarily done with the Android SDK.
Apps are written in Java thus benefitting from the high-level constructs
of the managed environment as well as the wealth of functionality provided
by the Android application platform.
However, sometimes it is necessary to implement certain functionality natively
in C++, e.g. when access to hardware is required or 3rd party stacks have to
be included that are only available as C++ code.
The NDK is a lightweight development toolkit for writing native applications
and libraries that can interwork with Java application code.
Droidcon Greece '15 - Reverse Engineering in Android: Countermeasures and ToolsDario Incalza
Reverse Engineering (RE) is the art of taking an application apart and try to understand the internal mechanisms.
There’s a positive side and a negative side to this approach. The positive side is the fact that RE gives us a means to research and understand malware.
The negative side is that distributed binaries can be torn apart to look at intellectual property or to inject it with malicious code.
The talk will guide you through the Android app build process and learn some countermeasures to make it harder for hackers to reverse engineer your Android code. Further more the talk will cover opensource tools that you can use to reverse engineer Android applications to inspect it for malware.
Native development kit (ndk) introductionRakesh Jha
Native development kit (ndk) introduction
Topics covered include •
o What is an NDK and Why NDK? •
o Java Native Interface (JNI) •
o Using NDK •
o NDK and JNI by Example •
o NDK's Stable APIs
• Android NDK Multithreading
o Introduction To NDK Native Threading
o Creating and terminating native threads at Android NDK
Build with pthreads
Thread creation
Thread termination
o Synchronizing native threads with conditional variables at Android NDK
Initialize and destroy conditional variables
o Synchronizing native threads with semaphore at Android NDK
Initialize and destroy a semaphore
o Managing data for native threads at Android NDK
ProbeDroid - Crafting Your Own Dynamic Instrument Tool on Android for App Beh...ZongXian Shen
The design memo and hack note of ProbeDroid
A dynamic binary instrumentation kit targeting Android(Lollipop) 5.0 and above
This is the first complete draft.
Improved version will be updated in a few days.
O Android NDK é a ferramenta que permite a utilização de código nativo (C/C++) em sua aplicação Android. Nesta apresentação conheça alguns usos interessantes do NDK, as vantagens e desvantagens de utilizá-lo, além de como começar a usar esta ferramenta com o Android Studio.
Decompiling Android apps
Ever dreamed of reverse engineering an application? We'll show you how to decompile Android apps and quickly overview the tools required in the process. We'll also demonstrate what Proguard does to protect your code.
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
This is First Lecture of java Programming which cover all basic points (ie. History and feature of java, Introduction to java, about variables data type and compilation....
(CISC 2013) Real-Time Record and Replay on Android for Malware AnalysisZongXian Shen
1. The assessment for the appropriate record and replay architecture for real time Android malware analysis.
2. The prototype implementation and demonstration.
Android 101 - Introduction to Android DevelopmentAndy Scherzinger
Introduction to Android development at the relaunch meetup of the Mobile Development FFM User Group in Frankfurt giving an introduction to basic principles like Activities, Fragments, life cycle, activity state, how to deal with fragmentation and some best practices and hints at the end.
In this session you will learn:
1. Principles of Object-Oriented Programming
2. Writing your first Java Application
3. Elements of Java programming language
4. Built in Data Types
5. Conditional Statements
6. Loops
In this core java training session, you will learn Elements of Java programming. Topics covered in this session are:
• Quick review of some important concepts from last class
• History of Java
• JDK and JRE
• Byte Code and JVM (Java Virtual Machine)
• Platform Independence
• Principles of Object Oriented Programming
• Writing your first Java Application
• Elements of Java programming language
• Built in Data Types
• Conditional Statements
• Loops
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
This Presentation will give u information about Android :
1. Getting started with android Android Features
2. Android Architecture
3. Android Application fundamentals
Presentation about new concepts and features that came with Android Studio.
Advantages over eclipse.
Explanation about Gradle.
Productivity with Android Studio.
Shotcuts migration from Eclipse.
IBM Index 2018 Conference Workshop: Modernizing Traditional Java App's with D...Eric Smalling
Slides from my 2.5 hour hands-on workshop covering Docker basics, the Docker MTA program and how it applies to legacy Java applications and some tips on running those apps in containers in production.
"Container technologies such as Docker are rapidly becoming the de-facto way to deploy cloud applications, and Java is committed to being a good container citizen. This session will explain how OpenJDK fits into the world of containers, specifically how it fits with Docker images and containers.
The session will focus on the production of optimized Docker images containing a JDK. We will introduce technologies such as jlink, that can be used to reduce the size of the created image. The session will explain Alpine/musl support for an effective image and runtime. The session will also talk about and the inclusion of Class Data Sharing (CDS) archives and Ahead of Time (AOT) shared object libraries for improving startup time.
The attendees will learn about the recent work that has gone into OpenJDK for interacting with container resource limitations."
[Ultracode Munich #4] Short introduction to the new Android build system incl...BeMyApp
By Thomas Endres & Andres Würl both Senior Consultant from TNG Technology Consulting https://www.tngtech.com
Join the Ultracode Munich meetup: http://www.meetup.com/Ultracode-Munich/
In dieser Session werfen wir einen Blick auf die Android Platform jenseits der Dalvik VM. Wir entdecken den Android Source Code und erklären wo sich interessante Beispiele und Referenzen für App-Entwickler sowie nützliche Tools verbergen. Ein High-Level Überblick über die Platform-Architektur und das Platform-Build-System runden die Session ab.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
Accelerate Enterprise Software Engineering with PlatformlessWSO2
Key takeaways:
Challenges of building platforms and the benefits of platformless.
Key principles of platformless, including API-first, cloud-native middleware, platform engineering, and developer experience.
How Choreo enables the platformless experience.
How key concepts like application architecture, domain-driven design, zero trust, and cell-based architecture are inherently a part of Choreo.
Demo of an end-to-end app built and deployed on Choreo.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfJay Das
With the advent of artificial intelligence or AI tools, project management processes are undergoing a transformative shift. By using tools like ChatGPT, and Bard organizations can empower their leaders and managers to plan, execute, and monitor projects more effectively.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
2. Emanuele Zattin
Born and raised in Padova, Italy
Living in Copenhagen, Denmark since 2005
Automation enthusiast
Jenkins CI contributor since 2010
Java developer at Realm
About me
3. Embedded on-device mobile database
Easy — saves app makers months of time
Cross-platform — iOS & Android for now. More are coming
Fast — way faster than existing solutions
About Realm
5. Your code depends on Android idioms:
• UI
• Looper/Handler
• Sensors
• Native code
• Many more!
Why writing an Android library?
6. How hard can it be right?
Just fire Android Studio up and start a new project!
Step one: Getting started!
7. Android Studio supports the creation of:
Step one: Getting started!
Application Library
New project
✓ ✗
New module
✓ ✓
8. Option 1: Android Studio
1. Create a new application project
2. Add a library module
3. Remove the application module
Step one: Getting started!
9. Option 2: The Command Line
$ android create lib-project -t 1 -k it.droidcon.awesomelib -p . -g -v 1.1.3
-t: target (Use android list targets to get a list of target ids)
-k: package name
-p: path to the project
-g: make it a Gradle project (requires SDK >= 19)
-v: version of the Android Gradle plugin to use
Step one: Getting started!
12. API Design
It’s a huge subject that goes far beyond this presentation but here
are some pointers and reference:
Effective Java 2, Joshua Bloch
How To Design A Good API and Why it Matters, Joshua Bloch
Step two: Code, code, code!
13. Characteristics of a good API (Joshua Bloch)
• Easy to learn
• Easy to use, even without documentation
• Hard to misuse
• Easy to read and maintain code that uses it
• Sufficiently powerful to satisfy requirements
• Easy to extend
• Appropriate to audience
Step two: Code, code, code!
14. Testing is universally important but even more so for libraries
Testing an Android library is just like testing an Android application
Yes, JUnit 3 is not so good and lacks a particularly important
feature when testing libraries: parametric tests
Luckily there’s a solution: Burst
Step three: Test
15. Automate your tests!
Jenkins is a wonderful tool for this.
It offers more than one thousand plugins some of which
specialised for Android development.
Step three: Test
16. Some must-have Jenkins plugins include:
• Job Config History plugin
• Git plugin
• Gradle plugin
• Android Emulator plugin
• Jenkins comes with JUnit and Matrix job support out of the box
Step three: Test
17. Another useful way to test your library (and showcase it) is to write
one or more example apps.
Running monkey on the app ensures it doesn’t suffer from crashes
and ANRs
A useful Gradle plugin:
https://github.com/novoda/gradle-android-command-plugin
Step three: Test
18. Aar vs Jar
• Aar is supported by Gradle and Android Studio
• Aar is not supported by Ant and Eclipse
• Using local Aar files is not trivial
• Do you want to support Eclipse? Use Jar!
Step four: Publish
19. The Android Gradle plugin will generate an Aar file
How to generate a Jar instead?
The Aar actually contains our Jar already!
task generateJar(type: Copy) {
group 'Build'
description 'blah blah...'
dependsOn assemble
from 'build/intermediates/bundles/release/classes.jar'
into 'build/libs'
rename('classes.jar', 'awesome-library.jar')
}
Step four: Publish
21. Bintray requires a source Jar
task androidSourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
}
Step four: Publish
22. Bintray also requires a Javadoc Jar
android.libraryVariants.all { variant ->
task("javadoc${variant.name.capitalize()}", type: Javadoc) {
description "Generates Javadoc for $variant.name."
group 'Docs'
source = variant.javaCompile.source
ext.androidJar = files(plugins
.findPlugin(“com.android.library")
.getBootClasspath())
classpath = files(variant.javaCompile.classpath.files) +
ext.androidJar
exclude '**/BuildConfig.java'
exclude '**/R.java'
}
}
Step four: Publish
23. Bintray also provides a Gradle plugin for the actual publishing
https://github.com/bintray/gradle-bintray-plugin
The configuration is not trivial, and in the beginning it might be
easier to just do the release manually on the binary website
Step four: Publish
24. Annotation processing is a functionality of javac used for scanning
and processing annotations at compile time
You can write your own annotation processor.
Problems that annotation processing is good at solving:
• Boilerplate removal
• Introspection removal
Advanced Topics: Annotation Processor
25. Popular Android libraries using annotation processing:
• Dagger
• Butter Knife
• Autovalue/Autoparcel
• Realm
Advanced Topics: Annotation Processor
26. Bad news!
The Android API does not support the
javax.annotation.processing package
Advanced Topics: Annotation Processor
27. Create two new java sub-projects:
• annotations (used both by the library and the processor)
• annotations processor
Advanced Topics: Annotation Processor
28. The Jar task will need to be modified:
task androidJar(type: Jar) {
dependsOn assemble
group 'Build'
description ‘blah blah’
from zipTree(
'build/intermediates/bundles/release/classes.jar')
from zipTree(
'../annotations-processor/build/libs/processor.jar')
from zipTree(
'../annotations/build/libs/annotations.jar')
}
Advanced Topics: Annotation Processor
29. The javadoc tasks will also have to be modified:
android.libraryVariants.all { variant ->
task("javadoc${variant.name.capitalize()}", type: Javadoc) {
description "Generates Javadoc for $variant.name."
group 'Docs'
source = variant.javaCompile.source
source "../annotations/src/main/java"
ext.androidJar = files(plugins
.findPlugin(“com.android.library")
.getBootClasspath())
classpath = files(variant.javaCompile.classpath.files)
+ ext.androidJar
exclude '**/BuildConfig.java'
exclude '**/R.java'
}
}
Advanced Topics: Annotation Processor
33. Solution 1
Ignore Google’s warning and keep using the Gradle NDK support.
It works* but there is one missing feature: no ldFlags
ndk {
moduleName "sanangeles"
cFlags "-‐DANDROID_NDK -‐DDISABLE_IMPORTGL"
ldLibs "GLESv1_CM", "dl", "log"
stl "stlport_static"
}
*for some definition of “works”
Advanced Topics: Native code
34. Solution 2
Gradle native plugin
Gotchas:
• Requires extra logic to handle standalone toolchains
• It might soon become obsolete
Advanced Topics: Native code
35. How to include the native libraries in the Jar file?
$ tree
.
!"" META-INF
# $"" MANIFEST.MF
!"" com
# $"" amazing-library
# $"" AmazingLibrary.class
$"" lib
!"" armeabi
# $"" amazing-library.so
!"" armeabi-v7a
# $"" amazing-library.so
$"" x86
$"" amazing-library.so
Advanced Topics: Native code
36. How to generate the jar file in Gradle?
task androidJar(type: Jar, dependsOn: ['assemble']) {
group 'Build'
description ‘blah blah'
from zipTree('build/intermediates/bundles/release/classes.jar')
from(file('src/main/jniLibs')) {
into 'lib'
}
}
Advanced Topics: Native code
37. • Embrace Gradle
• Explore Gradle plugins
• Automate your tests
• Bintray is the go-to solution for publishing
• Writing libraries rocks!
Takeaways