Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install sl4a-pydroid-mock-api

How to install sl4a_pydroid_mock_api

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install sl4a-pydroid-mock-api
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.4.1 Available View build log
0.2 Available View build log
Linux (64-bit)
0.4.1 Available View build log
0.2 Available View build log
 
Author
License
BSD
Lastest release
version 0.4.1 on Nov 21st, 2012

A Mock API for SL4A's Python Android API

This project provides an API to mimic the Python API provided by the Scripting Language for Android project. The SL4A Android API can only be run on an actual Android device, which can make development cumbersome. This project provides an API very similar to the one on Android, but it is designed for use on a desktop operating system such as Linux, OSX, and Windows.

The SL4A Android API is very large and allows you to interact with almost every part of the Android operating system. For each of these features I have to find a similar desktop feature and hook into it. Sometimes there is nothing similar available. Because of this, this project will likely never be able to emulate every piece of the API.

I am building this project as I come across SL4A Python API features that I need to use. At the present time, I am not attempting to simulate the entire API. If you need a feature that hasn't yet been implemented, please fork this project, code it up, and make a pull request. Your contributions will be welcomed.

Installation

From your SL4A project's virtualenv: pip install sl4a_pydroid_api

This creates an android module which you can import just like a regular SL4A project.

Further Instructions for Text To Speech (ttsSpeak)

On OSX, it uses the built-in 'say' program. No other action is necessary. If for some strange reason 'say' is missing, you can also install and use espeak.

On Linux, you can install and use espeak or flite.

On Windows, you can install and use espeak.

If no TTS program can be found, it will default to printing the message to the console.

Special thanks to

System Message: WARNING/2 (<string>, line 47)

Title underline too short.

Special thanks to
-------

News

0.4.1

*Release date: 4-Oct-2012

System Message: WARNING/2 (<string>, line 65); backlink

Inline emphasis start-string without end-string.
  • Added espeak support to ttsSpeak for OSX, Linux, and Windows
0.4

*Release date: 4-Oct-2012

System Message: WARNING/2 (<string>, line 72); backlink

Inline emphasis start-string without end-string.
  • Refactor of ttsSpeak due to no longer using PyTTSx
  • Added a Makefile for repetative tasks
0.3

*Release date: 22-Jul-2012

System Message: WARNING/2 (<string>, line 80); backlink

Inline emphasis start-string without end-string.
  • Added code supplied by clach04:
  • Made pyttsx optional with a nosound fallback (echoes to output)
  • Added docstrings for all Android methods from androidhelper project
0.2

Release date: 16-Jul-2012

  • Added support for makeToast via a Tkinter window.
  • Added a shim module for TTS on OSX since I couldn't get PyTTSx working outside of the OSX system Python.
0.1

Release date: 15-Jun-2012

  • This initial release of the project includes a working implementation of the ttsSpeak method using PyTTSx. It also includes partial implementations of the ttsIsSpeaking and recognizeSpeech functions. See the SIMULATED_FUNCTIONS.TXT file for more details.

Subscribe to package updates

Last updated Nov 21st, 2012

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.