AndroLua


Source link: https://github.com/mkottman/AndroLua

AndroLua

AndroLua is the Lua interpreter ported to the Android platform. Others have ported Lua to Android, but this project is special:

  • it includes LuaJava, so you can access (almost) everything the Android API provides
  • because writing code on the soft keyboard can be hard, you can connect to it using TCP an upload code from your computer

I created it because I wanted to learn how to use the Android NDK and explore the Android API without having to go through the fuss of creating a project, writing boilerplate code, compiling and uploading the APK just to test a few lines of code.

Depending on the interest, it may become something more...

Requirements

Lua and LuaJava sources are included.

Building

Assuming that $SDK points to your SDK and $NDK points to your NDK installation, run the following:

git clone git://github.com/mkottman/AndroLua.git cd AndroLua $NDK/ndk-build  

This will build the native library, consisting of Lua and LuaJava. Then import the project into Eclipse, or run the following

$SDK/tools/android update project -p . ant debug ant install 

Usage

The UI consist of the following:

  • a large "Execute" button (that's what you want to do, after all)
  • a text editor, where you can write Lua code, conveniently preloaded with the classic "Hello World!" example. A long click on the whole editor will clear it.
  • a status/output window, that shows the output of 'print' function, and is scrollable should there be many lines of output

You can also work interactively by connecting to the TCP port 3333 of the device. You can do that either directly by using WiFi, or through the USB cable. For that you need to run the following:

$SDK/platform-tools/adb forward tcp:3333 tcp:3333 

In this version, there is a simple client interp.lua that uses LuaSocket. By default it will initially read stuff from init.lua.

For example:

$ lua interp.lua loading init.lua  > = activity sk.kottman.androlua.Main@405166c0 > for i = 1,4 do print(i) end 1 2 3 4 

Resources

Sometimes, you want your users to pick a color. A simple approach is to give the user a fixed roster of a handful of colors -- easy, but limited. A fancy approach is to use some form of color wheel, but these can be difficult to use on a touchscreen and perhaps impossible without a touchscreen.

ColorMixer is a widget that provides a simple set of SeekBars to let the user mix red, green, and blue to pick an arbitrary color. It is not very big, so it is easy to fit on a form, and it is still fairly finger-friendly.

It is also packaged as a dialog (ColorMixerDialog), a dialog-themed activity (ColorMixerActivity), and a preference (ColorPreference).

This project has a handful of Android containers (ViewGroup implementations) designed to handle specific scenarios:

  • AspectLockedFrameLayout that resizes itself, and its children, to fit within a specific aspect ratio
  • MirroringFrameLayout and an associated Mirror that duplicates and scales the contents of the MirroringFrameLayout onto the Mirror

Android BounceProgressBar Widget.

Library for handling Kiosk Mode in your Android Application. It restricts device to be using only one activity without possibility to switch to other app.

Features:

  • Run activity of you choice in kiosk mode
  • Blocks every application from going into foreground with activity manager
  • Handles home button by being a Launcher App

aminc is a version code incrementer for compiled AndroidManifest.xml files

This little program is needed to easily create separate APK files for each processor architecture.

Modern OpenGL/ES examples in Java are few and far between and this collection of demos showcases what is possible with OpenGL ES 3.0 / 3.1 + AEP. The purpose is to inform developers, but also provide a testbed for cross-device testing between various mobile GPUs.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes