Programming on the Android mobile platform is, generally-speaking, a Java-based affair. This talk introduces the Scripting Layer for Android(SL4A) project by Damon Kohler and the Python for Android(Py4A) project, both of which work together to provide a Python interpreter environment for the Android platform. I will talk about the history, background and architecture and design of these projects, the current status, and what to expect in the near future. There will be a demo in this talk, which is inspired by the Cellbots project. In this demo, I show how a robot based on the Arduino open source hardware platform can be manipulated using the an Android mobile phone, and the open source projects discussed during the talk.
Kivy is open source Module or platform to develop cross platform application in python. it supports python 2 and python 3 both. It is fully implemented in Cython (python library to write c code)
Given on Tuesday, June 23, 2009 at the Greater Cleveland PC Users Group C#/VB.NET SIG. A very basic intro to Python given to a .NET crowd with the assumption of little to no Python experience.
Kivy is open source Module or platform to develop cross platform application in python. it supports python 2 and python 3 both. It is fully implemented in Cython (python library to write c code)
Given on Tuesday, June 23, 2009 at the Greater Cleveland PC Users Group C#/VB.NET SIG. A very basic intro to Python given to a .NET crowd with the assumption of little to no Python experience.
Video at: http://www.develop.com/webcasts/watch/528febe6d588bf0a1c55306e/python-for-the-csharp-developer
If you love C# and .NET, you may be surprised to see how many of the features you love also exist in Python (often first). Python is a wonderful language. It is a clean high-level language which values readability over many trade-offs. You can build web applications serving billions of monthly page views. You can build cross-platform GUI applications such as DropBox. You can access amazingly powerful database servers such as MongoDB and SQL Server. But did you know many of the things you absolutely love about C# also exist in Python? Lambda expressions - check. foreach loops - check. Rich class library - check. Iterators - check. And there is more. Come learn about all the things you love from C# and see how they are accomplished in Python.
This slide is a part of Introduction to Python workshop by Code Heroku.
Here is the recorded version of our Introduction to Python workshop: https://www.youtube.com/watch?v=gj6yCl8hKVE
You can watch all our upcoming and past workshops here: http://www.codeheroku.com
Presented Thursday - June 21st, 2018
I presented a 45-minute version of my "TypeScript 101" talk that serves as a short introduction to TypeScript and the benefits it provides to large-scale projects.
Introduction to the Kotlin programming language - Andrzej Jóźwiak - JUG Łódź ...Andrzej Jóźwiak
An introductory talk prepared for the JUG Łódź 2017. The talk was about the benefits of using Kotlin for jvm and android development. I presented a long demo of capabilities of the language but also problems that might occur.
Among modern programming languages Google's Go is really exceptional. Simple, powerful, fast. But there are many other things which make programming in Go a really exciting experience. See for yourself and be prepared for The Awesomeness of Go!
Event: GDG DevFest 2016, 21.11.2016
Speaker: Igor Lankin, inovex GmbH
Mehr Tech-Vorträge: https://www.inovex.de/de/content-pool/vortraege/
Python is mainly used for server-side web development, development of software, maths, scripting, and artificial intelligence. It works on multiple platforms like Windows, Mac, Linux, Raspberry Pi etc.
Apresentação no workshop de segurança da informação na Fatec Americana.
Demonstração de tarefas relacionadas à segurança que podem ser realizadas pelo python rodando em smartphones Android.
Para consultar os scripts, visite o endereço do github no último slide.
Video at: http://www.develop.com/webcasts/watch/528febe6d588bf0a1c55306e/python-for-the-csharp-developer
If you love C# and .NET, you may be surprised to see how many of the features you love also exist in Python (often first). Python is a wonderful language. It is a clean high-level language which values readability over many trade-offs. You can build web applications serving billions of monthly page views. You can build cross-platform GUI applications such as DropBox. You can access amazingly powerful database servers such as MongoDB and SQL Server. But did you know many of the things you absolutely love about C# also exist in Python? Lambda expressions - check. foreach loops - check. Rich class library - check. Iterators - check. And there is more. Come learn about all the things you love from C# and see how they are accomplished in Python.
This slide is a part of Introduction to Python workshop by Code Heroku.
Here is the recorded version of our Introduction to Python workshop: https://www.youtube.com/watch?v=gj6yCl8hKVE
You can watch all our upcoming and past workshops here: http://www.codeheroku.com
Presented Thursday - June 21st, 2018
I presented a 45-minute version of my "TypeScript 101" talk that serves as a short introduction to TypeScript and the benefits it provides to large-scale projects.
Introduction to the Kotlin programming language - Andrzej Jóźwiak - JUG Łódź ...Andrzej Jóźwiak
An introductory talk prepared for the JUG Łódź 2017. The talk was about the benefits of using Kotlin for jvm and android development. I presented a long demo of capabilities of the language but also problems that might occur.
Among modern programming languages Google's Go is really exceptional. Simple, powerful, fast. But there are many other things which make programming in Go a really exciting experience. See for yourself and be prepared for The Awesomeness of Go!
Event: GDG DevFest 2016, 21.11.2016
Speaker: Igor Lankin, inovex GmbH
Mehr Tech-Vorträge: https://www.inovex.de/de/content-pool/vortraege/
Python is mainly used for server-side web development, development of software, maths, scripting, and artificial intelligence. It works on multiple platforms like Windows, Mac, Linux, Raspberry Pi etc.
Apresentação no workshop de segurança da informação na Fatec Americana.
Demonstração de tarefas relacionadas à segurança que podem ser realizadas pelo python rodando em smartphones Android.
Para consultar os scripts, visite o endereço do github no último slide.
Desenvolvendo aplicações Mobile em PythonRelsi Maron
Apresentação da biblioteca python de desenvolvimento multiplataforma Kivy. Usando a simplicidade, e o poder, de Python é possível criar desde simples projetos à aplicações interativas com suporte a multi-toques e games, e gerar uma aplicação nativa para o dispositivo.
The Agenda for the Webinar:
1. Introduction to Python.
2. Python and Big Data.
3. Python and Data Science.
4. Key features of Python and their usage in Business Analytics.
5. Business Analytics with Python – Real world Use Cases.
커빙의 Django, Celery, Azure Cloud, SNS 연동, 컨텐츠 수집 기술을 한눈에 볼 수 있도록 소개한 자료 입니다.
커빙을 처음 개발하면서 많은 어려움이 있었고,
또 많은 분들의 도움으로 좋은 결과를 얻을 수 있었습니다.
조금 더 깊은 내용을 다뤘으면 하는 아쉬움이 있지만,
다른 분들에게 조금이나마 도움이 되었으면 좋겠네요!
Google Developer Group(GDG) DevFest Event 2012 Android talkImam Raza
This presentation is Imam Raza's tech talk on "Android" in Google Developer Group DevFest 2012 Event. In the event Mr. Imam Raza condemned recent blasphemy act of Google of not removing blasphemy video by saying "Shame on You". He also appreciated the efforts of minorities who stand with Muslim community on this issue.
He also read following Stanza from Allama Iqbal poem "Jawaab-e-Shikwa", in which Allah is answering to complains of Muslims to Him. In below stanza Allah is praising His prophet Mohammad (peace be upon him) and telling that this universe is made due His beloved prophet Mohammad (peace be upon him). In last part of stanza Allah tells Muslims that if they want to success in this world and there after then they have to make themselves loyal to Mohammad (peace be upon him).
ہو نہ یہ پھول تو بلبل کا ترنم بھی نہ ہو
چمن دہر میں کلیوں کا تبسم بھی نہ ہو
یہ نہ ساقی ہو تو پھر مے بھی نہ ہو،خم بھی نہ ہو
بزم توحید بھی دنیا میں نہ ہو، تم بھی نہ ہو
خیمہ افلاک کا استادة اسی نام سے ہے
نبض ہستی تپش امادة اسی نام سے ہے
دشت میں، دامن کہسارمیں،میدان میں ہے
بحر میں، موج کی ا غوش میں،طوفان میں ہے
چین کے شہر، مراقش کے بیابان میں ہے
اور پوشیدة مسلمان کے ایمان میں ہے
چشم اقوام یہ نظارة ابد تک دیکھے
رفعت شان رفعنالک ذکرک دیکھے
کی محمد سے وفا تو نے تو ہم تیرے ہیں
یہ جہاں چیز ہے کیا، لوح و قلم تیرے ہیں
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.
Ionic2, les développeurs web à l'assaut du mobile, BDX I/O le 21/10/2016Loïc Knuchel
Le mobile est maintenant majoritaire et continue toujours de croître. Mais son écosystème technique est encore très spécifique et demande des compétences pointues. Venez découvrir Ionic, le framework d’UI qui permet aux développeurs web de faire des applications mobiles de qualité avec des technologies web.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
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.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
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/
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
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!
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.
9. Simple Program in Java
package com.spodon.pycon;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.Toast;
public class Demo extends Activity {
private EditText mEditText = null;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Hello!");
builder.setMessage("What is your name?");
mEditText = new EditText(this);
builder.setView(mEditText);
builder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(Demo.this, "Cancelled", Toast.LENGTH_SHORT).show();
}
});
...
9
Friday, June 10, 2011
10. Simple Program in Python
import android
droid = android.Android()
name = droid.getInput("Hello!", "What is your name?")
droid.makeToast("Hello, %s" % name.result)
• Java program: 35 SLOC
• Equivalent Python program: 4 SLOC
10
Friday, June 10, 2011
11. Android module
import android
droid = android.Android()
name = droid.getInput("Hello!", "What is your name?")
droid.makeToast("Hello, %s" % name.result)
• Exposes android functionality via an
Android() object.
• Talks to a service called SL4A (Scripting
Layer for Android).
11
Friday, June 10, 2011
12. Invoking functionality
import android
droid = android.Android()
name = droid.getInput("Hello!", "What is your name?")
droid.makeToast("Hello, %s" % name.result)
Python Interpreter Android
functionality exposed
via RPC methods
android.py
SL4A
12
Friday, June 10, 2011
13. Scripting Layer for
Android (SL4A)
Search keyword: android-scripting
13
Friday, June 10, 2011
14. Scripting Layer for
Android (SL4A)
• Started in 2009 by Damon Kohler
• 20% time project at Google.
• Supports Python, Ruby, Perl, Lua, JavaScript,
BeanShell and more.
14
Friday, June 10, 2011
15. Users of SL4A
• Rockets
• SmallSat
15 http://www.flickr.com/photos/jurvetson/
Friday, June 10, 2011
16. Users of SL4A
Cellbots - http://www.cellbots.com
16 http://www.flickr.com/photos/motorbikematt/
Friday, June 10, 2011
25. example.py
Example
import android
droid = android.Android()
droid.webViewShow("/sdcard/sl4a/scripts/html/example.html")
result = droid.eventWaitFor("EVENT_A").result[“data”]
self.droid.log("Received data from EVENT_A: " + result)
example.html
...
<script language= "javascript" type= "text/javascript">
var droid = new Android();
var date = new Date();
droid.eventPost("EVENT_A", "Page Loaded On " + date);
</script>
...
25
Friday, June 10, 2011
26. Before we move on...
• What was discussed so far
• Using the android.py module in Python
programs.
• android.py talks to SL4A, which exposes Android
functionality to clients.
• UI can be built using HTML+Javascript, and it
can talk to Python backend using SL4A events.
26
Friday, June 10, 2011
28. Control robots!
28 http://www.flickr.com/photos/motorbikematt/
Friday, June 10, 2011
29. The Design
direction
control Arduino
Bluetooth
FWD
module Cellbots
LEFT STOP RIGHT firmware
BACK
analog
motor
control
29
Friday, June 10, 2011
30. The Design
Arduino
Bluetooth
module
Arduino
Cellbots
• Cellbots project for firmware
firmware • PDE files on Cellbots site
Android
•
FWD
LEFT STOP RIGHT HTML + Javascript for frontend UI
•
BACK
Python for backend, Cellbot control
• Bluetooth module required (Py4A project)
30
Friday, June 10, 2011
31. Cellbot Controller
• Looks for Cellbot devices via Bluetooth.
• Connects to a selected device and controls
its movement.
• Invokes WebView to display UI.
• Interacts with UI using SL4A events.
Code available at https://github.com/georgegoh/cellbot-controller
31
Friday, June 10, 2011
32. Connecting to the Device
cellbot.py
1. Display scan view
Start scan.html
2. even t(scanBluetooth) User clicks “Scan”
Scan for list of
nearby devices 3. event(bluetoothDevicesFound)
and post
UI shows devices list
luetoothDevice)
Connect to selected 4. event(connectB User selects device
device
32
Friday, June 10, 2011
33. Bluetooth scanning
def scan_bluetooth(self, arg):
""" Discover nearby Bluetooth devices and trigger an SL4A
event "bluetoothDevicesFound" with the list of devices
found.
"""
self.droid.log("Scanning bluetooth devices")
self.discovered_devices =
bluetooth.discover_devices(lookup_names=True)
self.droid.log("Devices found: " +
str(self.discovered_devices))
self.droid.eventPost("bluetoothDevicesFound",
json.dumps(self.discovered_devices))
Code available at https://github.com/georgegoh/cellbot-controller
33
Friday, June 10, 2011
34. Bluetooth connection
def connect_bluetooth_device(self, bd_addr):
""" Connect to a Bluetooth device specified by the bd_addr
address and display the control view for the device.
"""
service = bluetooth.find_service(uuid=CELLBOT_UUID,
address=bd_addr)[0]
self.socket = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
self.socket.connect((service["host"], service["port"]))
self.droid.webViewShow(CONTROL_VIEW)
Code available at https://github.com/georgegoh/cellbot-controller
34
Friday, June 10, 2011
35. Controlling the Device
cellbot.py
1. Display control view
Start control.html
2. event(move) User clicks a
direction
Send direction
to connected
cellbot
35
Friday, June 10, 2011
36. Motion Control
def move(self, direction):
""" Move a connected Cellbot in one of the following directions:
f - Forward
b - Back
l - Left
r - Right
s - Stop
"""
if self.socket:
self.socket.send(direction + "n")
Code available at https://github.com/georgegoh/cellbot-controller
36
Friday, June 10, 2011
39. Python for
Android (Py4A)
• Additional python modules added:
- Bluez, Twisted, Zope, pyEphem
• Current maintainers:
- Naranjo Manuel Francisco
- Robbie Matthews
39
Friday, June 10, 2011
40. References
• Scripting Layer for Android
http://code.google.com/p/android-scripting
• Python for Android
http://code.google.com/p/python-for-android
• In Love with a Droid
http://android-scripting.blogspot.com/
• Cellbots
http://www.cellbots.com
40
Friday, June 10, 2011
41. Acknowledgements
• Damon Kohler
• Robbie Matthews
• Colleagues @ HP Labs Singapore
41
Friday, June 10, 2011
46. Event loop
while action != "EXIT":
self.droid.log("Python: Waiting for event.")
event_data = self.droid.eventWaitFor("PYTHON").result["data"]
self.droid.log("Python: Event received. Processing...")
# unpack the event data and perform action(if available).
properties = json.loads(event_data)
self.droid.log("Result: " + str(properties))
action = properties["action"]
if action in self.handlers:
self.handlers[action](properties["data"])
Code available at https://github.com/georgegoh/cellbot-controller
46
Friday, June 10, 2011
47. Packaging your app
• Download the template project archive
• http://android-scripting.googlecode.com/hg/android/
script_for_android_template.zip
• Modify the following according to your project
• Import into Eclipse
• Refactor package name from com.dummy.fooforandroid to
your package name.
• Modify or put your script into the res/raw directory.
• http://code.google.com/p/android-scripting/wiki/SharingScripts
47
Friday, June 10, 2011
48. How SL4A works
• Android functionality is abstracted into
methods.
• These methods are grouped in subsystems
called ‘Facades’.
• A JSON-RPC server exposes the methods
contained in these Facades.
48
Friday, June 10, 2011
49. SL4A Architecture
Facade 0
.
Client functionality exposed
via RPC methods
FacadeManager .
.
JsonRpcServer
Facade N
49
Friday, June 10, 2011
50. Facades
• A facade represents a
collection of functionality RPCReceiver
• @Rpc annotation <<implements>>
exposes methods XYZFacade
• @RpcParameter, <<Rpc>> + doIt()
@RpcDefault,
@RpcOptional describe
method arguments.
50
Friday, June 10, 2011
51. Facades
public void dialogCreateInput(final String title, final String message, final String text)
throws InterruptedException {
dialogDismiss();
mDialogTask = new AlertDialogTask(title, message);
((AlertDialogTask) mDialogTask).setTextInput(text);
}
Common/src/com/googlecode/android_scripting/facade/ui/UIFacade.java
public class UiFacade extends RpcReceiver {
RpcReceiver is the abstract
[...] parent of all Facade classes
@Rpc(description = "Create a text input dialog.") @Rpc annotation to indicate
public void dialogCreateInput( method is exposed via RPC
@RpcParameter(name = "title", description = "title of the input box") @RpcDefault("Value") final String title,
@RpcParameter(name = "message", description = "message to display above the input box") @RpcDefault("Please
enter value:") final String message,
@RpcParameter(name = "defaultText", description = "text to insert into the input box") @RpcOptional final
String text)
throws InterruptedException { used in
@RpcParameter
dialogDismiss(); generating user-readable Default values can be
descriptions
mDialogTask = new AlertDialogTask(title, message); specified using the
((AlertDialogTask) mDialogTask).setTextInput(text); @RpcDefault annotation
}
[...]
}
51
Friday, June 10, 2011
52. Code details
For details, see:
• AndroidProxy
• FacadeManagerFactory
• FacadeManager
• FacadeConfiguration
52
Friday, June 10, 2011
53. Facades
http://code.google.com/p/android-scripting/wiki/ApiReference
53
Friday, June 10, 2011
54. Remote Control
• Write programs using your computer keyboard and
monitor and control an Android device remotely.
• Start a SL4A server on your Android, export some
environment variables and import the “android.py”
module.
• http://bit.ly/startpy4a
54 http://xkcd.com/722/
Friday, June 10, 2011
55. SL4A Architecture
Language Interpreter Facade 0
.
functionality exposed
via RPC methods
FacadeManager .
Language .
specific
library JsonRpcServer
Facade N
55
Friday, June 10, 2011
56. What you need
• On your dev machine
• Android SDK
• Python 2.6
• On your Android
• Barcode Scanner
56
Friday, June 10, 2011
57. If you don’t have a
barcode scanner
1. Start the Android Market App.
2. Search for pub: “ZXing Team”
3. Install “Barcode Scanner”
57
Friday, June 10, 2011
58. So I’ve installed
SL4A and Py4A.
What’s next?
58
Friday, June 10, 2011
59. Install more...
• Py4A is not the Python environment.
• It is the manager for the Python
interpreter, extras, and scripts.
• Extras => libraries
• Scripts => sample python scripts to get you
started.
59
Friday, June 10, 2011
60. Install the env
• Start “Python for
Android”
• Click “Install”
60
Friday, June 10, 2011