본문 바로가기
Android

SL4A(Scripting Layer for Android) (1)

by OKOK 2021. 6. 23.

https://www.tutorialspoint.com/sl4a/index.htm

 

SL4A Tutorial - Tutorialspoint

SL4A Tutorial The Scripting Layer for Android (SL4A) is a library that helps write scripts targeting the Android Platform. SL4A supports a number of scripting languages like Perl, Python, JRuby, PHP etc. It can also be extended to support new languages. Wh

www.tutorialspoint.com

 

The Scripting Layer for Android(SL4A) is a library tha helps wirte scripts targeting the Android Platform. SL4A supports a number of scripting lanaguages like Perl, Python, JRuby, PHP etc. 

 

Building Blocks

An application can interface with the system with four function blocks. They are as follows -

Activities - Activities represent a single screen that the suer sees or interats with visually. For example, an email app might have one activity that shows a list of new eamils, another acitivity to compose an email, and another acitivity for reading emails. 

Services - A majority of processing is done by these services for your application. It is the logic behind the user interface. For example, a service might play music in the background while the user is in a different app, or it might fetch data over the network without blocking user interaction with an activity.

Broadcast Recievers - A component that can be registered to listen for system or application events and issue notifications about the same. An instance for broadcast originating from the system is a "low battery notification" while an application level broadcast could be a "download successful" notification.

Content Providers  - A content provider manages and helps you share data between multiple applications. For e.g. a content provider may be used to share the contacts data.

 

Android scripting is a handy tool for simple tasks such as automation and prototyping as against using the Java programming language for the same. The Scripting Layer for Android provides a platform for multiple scripting solutions on the android platform.

 

What is SL4A?

a library that provides a platform to write simple scripts to automate tasks. The project saw the light of the day primarily through the efforts of Damon Kohler and it has grown thorugh the contibutions of other developers.

On the contrary, scripts are interpreted and executed on the fly. 

댓글