Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Tutorial: use ruboto in a legacy app
Use Ruby in an existing Java-based Android app. Concepts covered:
- Add Ruboto to the existing app
- Initialise JRuby in the background.
- Call your script.
- Get the results.
You should have completed the Getting started with Ruboto tutorial.
This tutorial has been tested with the following setups
|OS X 10.8.0||1.7.0_07||1.8.2||MRI 1.8.7||0.8.1||0.4.7||HTC Desire HD||android-10||donv|
Create the app, install, and run it
android create project --path legacy --package org.ruboto.example.legacy --target android-8 --activity LegacyActivity cd legacy ant debug install
Find the "Legacy" app on your device/emulator and start it. The app should start up, showing the Java activity with "Hello World, LegacyActivity".
Add Ruboto to the app
ruboto update app --force rake clean install start
The app should start up just like before, showing the Java activity with "Hello World, LegacyActivity".
Initialize Ruboto at startup
Add your script/class
Call your script
Use the results