SALSA on Android
- SALSA source zip file
- SALSA jar file
- Android theater source zip file
- SALSA demo applications zip file
- Android theater APK file
- You will be running a universal naming service and theaters (that act as actor hosts) in order to deploy SALSA applications on Android. To understand what universal naming service and theaters are, along with how SALSA actors can be deployed remotely, please read chapter 4 in this pdf.
- Before proceeding, you should be able to run a simple HelloWorld application in SALSA, on your workstation, using the steps described at this link.
- Obtain the salsa jar file either by downloading it from SALSA website, downloading it from resources provided or rebuilding it (see section V for rebuilding steps).
- Set CLASSPATH variable to the path containing the SALSA jar file.
- You can either use the provided AndroidTheater application APK to directly run the SALSA host on Android or follow steps in section VI below to generate a custom APK file. The following steps assume you have the Android APK file to deploy to your mobile.
- Connect your phone to workstation via USB and enable debugging on Android phone (Settings -> Status -> About Phone -> Tap on "Build number" 7 times). Then go to Status -> Developer options and enable "Android debugging"
- Go to folder where the android theater APK is located and run the following commands: adb -d install -r AndroidTheater_RSH.apk adb -d shell am start -n com.example.androidtheater5/.MainActivity
- Find the Android phone IP address (Settings -> About phone -> Status -> IP address). Note that the theater is configured to listen on port 4040.
- From the workstation, run the name server on the workstation by running the following command:
* java -cp "./:$CLASSPATH:." wwc.naming.WWCNamingServer -p 3030 > ./namesever_temp.txt
- From the workstation, run the SALSA application on the mobile using the following command:
** java -cp salsa_RSH_2.jar:. -Duan=uan://
:3030 -Dual=rmsp:// :4040 demo1.HelloWorld
REBUILD SALSA JAR FILE
- Extract contents of SALSA sources
- Go to the home folder
- Do any modifications or instrumentation as needed.
- Run the following: ./buildsalsa ./buildjar
REBUILD ANDROID THEATER APP
- Extract contents of Android theater sources
- Open the project in Android studio
- If needed, replace the demo1.jar file in app/libs folder with a different demo jar file generated from steps in section VII
- Rebuild the application in Android studio
- Rebuild the APK file which will be available at app/build/outputs/apk
UPDATE DEMO SALSA JAR FILE
- Extract contents of SALSA demo sources
- Go to the home folder of my_tests
- Run the following to generate a jar file for corresponding demo application: jar cf demo1.jar demo1 Check the program works by running "java -cp $CLASSPATH:demo1.jar demo1.HelloWorld"
Please contact us with any questions or clarifications, and to report bugs.