This document summarizes Juan Gomez's presentation on using scripting languages to build Android apps without Java. It discusses the Scripting Layer for Android (SL4A) which allows scripts to access Android APIs. Examples are provided of using Python, JavaScript and Ruby for tasks like taking pictures, accessing WiFi and GPS data, and sending SMS. Advanced topics covered include using web views, background services, and packaging scripts as APK files for distribution.
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Sargis Sargsyan
In this high technology times, it is really hard to catch up with everything. Especially for the mobile world when there are thousands of mobile devices with different modification of the Android OS. Most of us who work in the mobile testing industry familiar with the Appium framework for UI automation and also aware of complicate setup and hard maintenance of it. Using Docker in Android UI automation is making our life much easier. Docker-Android is a docker image built to be used for everything related to Android mobile website or application testing. All the tools needed (devices, framework, Android SDK, etc.) are packaged in the image. It is free and open-source and supports other features such as video recording. In this session, we will talk about the advantages and disadvantages of Appium and docker-android will go throw getting started with Docker-Android and run sample tests against it.
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...Wim Selles
This presentation is about the things I did to test the Tele2 React Native app with Appium. I'll explain the journey we've taken and some best practices which you can use with React Native and Appium
Ionic adventures - Hybrid Mobile App Development rocksJuarez Filho
Ionic frameworks is the new kid on the block related to Hybrid Mobile Apps created by Drifty and rapidly growth with a variety of tools like ionic lab, ionic creator, ionic view, ionic crosswalk integration and other exciting tools is coming this year like ionic PUSH.
Check this presentation to have a short getting start in this amazing framework.
Let's create amazing apps with Ionic. \o/
Il existe de plus en plus de composants et librairies de qualité pour iOS, mais les récupérer, les configurer et les mettre à jour prend un temps fou.
Thomas Dupont (Co-organisateur des CocoaHeads Rennes) nous as présenté CocoaPods: un outils de gestion de dépendance qui va vous simplifier la vie !
Appium Dockerization: from Scratch to Advanced Implementation - HUSTEF 2019Sargis Sargsyan
In this high technology times, it is really hard to catch up with everything. Especially for the mobile world when there are thousands of mobile devices with different modification of the Android OS. Most of us who work in the mobile testing industry familiar with the Appium framework for UI automation and also aware of complicate setup and hard maintenance of it. Using Docker in Android UI automation is making our life much easier. Docker-Android is a docker image built to be used for everything related to Android mobile website or application testing. All the tools needed (devices, framework, Android SDK, etc.) are packaged in the image. It is free and open-source and supports other features such as video recording. In this session, we will talk about the advantages and disadvantages of Appium and docker-android will go throw getting started with Docker-Android and run sample tests against it.
How React Native, Appium and me made each other shine @ContinuousDeliveryAmst...Wim Selles
This presentation is about the things I did to test the Tele2 React Native app with Appium. I'll explain the journey we've taken and some best practices which you can use with React Native and Appium
Ionic adventures - Hybrid Mobile App Development rocksJuarez Filho
Ionic frameworks is the new kid on the block related to Hybrid Mobile Apps created by Drifty and rapidly growth with a variety of tools like ionic lab, ionic creator, ionic view, ionic crosswalk integration and other exciting tools is coming this year like ionic PUSH.
Check this presentation to have a short getting start in this amazing framework.
Let's create amazing apps with Ionic. \o/
Il existe de plus en plus de composants et librairies de qualité pour iOS, mais les récupérer, les configurer et les mettre à jour prend un temps fou.
Thomas Dupont (Co-organisateur des CocoaHeads Rennes) nous as présenté CocoaPods: un outils de gestion de dépendance qui va vous simplifier la vie !
To go faster in a car, you need not only a powerful engine, but also safety mechanisms like brakes, air bags, and seat belts. This is a talk about the safety mechanisms that allow you to build software faster. It's based on the book "Hello, Startup" (http://www.hello-startup.net/). You can find the video of the talk here: https://www.youtube.com/watch?v=4fKm6ImKml8
The Ionic Framework command line utility makes it easy to start, build, run, and emulate Ionic apps.
Learn how to use the power of Ionic CLI, you'll see the most important commands and resources to go deeper into all goodies provided by this amazing tool.
Ionic CLI is so fun to use, after this presentation you'll feel more comfortable using the terminal while develop hybrid apps with Ionic Framework.
Writing REST APIs with OpenAPI and Swagger AdaStephane Carrez
The presentation was held in the Ada devroom at the FOSDEM 2018.
The OpenAPI specification is an emerging specification to describe RESTful web services. The Swagger suite is a collection of tools to write such API descriptions and have the code generated in more than 29 languages, including Ada. The presentation will describe how to write a REST operation with OpenAPI, generate the Ada client with Swagger Codegen and use the generated code to interact with the server. We will also describe the generated Ada server code and how to implement the server side and run a complete REST server.
With Grails 3, the plugin development experience changes a little bit compared to that of Grails 2. In this talk, Álvaro (member of the Grails team at OCI, Grails committer and author of several plugins) will cover several topics to understand how plugins work in Grails 3, focusing on best practices.
The session is structured as a set of tips and tricks with code samples in the following areas: modularisation, build system, testing and publishing.
Deploy Angular to the Cloud (ngBucharest)Simona Cotin
Getting started with Angular is now easier than ever... said no one ever. Yet with the right tool-set we too can create magic. When I code with Angular I can deploy to Azure within minutes. We'll go through a simple development to production workflow. First, we code with a little help from the Angular CLI. Then we build for production - Webpack to the rescue. We then push our code to Github and deploy it to Node on Azure. Mission accomplished, the application is now up in the cloud!
Introduction to Continuous integration and the differences with continuous delivery and deployment. It shows the main benefits you should expect by incorporating CI practices to your project and how to do it with Drone.
Composer is a command line dependency management tool designed for PHP. Come learn how Composer can help you:
- Simplify new project creation
- Minimize duplication of code in your project repositories
- Quickly install and update plugins and themes in bulk
- Manage versioning within your project
- Follow best practices when managing code for your projects
http://wpscholar.com/loopconf2015
Creating applications with Grails, Angular JS and Spring Security - GR8Conf U...Alvaro Sanchez-Mariscal
Grails 3.1 enhances and improves the profile system introduced in Grails 3.0. One of the new profiles ease the creation and development of applications where the the front-end is an Angular JS application, and the backend is a Grails REST API.
In this session, Álvaro (member of the Grails team at OCI, Grails committer and author of several plugins) will demonstrate how to use the Angular profile to create an application using Grails 3.1, Angular JS and Spring Security REST.
The workshop is published at http://alvarosanchez.github.io/grails-angularjs-springsecurity-workshop/
To go faster in a car, you need not only a powerful engine, but also safety mechanisms like brakes, air bags, and seat belts. This is a talk about the safety mechanisms that allow you to build software faster. It's based on the book "Hello, Startup" (http://www.hello-startup.net/). You can find the video of the talk here: https://www.youtube.com/watch?v=4fKm6ImKml8
The Ionic Framework command line utility makes it easy to start, build, run, and emulate Ionic apps.
Learn how to use the power of Ionic CLI, you'll see the most important commands and resources to go deeper into all goodies provided by this amazing tool.
Ionic CLI is so fun to use, after this presentation you'll feel more comfortable using the terminal while develop hybrid apps with Ionic Framework.
Writing REST APIs with OpenAPI and Swagger AdaStephane Carrez
The presentation was held in the Ada devroom at the FOSDEM 2018.
The OpenAPI specification is an emerging specification to describe RESTful web services. The Swagger suite is a collection of tools to write such API descriptions and have the code generated in more than 29 languages, including Ada. The presentation will describe how to write a REST operation with OpenAPI, generate the Ada client with Swagger Codegen and use the generated code to interact with the server. We will also describe the generated Ada server code and how to implement the server side and run a complete REST server.
With Grails 3, the plugin development experience changes a little bit compared to that of Grails 2. In this talk, Álvaro (member of the Grails team at OCI, Grails committer and author of several plugins) will cover several topics to understand how plugins work in Grails 3, focusing on best practices.
The session is structured as a set of tips and tricks with code samples in the following areas: modularisation, build system, testing and publishing.
Deploy Angular to the Cloud (ngBucharest)Simona Cotin
Getting started with Angular is now easier than ever... said no one ever. Yet with the right tool-set we too can create magic. When I code with Angular I can deploy to Azure within minutes. We'll go through a simple development to production workflow. First, we code with a little help from the Angular CLI. Then we build for production - Webpack to the rescue. We then push our code to Github and deploy it to Node on Azure. Mission accomplished, the application is now up in the cloud!
Introduction to Continuous integration and the differences with continuous delivery and deployment. It shows the main benefits you should expect by incorporating CI practices to your project and how to do it with Drone.
Composer is a command line dependency management tool designed for PHP. Come learn how Composer can help you:
- Simplify new project creation
- Minimize duplication of code in your project repositories
- Quickly install and update plugins and themes in bulk
- Manage versioning within your project
- Follow best practices when managing code for your projects
http://wpscholar.com/loopconf2015
Creating applications with Grails, Angular JS and Spring Security - GR8Conf U...Alvaro Sanchez-Mariscal
Grails 3.1 enhances and improves the profile system introduced in Grails 3.0. One of the new profiles ease the creation and development of applications where the the front-end is an Angular JS application, and the backend is a Grails REST API.
In this session, Álvaro (member of the Grails team at OCI, Grails committer and author of several plugins) will demonstrate how to use the Angular profile to create an application using Grails 3.1, Angular JS and Spring Security REST.
The workshop is published at http://alvarosanchez.github.io/grails-angularjs-springsecurity-workshop/
PhoneGap (aka Cordova) is a cross-platform framework for developing mobile apps using standard web development tools like HTML, CSS, and JavaScript. Join Troy Miles to learn how to create mobile apps with PhoneGap by building a simple but full-featured app during this hands-on class. Troy explores PhoneGap’s important capabilities, including GPS, camera, and audio recordings. Because JavaScript has a reputation as a somewhat difficult language, Troy teaches techniques for keeping your code robust and clean. To give your app the appropriate look and feel for the device on which it is running, the class will use the open source Chocolate Chip UI framework for testing. Troy shares ways to debug the code by running it as a web app, using browser development tools, or as a phone app, using the Chrome browser’s remote debugging features. Leave with the basics you need to start building your own cross-platform mobile apps.
This Presentation will give u information about Android :
1. Working with resources- String resource,
2. Color resource,
3. Array resource Android layouts and views Handling user interaction events Grouping,
4. accessing of resources Localization of Resources Handling runtime changes of resources Designing your GUI
Android workshop to prepare for 48hacks (http://www.ntuventures.com/events/48hacks/index.html), organized by NTU Venture.
Covers basic Android application programming, and connectivity to Arduino board via Bluetooth.
Android Application Development Training by NITIN GUPTA NITIN GUPTA
Android Application Development Please SUBSCRIBE TECH POINT Channel on YouTube.
Here's Channel Link
PLEASE SUBSCRIBE Our channel TECH POINT ..
FOLLOW US ON TWITTER:https://twitter.com/Nitin_TECHPOINT
Follow us on Facebook:https://www.facebook.com/NitinGupta1054.Official.PSIT
Follow us on Instagram:https://www.instagram.com/nitingupta_official
SUBSCRIBE Our channel:https://www.youtube.com/channel/UCj3XVydYG3oPVJeZscU4NIg?sub_confirmation=1
Building Mobile Cross-Platform Apps with HTML5, jQuery Mobile & PhoneGapNick Landry
The final demo for this presentation can be downloaded at:
https://www.dropbox.com/s/9j09wip6wz84b61/JSDevConMobile-JQM-PhoneGap-Demo.zip
SESSION ABSTRACT
=================
Write Once, Run Everywhere. How many times have we been promised true cross-platform development? HTML5 seems to be the closest we’ve ever been to writing applications once and running them on multiple mobile devices, such as iOS, Android, Windows Phone or Blackberry.
But native mobile apps have taken all the spotlight in recent years thanks to the introduction of hundreds of thousands of apps in various app stores from Apple, Google, Microsoft and BlackBerry. Apps offer a great native platform experience, but they can be expensive to build and require specific languages, SDKs and skill sets across multiple platforms. Mobile web sites offer a great way to engage with consumers and corporate workers alike without requiring the installation of any app, and can in turn be adapted as deployable "hybrid" apps.
This session explores the fundamentals of native vs. web apps, and how to choose the right approach for any given scenario. We begin with an exploration of the benefits of web development for smartphones using the most popular HTML5 & JavaScript framework for mobile: jQuery Mobile (JQM). We’ll go over a quick primer on HTML5, CSS3 and JavaScript, followed by everything you need to get started with JQM. We’ll cover the most common development environment options, how to build your first jQuery Mobile page, and how to debug your mobile web code with some of the available tools. We’ll also discuss how to develop a native-like experience on each mobile platform thanks to JQM’s adaptive rendering, and how to save and retrieve data with the cloud using Microsoft Azure Mobile Services.
We'll then learn how to leverage PhoneGap to wrap our mobile web UI into a native smartphone or tablet app. Discover how PhoneGap exposes native device hardware like cameras, sensors, GPS and more. We’ll also discuss the pros and cons of PhoneGap-based apps, how to deal with the UI design guidelines across platforms, and learn some do’s and don’ts of cross-platform mobile development.
Native mobile apps have their place for mass market revenue-generating models, but you also need to master cross-platform techniques when the situation calls for it such as in enterprise mobility scenarios and other niche areas. Web development is a critical skill required by every mobile developer; come learn how to get started and reach hundreds of millions of users through a smart mobile web & hybrid approach.
The Cordova framework
Recurrent app architecture
Cordova CLI
Debugging Cordova applications
My development environment
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2016.
http://www.ivanomalavolta.com
App Indexing: Blurring the Lines Between Your Website and AppJuan Gomez
You worked really hard to create a great Android app that provides a better experience for users accessing your content from their mobile devices. And yet most of your users still find themselves on your website being sent there by a Google search or a link they clicked on in an e-mail or another app (like the browser).
Don’t you wish there was a way to send those users back to your app instead?
Well, there is a way to do this, and it’s called App indexing. App Indexing allows you to connect pages from your website with specific content within your Android app. This enables users who have your app installed to open it directly from relevant mobile search results on Google.
REST is not enough: Using Push Notifications to better support your mobile cl...Juan Gomez
This talk will introduce you to Push Notifications, a very powerful way for your Python service to communicate information to mobile devices. You will learn how Push Notifications work, their advantages and disadvantages and how you can implement them on your Python projects.
This session will teach you the details about Android Fragmentation and the different ways in which it impacts your app, your audience and your development processes. You will learn about the different types of fragmentation present on the Android ecosystem and how each type affects different categories of apps in specific ways. We will also explore some of the tools used by most Android developers to effectively beat fragmentation and learn some best practices and strategies to leverage these tools in creating highly successful Android apps.
This class intends to guide you by providing an overview of some of the most popular messaging options on the Android Ecosystem, as well as some tips and tricks on how to successfully implement them in your Android apps. We’ll talk about Basic Http messaging, Google’s Cloud Messaging (a.k.a. Push Notifications) and SMS (a.k.a. Text messages), and finally we’ll touch on some newer techniques like Android’s Network Service Discovery (a.k.a. Bonjour) and WebSockets.
Teach your kids how to program with Python and the Raspberry PiJuan Gomez
RaspberryPis are the new frontier in enabling kids (and curious adults) to get access to an affordable and easy-to-program platform to build cool things. Over a million of these nifty little devices have been sold in less than a year and part of their popularity has been due to how easy it is to start programming on them.
In this session you'll learn how to get started with the Raspberry PI, initial set-up, configuration and some tips and tricks. Then we'll have a brief introduction to basic Python and we'll write a few simple programs that run on the RaspberryPI. The last section of the session will be dedicated to PyGame, we'll learn about surfaces, events, inputs, sprites, etc and demonstrate how to build very simple games that are as much fun for kids to write, than to play!
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Android Scripting
1. ANDROID SCRIPTING
A Java-less approach to building apps
Juan Gomez
Android Dev @ Handmark, Inc
Co-founder PythonKC
2. AGENDA
• Android 101
• Scripting Layer for Android (SL4A)
• Basic tasks (WiFi, GPS, camera, SMS) and basic UI
• Using WebViews and Javascript for better UIs
• Advanced Scripts (Twisted, PyBluez)
• Packaging your scripts on an APK
• Q&A
3. ANDROID 101
An Android application is actually a collection of several
components, each defined in a file called AndroidManifest.xml
The 4 main types of components are:
• Activities
• Services
• Content Providers
• Broadcast Receivers
Apps are packaged on an APK file (myApp.apk)
4. INTENTS
• Apps can communicate with each other by providing and consuming each
other’s Intents
• Intents “link” activities, services, and
receivers together
• Intents consists of
• An action (i.e. ACTION_VIEW)
• Categories (i.e. CATEGORY_DEFAULT)
• A URI (i.e. content://contacts/people/123)
• “Extras” metadata
• Intents can also be sent to hard-coded class names (com.foo.FooActivity)
5. HOW DO I GET STARTED?
• Download the Android SDK: http://developer.android.com/sdk
• Add Android platforms and other packages to your SDK
• Install the ADT plug-in for Eclipse (optional)
• Enable app side-loading on your phone:
• Settings > Application > Unknown Sources
6. WHERE CAN I LEARN MORE?
• Android’s Dev Guide
http://developer.android.com/guide
• Lots of Android Books
• StackOverflow
• Recommended resource:
• http://commonsware.com/
• The Busy Coder’s Guide to Android
Development
• Yearly subscription
7. SCRIPTING LAYER FOR
ANDROID (SL4A)
• Brings scripting languages to Android
• Allows you to edit and execute scripts and interactive
interpreters directly on the Android device.
• Scripts
have access to many of the APIs available to full-
fledged Android apps.
• Supported languages include: Python, Perl, JRuby, Lua, BeanShell,
JavaScript and Tcl
• There’s limited support for PHP and Shell scripts
8. SL4A ARCHITECTURE
• As it name implies, SL4A sits
between the actual Android JVM
(Dalvik) and the executable
Scripts.
• The Facade API exposes a subset
of Android system API's via JSON
RPC calls
• Only the parts of Android's APIs
which has been wrapped by
facades are available to
interpreter
• This is a fundamental feature of
SL4A added by Google to avoid
security concerns.
9. WHAT CAN SL4A DO?
• Handle intents
• Start activities
• Make phone calls
• Send text messages
• Scan bar codes
• Poll location and sensor data
• Use text-to-speech
11. HOW TO USE
IT?
SL4A installs as an App on
your phone, you need to
install separate interpreters
for each language you want to
use
12. INTERPRETERS
Open up the App, click on
Menu > View > Interpreters to
get a list of the available
interpreters
13. DOWNLOAD
Click on Menu > Add to get a
list of new interpreters you
can install on your phone
14. INSTALL
Click on an Interpreter from
the list and this will download
an .APK with the installer.
15. SCRIPTS
When you open the SL4A
app you get a list of your
available scripts. You can use a
quick action menu to run,
edit, save or delete
16. EDIT/RUN
SL4A offers an environment
to edit and run scripts on the
phone but really limited
17. USING ADB PUSH/PULL
• It’s
easier to edit scripts on your computer using your favorite
text editor and leverage the Android Debug Bridge (ADB) to
load them on the phone.
• ADB is installed on /<android_sdk_folder>/platform-tool/
• adb pull /mnt/sdcard/sl4a/scripts/Camera.js ~/Documents/
sl4a_scripts/
• adb push ~/Documents/sl4a_scripts/Camera.js /mnt/sdcard/sl4a/
scripts
20. TAKING A PICTURE (JS)
load("/sdcard/
com.googlecode.rhinoforandroid/extras/rhino/
android.js");
var droid = new Android();
result = droid.cameraCapturePicture("/mnt/
sdcard/sl4a/pic.jpg", true);
26. SIMPLE TWITTER CLIENT
(RUBY)
require 'android'
require 'net/http'
droid = Android.new
url = URI.parse("http://twitter.com/statuses/update.xml")
req = Net::HTTP::Post.new(url.path)
req.basic_auth('user', 'password')
status = droid.getInput 'Twitter Update', "What's going on?"
req.set_form_data({'status' => status["result"],
'source' => 'Android'})
response = Net::HTTP.new(url.host, url.port).start do |http|
http.request(req)
end
if response.code == "200"
droid.makeToast "Your toot was successfully sent."
end
27. WEBVIEWS AS ADVANCED UI
<html>
<head>
<title>Text to Speech</title>
<script>
var droid = new Android();
var speak = function() {
droid.eventPost("say",
document.getElementById("say").value);
}
</script>
</head>
<body>
<form onsubmit="speak(); return false;">
<label for="say">What would you like to say?</
label>
<input type="text" id="say" />
<input type="submit" value="Speak" />
</form>
</body>
</html>
28. BACKGROUND SERVICE
You can create a background service that acts as a controller in
you favorite language to support your Web UI
import android
droid = android.Android()
droid.webViewShow('file:///sdcard/sl4a/scripts/
text_to_speech.html')
while True:
result = droid.eventWaitFor('say').result
if result is not None:
droid.ttsSpeak(result['data'])
29. ADVANCED SCRIPTS
• Python is by far the most
complete language on SL4A
• You can import more advanced
libraries that are not part of the
Python Standard Library.
• Like PyBluez for Bluetooth
• Or Twisted
• Twisted is an extremely powerful event-
driven networking engine written in
Python.
• Projects like BitTorrent and Launchpad
use twisted as their networking engine.
30. PACKAGING YOU APP FOR
THE GOOGLE PLAY STORE
• For this step you will need Eclipse :(
• Download the skeleton Android project from here:
http://android-scripting.googlecode.com/hg/android/
script_for_android_template.zip
• Follow these instructions to configure the project:
http://code.google.com/p/android-scripting/wiki/SharingScripts
• Make sure you can generate an APK and do a test install.
• Follow these instructions to sign your APK:
http://developer.android.com/guide/publishing/app-signing.html
• Viola! you can upload your APK to the Play Store
33. BEGINNERS PYTHON
WORKSHOP
• The Beginners Python Workshop is a 2-day free event focused on
teaching the basics of programming in the Python language.
• Everybody is encouraged to attend, regardless of your previous
experience with programming
• The only requirements to attend are a laptop and a willingness to learn.
• When:
Friday, June 22nd 6pm - 10pm
Saturday, June 23rd 10am - 4pm
• Where:
UMKC Campus 302 Flarsheim Hall
5110 Rockhill Road, Kansas City, MO
RSVP at: http://www.meetup.com/pythonkc/events/62339552