Gist of the Day: Using Mojo, Mongo, and SL4A to send SMS Messages (2 of 2)

I am very sorry that I missed posting this yesterday, I kinda got crazy sleepy and went to bed shortly after getting home from work.
AS PROMISED, however, this next Gist is the SL4A Android component. This program gives you two buttons: “Process Queue” and “Exit the program!” With these two buttons you can either process a message from the queue (see previous post) or exit the program. Processing the queue involves sending an SMS message and then repeating the message with TTS.

The Code

Notice that in the __DATA__ segment I am storing the layout XML. I am using HTTP::Tiny to fetch the data (it comes with SL4A by default) from the server.

The Conclusion

This took forever to do because of the limited nature of running Perl on SL4A and Android. Here are some challenges I encountered:

  1. SL4A’s Perl doesn’t play nice with ` use 5.010`
  2. SL4A’s Perl causes an infinite wait when instantiating Android if you have enabled slurp mode
  3. VIM on Android using BusyBox is pretty weak and limited, so I had to use SFTP instead

I still think this was a fun task, and I hope you have fun playing with SL4A. I always have fun.

One thought on “Gist of the Day: Using Mojo, Mongo, and SL4A to send SMS Messages (2 of 2)”

  1. Thanks for the article. I tried to write something, but got a bit lost and left it. This post made me want to try again.
    — Diego

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.