diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..51f1a321 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,4 @@ +# These are supported funding model platforms + +patreon: riverfor +custom: ["https://paypal.me/qpyriver"] diff --git a/.gitignore b/.gitignore index f3579da9..1c454d72 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,29 @@ *.iml .gradle build +__MACOSX .idea -gradle +keystore .DS_Store -*.pyc +local.properties +*.apk +qbaselib.iml +.* +!/.gitignore +gradle-wrapper.properties +Android.mk +qpython/src/main/jni/python/libpython2.7.b +qpysdk/src/main/obj +values-fr +values-tr +build.gradle.new +captures +old.git +qpython/qpython.key +qpython/cn/release/output.json +qpython/od/release/* +qpython/cn +qpython/google +qpython/os +qpython/ol +qpython/op diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..441d4c0b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule "qbaselib"] + path = qbaselib + url = git@github.com:qpython-android/qbaselib.git +[submodule "qftplib"] + path = qftplib + url = git@github.com:qpython-android/qftplib.git +[submodule "qpysdk/src/main/jni"] + path = qpysdk/src/main/jni + url = git@github.com:qpython-android/pygamesdl2-jni.git +[submodule "qpysl4a"] + path = qpysl4a + url = git@github.com:qpython-android/qpysl4a.git diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 33396733..00000000 --- a/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright [2017] [YAN HECUN ] - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/README.md b/README.md index 29bef179..9912213e 100644 --- a/README.md +++ b/README.md @@ -1,58 +1,79 @@ -# QPython Project -

+# About -Welcome to read the QPython guide! -QPython is a script engine that runs Python on android devices. It lets your android device run Python scripts and projects. It contains the Python interpreter, console, editor, and the SL4A Library for Android. It’s Python on Android! +

+Welcome to the QPython project! -QPython has several millions users in the world already, it's a great project for programming users, welcome to join us for contributing to this project NOW. +QPython is the Python engine for android. It contains some amazing features such as Python interpreter, runtime environment, editor and QPYI and integrated SL4A. It makes it easy for you to use Python on Android. And it's FREE. +Compared with other Python apps, QPython mainly solves how to use Python to drive your Android device work. Good SL4A support is our main goal, such as android's camera, sensor, sms media APIs etc. -What's NEW ------------------------- -QPython project include the QPython https://play.google.com/store/apps/details?id=org.qpython.qpy and QPython3 https://play.google.com/store/apps/details?id=org.qpython.qpy3 applications. +QPython already has millions of users worldwide and it is also an open source project. -QPython application is using the **Python 2.7.2** , and QPython application is using the **Python 3.2.2** . +For different usage scenarios, QPython has two branches, namely QPython Ox and 3x. +QPython Ox is mainly aimed at programming learners, and it provides more friendly features for beginners. +QPython 3x is mainly for experienced Python users, and it provides some advanced technical features. -QPython's newest version is 1.3.0 (Released on 2017/3/20) , QPython3's newest version is 1.0.2 (Released on 2017/3/29), New versions include many amazing features, please upgrade to the newest version as soon from google play, amazon appstore etc. +## Quick start +This repository is the QPython Ox project repository, you can follow the below steps to run it. -Thanks these guys who are contributing ----------------------------------------- -They are pushing on the QPython project moving forward. +- Macos + Android studio, (Ubuntu may work too) +- git clone git@github.com:qpython-android/qpython.git +- git submodule init +- git submodule sync +- git submodule update +- build it... -River, Mae, Zoom.Quiet, MathiasLuo, liyuanrui, Kyle kersey ... +Get more information from [wiki](https://github.com/qpython-android/qpython/wiki) for developing QPython +## Related -Do you want to join the great QPython team ? You could Ask qustions on twitter https://twitter.com/qpython or email us mailto:support@qpython.org. -And you could fork us on github https://github.com/qpython-android/qpython and send pull request. +- [QPython 3x features](https://github.com/qpython-android/qpython.org/blob/master/qpython-docs/source/en/qpython_3x_featues.rst), [QPython Ox features](https://github.com/qpython-android/qpython.org/blob/master/qpython-docs/source/en/qpython_ox_featues.rst) +- [QPySL4A APIs](https://github.com/qpython-android/qpysl4a/blob/master/doc/en/APIs.rst) and [test scripts](https://github.com/qpython-android/qpysl4a/issues/1) +- QPYPI Packages +## How to ask QPython related questions +In order to benefit those guys who have the same issue with QPython, we suggest that you should ask the issue which is related with QPython within public techical communities. -QPython Communities ----------------------- -**There are many active QPython communities where you could meet the QPython users like you** -* Join Facebook community https://www.facebook.com/groups/qpython -* Join Google group https://groups.google.com/forum/#!forum/qpython -* Join Gitter chat https://gitter.com/qpython-android/qpython -* Join G+ community https://plus.google.com/communities/111759148772865961493 -* QPython on Stackoverflow http://stackoverflow.com/questions/tagged/qpython +### English QPythonista Community -**And you could talk to us through social network** +- [Ask in stackoverflow](https://stackoverflow.com/questions/tagged/qpython) +- [Discuss QPython Programming in QPython Group](https://www.facebook.com/groups/qpython/) -* Like us on facebook https://www.facebook.com/QPython -* Follow us on twitter https://twitter.com/qpython +### Chinese QPythonista Community -* Report issue https://github.com/qpython-android/qpython/issues -* Email us mailto:support@qpython.org +- [在segmentfault提问 - Chinese](https://segmentfault.com/t/qpython) +- [在贴吧讨论 - Chinese](https://tieba.baidu.com/f?ie=utf-8&kw=qpython) +### Report issues -Support -------------- -We are happy to hear feedback from you, but sometimes some bugs or features demand may not be implemented soon for we lack resources. +Please tell us your phone's informatioin, android os information, QPython branch, and your code, where did you install it and the detailed stituation you have encountered. -So if you have any issue need the core developer team to solve with higher priority, you could try the https://www.bountysource.com . +- [Report an app's issue](https://github.com/qpython-android/qpython/issues) +- [Report an non-app's issue](https://github.com/qpython-android/qpython.org/issues) +- [Request to support a package](https://github.com/qpython-android/qpypi/issues) -**It's the official QPython Users & Contributors' Guide, please follow http://www.qpython.org for more information.** +## Donation + +- harford (Wechat) +- 晨晖 (Wechat) + +THANK YOU VERY MUCH FOR DONATION! + + +## How to contribute +WE NEED YOUR HELP AND CONTRIBUTE, WE WILL BE VERY GRATEFUL IF YOU CAN TELL US YOUR IDEA OR SUGGESTION. + +IF YOU WANT TO PARTICIPATE THIS PROJECT, PLEASE SEND YOUR EMAIL TO US, WE WILL INVITE YOU INTO QPYTHON SLACK GROUP WHERE WE WILL DISCUSS HOW TO PUSH ON QPYTHON. + +- Email: support@qpython.org +- Twitter: @qpython +- Facebook: https://www.facebook.com/qpython + +Or you can join [qpython slack](https://join.slack.com/t/qpython/shared_invite/enQtOTI1MDY1NzM4NjU2LTljZDI3MjI0ZmZmNzIwNzAwMTU2ZDIyNGRjMTJiOTQ4MzgzY2Y3NDU5YzJjNTQ5MmM4Nzk2MGI4YWZmY2VhOTU) + +THANK YOU. diff --git a/build.gradle b/build.gradle index d769076f..d576ffd4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,31 +1,52 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. +def supportVersion = "28.0.0" // equals to line60 +def retrofitVersion = "2.1.0" +def rxVersion = "1.2.1" -//task wrapper(type: Wrapper) { -// ersion = '2.2.1' -// gradleV -// distributionUrl = 'https://services.gradle.org/distributions/gradle-2.2.1-all.zip' -//} +def okhttpVersion = '3.10.0' + +def butterknifeVersion = '9.0.0' //eqals to line 26 buildscript { repositories { jcenter() + google() mavenCentral() + + maven { url "https://plugins.gradle.org/m2/" } + maven { url "https://maven.google.com" } } + dependencies { - classpath 'com.android.tools.build:gradle:2.3.0' - classpath 'me.tatarka:gradle-retrolambda:3.2.5' - classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0' - classpath "io.realm:realm-gradle-plugin:1.1.1" - classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1' - classpath "io.realm:realm-gradle-plugin:3.0.0" + classpath 'com.android.tools.build:gradle:3.5.3' + + // A gradle plugin for getting java lambda support in java 6, 7 and android + // https://github.com/evant/gradle-retrolambda + classpath 'me.tatarka:gradle-retrolambda:3.7.0' + + // Gradle plugin which downloads and manages your Android SDK. + //classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0' + + // Field and method binding for Android views which uses annotation processing to generate boilerplate code for you. + // https://github.com/JakeWharton/butterknife + classpath "com.jakewharton:butterknife-gradle-plugin:9.0.0-rc2" + + // Realm is a mobile database: a replacement for SQLite & ORMs + // https://github.com/realm/realm-java + classpath "io.realm:realm-gradle-plugin:3.5.0" + + classpath 'com.google.gms:google-services:4.0.2' } } allprojects { repositories { jcenter() + google() + + mavenCentral() maven { url "https://jitpack.io" } maven { url 'https://dl.bintray.com/azeesoft/maven' } + //maven { url "http://mvn.leancloud.cn/nexus/content/repositories/public" } } } @@ -33,12 +54,65 @@ task clean(type: Delete) { delete rootProject.buildDir } - subprojects { def androidHome - if ((androidHome = System.env.'ANDROID_HOME') && (androidHome = androidHome as File).exists() - && androidHome.canWrite()) - apply plugin: 'android-sdk-manager' + && androidHome.canWrite()) { + //apply plugin: 'android-sdk-manager' + } + + project.configurations.all { + resolutionStrategy.eachDependency { details -> + if (details.requested.group == 'com.android.support' + && !details.requested.name.contains('multidex')) { + details.useVersion "${supportVersion}" + } + } + + } } + +ext { + libOkHttp3 = "com.squareup.okhttp3:okhttp:${okhttpVersion}" + + libRxJava = "io.reactivex:rxandroid:${rxVersion}" + libRxAndroid = "io.reactivex:rxjava:${rxVersion}" + libFileDownloaderLib = 'com.liulishuo.filedownloader:library:0.3.5' + + libSupportV4 = "com.android.support:support-v4:${supportVersion}" + libSupportV4Design = 'com.android.support:design:${supportVersion}' + + libSupportV7 = "com.android.support:appcompat-v7:${supportVersion}" + libSupportCardView = "com.android.support:cardview-v7:${supportVersion}" + + libSupportPreference = "com.android.support:preference-v14:${supportVersion}" + libSupportAnnotation = "com.android.support:support-annotations:${supportVersion}" + libSupportDesign = "com.android.support:design:${supportVersion}" + libOkHttp3Log = "com.squareup.okhttp3:logging-interceptor:${okhttpVersion}" + + minSdkVersion = 14 + targetSdkVersion = 28 + compileSdkVersion = 28 + buildToolsVersion = '28.0.3' + + // firebase related https://firebase.google.com/docs/android/setup + firebaseCore = "com.google.firebase:firebase-core:16.0.6" + firebaseMsg = "com.google.firebase:firebase-messaging:17.3.4" + firebaseAuth = "com.google.firebase:firebase-auth:16.1.0" + firebaseDatabase = "com.google.firebase:firebase-database:16.0.5" + + // https://developers.google.com/android/guides/setup + googlePlayServiceAuth = "com.google.android.gms:play-services-auth:16.0.1" + + leakcanaryDebug = 'com.squareup.leakcanary:leakcanary-android:1.5.4' + leakcanaryRelease = 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4' + libGoogleGuava = 'com.google.guava:guava:18.0' + + retrofit = "com.squareup.retrofit2:retrofit:${retrofitVersion}" + retrofitCoverterGson = "com.squareup.retrofit2:converter-gson:${retrofitVersion}" + retrofitAdapterRxjava = "com.squareup.retrofit2:adapter-rxjava:${retrofitVersion}" + + libButterknife = "com.jakewharton:butterknife:${butterknifeVersion}" + libButterknifeCompiler ="com.jakewharton:butterknife-compiler:${butterknifeVersion}" +} \ No newline at end of file diff --git a/debug.keystore b/debug.keystore new file mode 100644 index 00000000..70dc936c Binary files /dev/null and b/debug.keystore differ diff --git a/docs/.buildinfo b/docs/.buildinfo deleted file mode 100644 index 321641b7..00000000 --- a/docs/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 97ef36c71aa1e7a41333da597faab618 -tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index 4632497e..00000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -www.qpython.org diff --git a/docs/QPython_3x_featues.md b/docs/QPython_3x_featues.md new file mode 100644 index 00000000..491234b5 --- /dev/null +++ b/docs/QPython_3x_featues.md @@ -0,0 +1,36 @@ +# QPython 3x featues + +Because google play and some appstores have strict requirements on the permissions of the app, we use different strategies in different appstores, which is why the branch name will be different. For example, L means Limited, and S means it contains Sensitive permissions. + +## Python +- Python3.6.6 +- QRCode Reader +- Editor +- QPYPI +- Ftp + +## Android Permissions + +### Both QPython 3S and 3L + +- android.permission.INTERNET +- android.permission.ACCESS_SUPERUSER +- android.permission.WAKE_LOCK +- android.permission.ACCESS_NETWORK_STATE +- android.permission.ACCESS_WIFI_STATE +- android.permission.RECEIVE_BOOT_COMPLETED +- android.permission.CAMERA +- android.permission.FLASHLIGHT +- android.permission.VIBRATE +- android.permission.RECEIVE_USER_PRESENT +- com.android.vending.BILLING +- com.android.browser.permission.READ_HISTORY_BOOKMARKS +- com.android.browser.permission.WRITE_HISTORY_BOOKMARKS +- com.android.launcher.permission.INSTALL_SHORTCUT +- com.android.launcher.permission.UNINSTALL_SHORTCUT +- android.permission.READ_EXTERNAL_STORAGE +- android.permission.WRITE_EXTERNAL_STORAGE +- android.permission.ACCESS_COARSE_LOCATION +- android.permission.ACCESS_FINE_LOCATION + +### QPython 3S diff --git a/docs/QPython_Ox_featues.md b/docs/QPython_Ox_featues.md new file mode 100644 index 00000000..fdfb8c09 --- /dev/null +++ b/docs/QPython_Ox_featues.md @@ -0,0 +1,40 @@ +# QPython Ox featues + +Because google play and some appstores have strict requirements on the permissions of the app, we use different strategies in different appstores, which is why the branch name will be different. For example, L means Limited, and S means it contains Sensitive permissions. + +## Python +- Python3 + Python2 basis +- QRCode Reader +- Editor +- QPYPI +- Ftp +- Course + +## Permissions +### Both QPython OL and OS +- android.permission.INTERNET +- android.permission.ACCESS_SUPERUSER +- android.permission.WAKE_LOCK +- android.permission.ACCESS_NETWORK_STATE +- android.permission.ACCESS_WIFI_STATE +- android.permission.RECEIVE_BOOT_COMPLETED +- android.permission.CAMERA +- android.permission.FLASHLIGHT +- android.permission.VIBRATE +- android.permission.RECEIVE_USER_PRESENT +- com.android.vending.BILLING +- com.android.browser.permission.READ_HISTORY_BOOKMARKS +- com.android.browser.permission.WRITE_HISTORY_BOOKMARKS +- com.android.launcher.permission.INSTALL_SHORTCUT +- com.android.launcher.permission.UNINSTALL_SHORTCUT +- android.permission.READ_EXTERNAL_STORAGE +- android.permission.WRITE_EXTERNAL_STORAGE +- android.permission.ACCESS_COARSE_LOCATION +- android.permission.ACCESS_FINE_LOCATION + +### QPython OS +- android.permission.FOREGROUND_SERVICE +- android.permission.BLUETOOTH +- android.permission.BLUETOOTH_ADMIN +- android.permission.NFC +- android.permission.RECORD_AUDIO diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..42a966ab --- /dev/null +++ b/docs/README.md @@ -0,0 +1,2 @@ +# About +QPython documentation diff --git a/docs/_sources/document.rst.txt b/docs/_sources/document.rst.txt deleted file mode 100644 index 7ef4e7ee..00000000 --- a/docs/_sources/document.rst.txt +++ /dev/null @@ -1,111 +0,0 @@ -.. QPython documentation master file, created by - sphinx-quickstart on Fri Apr 7 15:07:35 2017. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -.. image:: _static/bestpython.png - - -Welcome to read the QPython guide! -============================================= - -QPython is a script engine that runs Python on android devices. It lets your android device run Python scripts and projects. It contains the Python interpreter, console, editor, and the SL4A Library for Android. It’s Python on Android! - - -QPython has several millions users in the world already, it's a great project for programming users, welcome to join us for contributing to this project NOW. - - -What's NEW ------------------------- -QPython project include the `QPython `_ and `QPython3 `_ applications. - -QPython application is using the **Python 2.7.2** , and QPython application is using the **Python 3.2.2** . - - -QPython's newest version is 1.3.2 (Released on 2017/5/12) , QPython3's newest version is 1.0.2 (Released on 2017/3/29), New versions include many amazing features, please upgrade to the newest version as soon from google play, amazon appstore etc. - - -Thanks these guys who are contributing ----------------------------------------- -They are pushing on the QPython project moving forward. - -.. image:: https://avatars0.githubusercontent.com/u/3059527?v=3&s=60 - :target: https://github.com/riverfor - :alt: River is the project's organizer and the current online QPython's author. - -.. image:: https://avatars0.githubusercontent.com/u/10812534?v=3&s=60 - :target: https://github.com/pollyfat - :alt: Mae is a beautiful and talented girl developer who is good at python & android programming. - -.. image:: https://avatars0.githubusercontent.com/u/22494?v=3&s=60 - :target: https://github.com/ZoomQuiet - :alt: Zoom.Quiet is a knowledgeable guy who is famous in many opensource communities. - -.. image:: https://avatars3.githubusercontent.com/u/10219741?v=3&s=60 - :target: https://github.com/mathiasluo - :alt: MathiasLuo is a android geek developer - -.. image:: https://avatars2.githubusercontent.com/u/25975283?v=3&s=60 - :target: https://github.com/liyuanrui - :alt: liyuanrui is a Chinese geek - -.. image:: https://avatars3.githubusercontent.com/u/5159173?v=3&s=60 - :target: https://github.com/kylelk - :alt: Kyle kersey is a US geek - - -Do you want to join the great QPython team ? You could `Ask qustions on twitter `_ or `email us `_. -And you could `fork us on github `_ and send pull request. - - -QPython Communities ----------------------- -**There are many active QPython communities where you could meet the QPython users like you** - -* `Join Facebook community `_ -* `Join Google group `_ -* `Join Gitter chat `_ -* `Join G+ community(For QPython testers) `_ -* `QPython on Stackoverflow `_ - -**And you could talk to us through social network** - -* `Like us on facebook `_ -* `Follow us on twitter `_ - -* `Report issue `_ -* `Email us `_ - - -**It's the official QPython Users & Contributors' Guide, please follow these steps for using and contributing.** - -Support -------------- -We are happy to hear feedback from you, but sometimes some bugs or features demand may not be implemented soon for we lack resources. - -So if you have any issue need the core developer team to solve with higher priority, you could try the `bountysource service `_. - - - -Now, let's GO ---------------- -.. toctree:: - :maxdepth: 2 - - en/guide - -Others ---------------- -.. toctree:: - :maxdepth: 2 - - en/faq - - -For Chinese users -------------------- -.. toctree:: - :maxdepth: 2 - - zhindex - diff --git a/docs/_sources/en/faq.rst.txt b/docs/_sources/en/faq.rst.txt deleted file mode 100644 index a891d3dd..00000000 --- a/docs/_sources/en/faq.rst.txt +++ /dev/null @@ -1,26 +0,0 @@ -FAQ -==== - - -**How to run qpython script from other terminals ?** - -- You could "share to" qpython from 3rd apps. - -- You need to root the android device first, then soure the env vars (Just like the qpython wiki link you mentioned) and execute the /data/data/org.qpython.qpy/bin/python or /data/data/org.qpython.qpy/bin/python-android5 (for android 5 above) - - -`Case sample `_ - - - -**Support pygame ?** - -Even you could import pygame in QPython, but QPython doesn't support pygame now. - -We will consider to support it later, please follow us on facebook to get it's progress. - - -`Case sample `_ - - - diff --git a/docs/_sources/en/guide.rst.txt b/docs/_sources/en/guide.rst.txt deleted file mode 100644 index e13917ea..00000000 --- a/docs/_sources/en/guide.rst.txt +++ /dev/null @@ -1,47 +0,0 @@ -Getting started -========================== -How to start quickly ? Just follow the following steps: - -.. toctree:: - :maxdepth: 2 - - guide_howtostart - guide_helloworld - - -Programming Guide -======================== - -If you you want to know more about how to program through qpython, just follow these steps: - - -.. toctree:: - :maxdepth: 2 - - guide_program - guide_ide - guide_libraries - guide_extend - - -**QPython project is not only a powerful Python engine for android, but is a active technology community also.** - -Developers' Guide -======================= -QPython developers' goal is pushing out a great Python for android. - -.. toctree:: - :maxdepth: 2 - - guide_developers - - -Contributors' Guide -======================== - -Welcome to join QPython contributors team, you are not just a user, but a creator of QPython. - -.. toctree:: - :maxdepth: 2 - - guide_contributors diff --git a/docs/_sources/en/guide_androidhelpers.rst.txt b/docs/_sources/en/guide_androidhelpers.rst.txt deleted file mode 100644 index 1dd97265..00000000 --- a/docs/_sources/en/guide_androidhelpers.rst.txt +++ /dev/null @@ -1,2035 +0,0 @@ -The Scripting Layer for Android (abridged as SL4A, and previously named Android Scripting Environment or ASE) is a library that allows the creation and running of scripts written in various scripting languages directly on Android devices. QPython start to extend the SL4A project and integrate it. - - -.. image:: ../_static/sl4a.jpg - -There are many SL4A APIs, if you found any issue, please `report an issue `_. - -AndroidFacade -=============== - -Clipboard APIs ----------------- -.. py:function:: setClipboard(text) - - Put text in the clipboard - - :param str text: text - -.. py:function:: getClipboard(text) - - Read text from the clipboard - - :return: The text in the clipboard - - -:: - - sample code to show setClipboard/getClipboard - - -Intent & startActivity APIs ----------------------------------- -.. py:function:: makeIntent(action, uri, type, extras, categories, packagename, classname, flags) - - Starts an activity and returns the result - - :param str action: action - :param str uri(Optional): uri - :param str type(Optional): MIME type/subtype of the URI - :param object extras(Optional): a Map of extras to add to the Intent - :param list categories(Optional): a List of categories to add to the Intent - :param str packagename(Optional): name of package. If used, requires classname to be useful - :param str classname(Optional): name of class. If used, requires packagename to be useful - :param int flags(Optional): Intent flags - - :return: An object representing an Intent - - -:: - - sample code to show makeIntent - - -.. py:function:: getIntent() - - Returns the intent that launched the script - -:: - - sample code to show getIntent - - -.. py:function:: startActivityForResult(action, uri, type, extras, packagename, classname) - - Starts an activity and returns the result - - :param str action: action - :param str uri(Optional): uri - :param str type(Optional): MIME type/subtype of the URI - :param object extras(Optional): a Map of extras to add to the Intent - :param str packagename(Optional): name of package. If used, requires classname to be useful - :param str classname(Optional): name of class. If used, requires packagename to be useful - - :return: A Map representation of the result Intent - - -:: - - sample code to show startActivityForResult - - -.. py:function:: startActivityForResultIntent(intent) - - Starts an activity and returns the result - - :param Intent intent: Intent in the format as returned from makeIntent - - :return: A Map representation of the result Intent - - -:: - - sample code to show startActivityForResultIntent - -.. py:function:: startActivityIntent(intent, wait) - - Starts an activity - - :param Intent intent: Intent in the format as returned from makeIntent - :param bool wait(Optional): block until the user exits the started activity - -:: - - sample code to show startActivityIntent - - -.. py:function:: startActivity(action, uri, type, extras, wait, packagename, classname) - - Starts an activity - - :param str action: action - :param str uri(Optional): uri - :param str type(Optional): MIME type/subtype of the URI - :param object extras(Optional): a Map of extras to add to the Intent - :param bool wait(Optional): block until the user exits the started activity - :param str packagename(Optional): name of package. If used, requires classname to be useful - :param str classname(Optional): name of class. If used, requires packagename to be useful - -:: - - sample code to show startActivityForResultIntent - - -SendBroadcast APIs -------------------- -.. py:function:: sendBroadcast(action, uri, type, extras, packagename, classname) - - Send a broadcast - - :param str action: action - :param str uri(Optional): uri - :param str type(Optional): MIME type/subtype of the URI - :param object extras(Optional): a Map of extras to add to the Intent - :param str packagename(Optional): name of package. If used, requires classname to be useful - :param str classname(Optional): name of class. If used, requires packagename to be useful - - -:: - - sample code to show sendBroadcast - -.. py:function:: sendBroadcastIntent(intent) - - Send a broadcast - - :param Intent intent: Intent in the format as returned from makeIntent - -:: - - sample code to show sendBroadcastIntent - - -Vibrate ----------- -.. py:function:: vibrate(intent) - - Vibrates the phone or a specified duration in milliseconds - - :param int duration: duration in milliseconds - -:: - - sample code to show vibrate - - -NetworkStatus ---------------- -.. py:function:: getNetworkStatus() - - Returns the status of network connection - -:: - - sample code to show getNetworkStatus - -PackageVersion APIs ------------------------------- -.. py:function:: requiredVersion(requiredVersion) - - Checks if version of QPython SL4A is greater than or equal to the specified version - - :param int requiredVersion: requiredVersion - - :return: true or false - - -.. py:function:: getPackageVersionCode(packageName) - - Returns package version code - - :param str packageName: packageName - - :return: Package version code - -.. py:function:: getPackageVersion(packageName) - - Returns package version name - - :param str packageName: packageName - - :return: Package version name - - -:: - - sample code to show getPackageVersionCode & getPackageVersion - - -System APIs --------------------------------- -.. py:function:: getConstants(classname) - - Get list of constants (static final fields) for a class - - :param str classname: classname - - :return: list - -:: - - sample code to show getConstants - -.. py:function:: environment() - - A map of various useful environment details - - :return: environment map object includes id, display, offset, TZ, SDK, download, appcache, availblocks, blocksize, blockcount, sdcard - -:: - - sample code to show environment - -.. py:function:: log(message) - - Writes message to logcat - - :param str message: message - -:: - - sample code to show log - - -SendEmail ----------- -.. py:function:: sendEmail(to, subject, body, attachmentUri) - - Launches an activity that sends an e-mail message to a given recipient - - :param str to: A comma separated list of recipients - :param str subject: subject - :param str body: mail body - :param str attachmentUri(Optional): message - -:: - - sample code to show sendEmail - - -Toast, getInput, getPassword, notify APIs ------------------------------------------------- -.. py:function:: makeToast(message) - - Displays a short-duration Toast notification - - :param str message: message - -:: - - sample code to show makeToast - -.. py:function:: getInput(title, message) - - Queries the user for a text input - - :param str title: title of the input box - :param str message: message to display above the input box - -:: - - sample code to show getInput - -.. py:function:: getPassword(title, message) - - Queries the user for a password - - :param str title: title of the input box - :param str message: message to display above the input box - -:: - - sample code to show getPassword - -.. py:function:: notify(title, message, url) - - Displays a notification that will be canceled when the user clicks on it - - :param str title: title - :param str message: message - :param str url(optional): url - -:: - import androidhelper - droid = androidhelper.Android() - droid.notify('Hello','QPython','http://qpython.org') # you could set the 3rd parameter None also - - - -ApplicationManagerFacade -========================= - -Manager APIs -------------- - -.. py:function:: getLaunchableApplications() - - Returns a list of all launchable application class names - - :return: map object - -:: - - sample code to show getLaunchableApplications - - -.. py:function:: launch(classname) - - Start activity with the given class name - - :param str classname: classname - -:: - - sample code to show launch - -.. py:function:: getRunningPackages() - - Returns a list of packages running activities or services - - :return: List of packages running activities - -:: - - sample code to show getRunningPackages - -.. py:function:: forceStopPackage(packageName) - - Force stops a package - - :param str packageName: packageName - -:: - - sample code to show forceStopPackage - - -CameraFacade -========================= - -.. py:function:: cameraCapturePicture(targetPath) - - Take a picture and save it to the specified path - - :return: A map of Booleans autoFocus and takePicture where True indicates success - -.. py:function:: cameraInteractiveCapturePicture(targetPath) - - Starts the image capture application to take a picture and saves it to the specified path - -CommonIntentsFacade -========================= - -Barcode ----------- -.. py:function:: scanBarcode() - - Starts the barcode scanner - - :return: A Map representation of the result Intent - -View APIs ----------- -.. py:function:: pick(uri) - - Display content to be picked by URI (e.g. contacts) - - :return: A map of result values - -.. py:function:: view(uri, type, extras) - - Start activity with view action by URI (i.e. browser, contacts, etc.) - -.. py:function:: viewMap(query) - - Opens a map search for query (e.g. pizza, 123 My Street) - -.. py:function:: viewContacts() - - Opens the list of contacts - -.. py:function:: viewHtml(path) - - Opens the browser to display a local HTML file - -.. py:function:: search(query) - - Starts a search for the given query - -ContactsFacade -========================= - -.. py:function:: pickContact() - - Displays a list of contacts to pick from - - :return: A map of result values - -.. py:function:: pickPhone() - - Displays a list of phone numbers to pick from - - :return: The selected phone number - -.. py:function:: contactsGetAttributes() - - Returns a List of all possible attributes for contacts - - :return: a List of contacts as Maps - -.. py:function:: contactsGetIds() - - Returns a List of all contact IDs - -.. py:function:: contactsGet(attributes) - - Returns a List of all contacts - -.. py:function:: contactsGetById(id) - - Returns contacts by ID - -.. py:function:: contactsGetCount() - - Returns the number of contacts - -.. py:function:: queryContent(uri, attributes, selection, selectionArgs, order) - - Content Resolver Query - - :return: result of query as Maps - -.. py:function:: queryAttributes(uri) - - Content Resolver Query Attributes - - :return: a list of available columns for a given content uri - -EventFacade -========================= - -.. py:function:: eventClearBuffer() - - Clears all events from the event buffer - -.. py:function:: eventRegisterForBroadcast(category, enqueue) - - Registers a listener for a new broadcast signal - -.. py:function:: eventUnregisterForBroadcast(category) - - Stop listening for a broadcast signal - -.. py:function:: eventGetBrodcastCategories() - - Lists all the broadcast signals we are listening for - -.. py:function:: eventPoll(number_of_events) - - Returns and removes the oldest n events (i.e. location or sensor update, etc.) from the event buffer - - :return: A List of Maps of event properties - -.. py:function:: eventWaitFor(eventName, timeout) - - Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer - - :return: Map of event properties - -.. py:function:: eventWait(timeout) - - Blocks until an event occurs. The returned event is removed from the buffer - - :return: Map of event properties - -.. py:function:: eventPost(name, data, enqueue) - - Post an event to the event queue - -.. py:function:: rpcPostEvent(name, data) - - Post an event to the event queue - -.. py:function:: receiveEvent() - - Returns and removes the oldest event (i.e. location or sensor update, etc.) from the event buffer - - :return: Map of event properties - -.. py:function:: waitForEvent(eventName, timeout) - - Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer - - :return: Map of event properties - -.. py:function:: startEventDispatcher(port) - - Opens up a socket where you can read for events posted - -.. py:function:: stopEventDispatcher() - - Stops the event server, you can't read in the port anymore - -LocationFacade -========================= - -Providers APIs ------------------ - -.. py:function:: locationProviders() - - Returns availables providers on the phone - -.. py:function:: locationProviderEnabled(provider) - - Ask if provider is enabled - -Location APIs ------------------ -.. py:function:: startLocating(minDistance, minUpdateDistance) - - Starts collecting location data - -.. py:function:: readLocation() - - Returns the current location as indicated by all available providers - - :return: A map of location information by provider - -.. py:function:: stopLocating() - - Stops collecting location data - -.. py:function:: getLastKnownLocation() - - Returns the last known location of the device - - :return: A map of location information by provider - -*sample code* -:: - - Droid = androidhelper.Android() - location = Droid.getLastKnownLocation().result - location = location.get('network', location.get('gps')) - - -GEO ------------ -.. py:function:: geocode(latitude, longitude, maxResults) - - Returns a list of addresses for the given latitude and longitude - - :return: A list of addresses - -PhoneFacade -========================= - -PhoneStat APIs ----------------- - -.. py:function:: startTrackingPhoneState() - - Starts tracking phone state - -.. py:function:: readPhoneState() - - Returns the current phone state and incoming number - - :return: A Map of "state" and "incomingNumber" - -.. py:function:: stopTrackingPhoneState() - - Stops tracking phone state - - -Call & Dia APIs ----------------- - -.. py:function:: phoneCall(uri) - - Calls a contact/phone number by URI - -.. py:function:: phoneCallNumber(number) - - Calls a phone number - -.. py:function:: phoneDial(uri) - - Dials a contact/phone number by URI - -.. py:function:: phoneDialNumber(number) - - Dials a phone number - - - -Get information APIs ------------------------- -.. py:function:: getCellLocation() - - Returns the current cell location - -.. py:function:: getNetworkOperator() - - Returns the numeric name (MCC+MNC) of current registered operator - -.. py:function:: getNetworkOperatorName() - - Returns the alphabetic name of current registered operator - -.. py:function:: getNetworkType() - - Returns a the radio technology (network type) currently in use on the device - -.. py:function:: getPhoneType() - - Returns the device phone type - -.. py:function:: getSimCountryIso() - - Returns the ISO country code equivalent for the SIM provider's country code - -.. py:function:: getSimOperator() - - Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM. 5 or 6 decimal digits - -.. py:function:: getSimOperatorName() - - Returns the Service Provider Name (SPN) - -.. py:function:: getSimSerialNumber() - - Returns the serial number of the SIM, if applicable. Return null if it is unavailable - -.. py:function:: getSimState() - - Returns the state of the device SIM card - -.. py:function:: getSubscriberId() - - Returns the unique subscriber ID, for example, the IMSI for a GSM phone. Return null if it is unavailable - -.. py:function:: getVoiceMailAlphaTag() - - Retrieves the alphabetic identifier associated with the voice mail number - -.. py:function:: getVoiceMailNumber() - - Returns the voice mail number. Return null if it is unavailable - -.. py:function:: checkNetworkRoaming() - - Returns true if the device is considered roaming on the current network, for GSM purposes - -.. py:function:: getDeviceId() - - Returns the unique device ID, for example, the IMEI for GSM and the MEID for CDMA phones. Return null if device ID is not available - -.. py:function:: getDeviceSoftwareVersion() - - Returns the software version number for the device, for example, the IMEI/SV for GSM phones. Return null if the software version is not available - -.. py:function:: getLine1Number() - - Returns the phone number string for line 1, for example, the MSISDN for a GSM phone. Return null if it is unavailable - -.. py:function:: getNeighboringCellInfo() - - Returns the neighboring cell information of the device - -MediaRecorderFacade -========================= - - -Audio --------- - -.. py:function:: recorderStartMicrophone(targetPath) - - Records audio from the microphone and saves it to the given location - -Video APIs ------------ - -.. py:function:: recorderStartVideo(targetPath, duration, videoSize) - - Records video from the camera and saves it to the given location. - Duration specifies the maximum duration of the recording session. - If duration is 0 this method will return and the recording will only be stopped - when recorderStop is called or when a scripts exits. - Otherwise it will block for the time period equal to the duration argument. - videoSize: 0=160x120, 1=320x240, 2=352x288, 3=640x480, 4=800x480. - - -.. py:function:: recorderCaptureVideo(targetPath, duration, recordAudio) - - Records video (and optionally audio) from the camera and saves it to the given location. - Duration specifies the maximum duration of the recording session. - If duration is not provided this method will return immediately and the recording will only be stopped - when recorderStop is called or when a scripts exits. - Otherwise it will block for the time period equal to the duration argument. - -.. py:function:: startInteractiveVideoRecording(path) - - Starts the video capture application to record a video and saves it to the specified path - - -Stop --------- -.. py:function:: recorderStop() - - Stops a previously started recording - - -SensorManagerFacade -========================= - -Start & Stop -------------- -.. py:function:: startSensingTimed(sensorNumber, delayTime) - - Starts recording sensor data to be available for polling - -.. py:function:: startSensingThreshold(ensorNumber, threshold, axis) - - Records to the Event Queue sensor data exceeding a chosen threshold - -.. py:function:: startSensing(sampleSize) - - Starts recording sensor data to be available for polling - -.. py:function:: stopSensing() - - Stops collecting sensor data - -Read data APIs ---------------- -.. py:function:: readSensors() - - Returns the most recently recorded sensor data - -.. py:function:: sensorsGetAccuracy() - - Returns the most recently received accuracy value - -.. py:function:: sensorsGetLight() - - Returns the most recently received light value - -.. py:function:: sensorsReadAccelerometer() - - Returns the most recently received accelerometer values - - :return: a List of Floats [(acceleration on the) X axis, Y axis, Z axis] - -.. py:function:: sensorsReadMagnetometer() - - Returns the most recently received magnetic field values - - :return: a List of Floats [(magnetic field value for) X axis, Y axis, Z axis] - -.. py:function:: sensorsReadOrientation() - - Returns the most recently received orientation values - - :return: a List of Doubles [azimuth, pitch, roll] - -*sample code* -:: - - Droid = androidhelper.Android() - Droid.startSensingTimed(1, 250) - sensor = Droid.sensorsReadOrientation().result - Droid.stopSensing() - - -SettingsFacade -========================= - -Screen ----------- - -.. py:function:: setScreenTimeout(value) - - Sets the screen timeout to this number of seconds - - :return: The original screen timeout - -.. py:function:: getScreenTimeout() - - Gets the screen timeout - - :return: the current screen timeout in seconds - -AirplanerMode ---------------------- - -.. py:function:: checkAirplaneMode() - - Checks the airplane mode setting - - :return: True if airplane mode is enabled - -.. py:function:: toggleAirplaneMode(enabled) - - Toggles airplane mode on and off - - :return: True if airplane mode is enabled - -Ringer Silent Mode ---------------------- - -.. py:function:: checkRingerSilentMode() - - Checks the ringer silent mode setting - - :return: True if ringer silent mode is enabled - -.. py:function:: toggleRingerSilentMode(enabled) - - Toggles ringer silent mode on and off - - :return: True if ringer silent mode is enabled - -Vibrate Mode ---------------------- - -.. py:function:: toggleVibrateMode(enabled) - - Toggles vibrate mode on and off. If ringer=true then set Ringer setting, else set Notification setting - - :return: True if vibrate mode is enabled - -.. py:function:: getVibrateMode(ringer) - - Checks Vibration setting. If ringer=true then query Ringer setting, else query Notification setting - - :return: True if vibrate mode is enabled - -Ringer & Media Volume ---------------------- - -.. py:function:: getMaxRingerVolume() - - Returns the maximum ringer volume - -.. py:function:: getRingerVolume() - - Returns the current ringer volume - -.. py:function:: setRingerVolume(volume) - - Sets the ringer volume - -.. py:function:: getMaxMediaVolume() - - Returns the maximum media volume - -.. py:function:: getMediaVolume() - - Returns the current media volume - -.. py:function:: setMediaVolume(volume) - - Sets the media volume - -Screen Brightness ---------------------- - -.. py:function:: getScreenBrightness() - - Returns the screen backlight brightness - - :return: the current screen brightness between 0 and 255 - -.. py:function:: setScreenBrightness(value) - - Sets the the screen backlight brightness - - :return: the original screen brightness - -.. py:function:: checkScreenOn() - - Checks if the screen is on or off (requires API level 7) - - :return: True if the screen is currently on - - -SmsFacade -========================= - -.. py:function:: smsSend(destinationAddress, text) - - Sends an SMS - - :param str destinationAddress: typically a phone number - :param str text: - -.. py:function:: smsGetMessageCount(unreadOnly, folder) - - Returns the number of messages - - :param bool unreadOnly: typically a phone number - :param str folder(optional): default "inbox" - -.. py:function:: smsGetMessageIds(unreadOnly, folder) - - Returns a List of all message IDs - - :param bool unreadOnly: typically a phone number - :param str folder(optional): default "inbox" - -.. py:function:: smsGetMessages(unreadOnly, folder, attributes) - - Returns a List of all messages - - :param bool unreadOnly: typically a phone number - :param str folder: default "inbox" - :param list attributes(optional): attributes - - :return: a List of messages as Maps - -.. py:function:: smsGetMessageById(id, attributes) - - Returns message attributes - - :param int id: message ID - :param list attributes(optional): attributes - - :return: a List of messages as Maps - -.. py:function:: smsGetAttributes() - - Returns a List of all possible message attributes - -.. py:function:: smsDeleteMessage(id) - - Deletes a message - - :param int id: message ID - - :return: True if the message was deleted - -.. py:function:: smsMarkMessageRead(ids, read) - - Marks messages as read - - :param list ids: List of message IDs to mark as read - :param bool read: true or false - - :return: number of messages marked read - -SpeechRecognitionFacade -========================= - -.. py:function:: recognizeSpeech(prompt, language, languageModel) - - Recognizes user's speech and returns the most likely result - - :param str prompt(optional): text prompt to show to the user when asking them to speak - :param str language(optional): language override to inform the recognizer that it should expect speech in a language different than the one set in the java.util.Locale.getDefault() - :param str languageModel(optional): informs the recognizer which speech model to prefer (see android.speech.RecognizeIntent) - - :return: An empty string in case the speech cannot be recongnized - - -ToneGeneratorFacade -========================= - -.. py:function:: generateDtmfTones(phoneNumber, toneDuration) - - Generate DTMF tones for the given phone number - - :param str phoneNumber: phone number - :param int toneDuration(optional): default 100, duration of each tone in milliseconds - - -WakeLockFacade -========================= - -.. py:function:: wakeLockAcquireFull() - - Acquires a full wake lock (CPU on, screen bright, keyboard bright) - -.. py:function:: wakeLockAcquirePartial() - - Acquires a partial wake lock (CPU on) - -.. py:function:: wakeLockAcquireBright() - - Acquires a bright wake lock (CPU on, screen bright) - -.. py:function:: wakeLockAcquireDim() - - Acquires a dim wake lock (CPU on, screen dim) - -.. py:function:: wakeLockRelease() - - Releases the wake lock - -WifiFacade -========================= - -.. py:function:: wifiGetScanResults() - - Returns the list of access points found during the most recent Wifi scan - -.. py:function:: wifiLockAcquireFull() - - Acquires a full Wifi lock - -.. py:function:: wifiLockAcquireScanOnly() - - Acquires a scan only Wifi lock - -.. py:function:: wifiLockRelease() - - Releases a previously acquired Wifi lock - -.. py:function:: wifiStartScan() - - Starts a scan for Wifi access points - - :return: True if the scan was initiated successfully - -.. py:function:: checkWifiState() - - Checks Wifi state - - :return: True if Wifi is enabled - -.. py:function:: toggleWifiState(enabled) - - Toggle Wifi on and off - - :param bool enabled(optional): enabled - - :return: True if Wifi is enabled - -.. py:function:: wifiDisconnect() - - Disconnects from the currently active access point - - :return: True if the operation succeeded - -.. py:function:: wifiGetConnectionInfo() - - Returns information about the currently active access point - -.. py:function:: wifiReassociate() - - Returns information about the currently active access point - - :return: True if the operation succeeded - -.. py:function:: wifiReconnect() - - Reconnects to the currently active access point - - :return: True if the operation succeeded - - -BatteryManagerFacade -========================= - -.. py:function:: readBatteryData() - - Returns the most recently recorded battery data - -.. py:function:: batteryStartMonitoring() - - Starts tracking battery state - -.. py:function:: batteryStopMonitoring() - - Stops tracking battery state - -.. py:function:: batteryGetStatus() - - Returns the most recently received battery status data: - 1 - unknown; - 2 - charging; - 3 - discharging; - 4 - not charging; - 5 - full - -.. py:function:: batteryGetHealth() - - Returns the most recently received battery health data: - 1 - unknown; - 2 - good; - 3 - overheat; - 4 - dead; - 5 - over voltage; - 6 - unspecified failure - -.. py:function:: batteryGetPlugType() - - Returns the most recently received plug type data: - -1 - unknown - 0 - unplugged - 1 - power source is an AC charger - 2 - power source is a USB port - - -.. py:function:: batteryCheckPresent() - - Returns the most recently received battery presence data - -.. py:function:: batteryGetLevel() - - Returns the most recently received battery level (percentage) - -.. py:function:: batteryGetVoltage() - - Returns the most recently received battery voltage - -.. py:function:: batteryGetTemperature() - - Returns the most recently received battery temperature - -.. py:function:: batteryGetTechnology() - - Returns the most recently received battery technology data - - -ActivityResultFacade -========================= - -.. py:function:: setResultBoolean(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - - -.. py:function:: setResultByte(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultShort(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultChar(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - - -.. py:function:: setResultInteger(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultLong(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultFloat(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultDouble(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultString(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultBooleanArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultByteArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultShortArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultCharArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultIntegerArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultLongArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultFloatArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultDoubleArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultStringArray(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - -.. py:function:: setResultSerializable(resultCode, resultValue) - - Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), - the resulting intent will contain SCRIPT_RESULT extra with the given value - - :param int resultCode: - :param byte resultValue: - - -MediaPlayerFacade -========================= - -Control ------------------ -.. py:function:: mediaPlay(url, tag, play) - - Open a media file - - :param str url: url of media resource - :param str tag(optional): string identifying resource (default=default) - :param bool play(optional): start playing immediately - - :return: true if play successful - -.. py:function:: mediaPlayPause(tag) - - pause playing media file - - :param str tag: string identifying resource (default=default) - - :return: true if successful - -.. py:function:: mediaPlayStart(tag) - - start playing media file - - :param str tag: string identifying resource (default=default) - - :return: true if successful - -.. py:function:: mediaPlayClose(tag) - - Close media file - - :param str tag: string identifying resource (default=default) - - :return: true if successful - -.. py:function:: mediaIsPlaying(tag) - - Checks if media file is playing - - :param str tag: string identifying resource (default=default) - - :return: true if successful - - -.. py:function:: mediaPlaySetLooping(enabled, tag) - - Set Looping - - :param bool enabled: default true - :param str tag: string identifying resource (default=default) - - :return: True if successful - -.. py:function:: mediaPlaySeek(msec, tag) - - Seek To Position - - :param int msec: default true - :param str tag: string identifying resource (default=default) - - :return: New Position (in ms) - -Get Information ------------------ -.. py:function:: mediaPlayInfo(tag) - - Information on current media - - :param str tag: string identifying resource (default=default) - - :return: Media Information - -.. py:function:: mediaPlayList() - - Lists currently loaded media - - :return: List of Media Tags - - -PreferencesFacade -========================= - -.. py:function:: prefGetValue(key, filename) - - Read a value from shared preferences - - :param str key: key - :param str filename(optional): Desired preferences file. If not defined, uses the default Shared Preferences. - - -.. py:function:: prefPutValue(key, value, filename) - - Write a value to shared preferences - - :param str key: key - :param str value: value - :param str filename(optional): Desired preferences file. If not defined, uses the default Shared Preferences. - -.. py:function:: prefGetAll(filename) - - Get list of Shared Preference Values - - :param str filename(optional): Desired preferences file. If not defined, uses the default Shared Preferences. - - -QPyInterfaceFacade -========================= - -.. py:function:: executeQPy(script) - - Execute a qpython script by absolute path - - :param str script: The absolute path of the qpython script - - :return: bool - - -TextToSpeechFacade -========================= - -.. py:function:: ttsSpeak(message) - - Speaks the provided message via TTS - - :param str message: message - -.. py:function:: ttsIsSpeaking() - - Returns True if speech is currently in progress - -EyesFreeFacade -========================= - -.. py:function:: ttsSpeak(message) - - Speaks the provided message via TTS - - :param str message: message - - -BluetoothFacade -========================= - -.. py:function:: bluetoothActiveConnections() - - Returns active Bluetooth connections - - -.. py:function:: bluetoothWriteBinary(base64, connID) - - Send bytes over the currently open Bluetooth connection - - :param str base64: A base64 encoded String of the bytes to be sent - :param str connID(optional): Connection id - -.. py:function:: bluetoothReadBinary(bufferSize, connID) - - Read up to bufferSize bytes and return a chunked, base64 encoded string - - :param int bufferSize: default 4096 - :param str connID(optional): Connection id - -.. py:function:: bluetoothConnect(uuid, address) - - Connect to a device over Bluetooth. Blocks until the connection is established or fails - - :param str uuid: The UUID passed here must match the UUID used by the server device - :param str address(optional): The user will be presented with a list of discovered devices to choose from if an address is not provided - - :return: True if the connection was established successfully - -.. py:function:: bluetoothAccept(uuid, timeout) - - Listens for and accepts a Bluetooth connection. Blocks until the connection is established or fails - - :param str uuid: The UUID passed here must match the UUID used by the server device - :param int timeout: How long to wait for a new connection, 0 is wait for ever (default=0) - -.. py:function:: bluetoothMakeDiscoverable(duration) - - Requests that the device be discoverable for Bluetooth connections - - :param int duration: period of time, in seconds, during which the device should be discoverable (default=300) - -.. py:function:: bluetoothWrite(ascii, connID) - - Sends ASCII characters over the currently open Bluetooth connection - - :param str ascii: text - :param str connID: Connection id - -.. py:function:: bluetoothReadReady(connID) - - Sends ASCII characters over the currently open Bluetooth connection - - :param str ascii: text - :param str connID: Connection id - -.. py:function:: bluetoothRead(bufferSize, connID) - - Read up to bufferSize ASCII characters - - :param int bufferSize: default=4096 - :param str connID(optional): Connection id - -.. py:function:: bluetoothReadLine(connID) - - Read the next line - - :param str connID(optional): Connection id - -.. py:function:: bluetoothGetRemoteDeviceName(address) - - Queries a remote device for it's name or null if it can't be resolved - - :param str address: Bluetooth Address For Target Device - -.. py:function:: bluetoothGetLocalName() - - Gets the Bluetooth Visible device name - -.. py:function:: bluetoothSetLocalName(name) - - Sets the Bluetooth Visible device name, returns True on success - - :param str name: New local name - -.. py:function:: bluetoothGetScanMode() - - Gets the scan mode for the local dongle. - Return values: - -1 when Bluetooth is disabled. - 0 if non discoverable and non connectable. - 1 connectable non discoverable. - 3 connectable and discoverable. - -.. py:function:: bluetoothGetConnectedDeviceName(connID) - - Returns the name of the connected device - - :param str connID: Connection id - -.. py:function:: checkBluetoothState() - - Checks Bluetooth state - - :return: True if Bluetooth is enabled - -.. py:function:: toggleBluetoothState(enabled, prompt) - - Toggle Bluetooth on and off - - :param bool enabled: - :param str prompt: Prompt the user to confirm changing the Bluetooth state, default=true - - :return: True if Bluetooth is enabled - -.. py:function:: bluetoothStop(connID) - - Stops Bluetooth connection - - :param str connID: Connection id - -.. py:function:: bluetoothGetLocalAddress() - - Returns the hardware address of the local Bluetooth adapter - -.. py:function:: bluetoothDiscoveryStart() - - Start the remote device discovery process - - :return: true on success, false on error - -.. py:function:: bluetoothDiscoveryCancel() - - Cancel the current device discovery process - - :return: true on success, false on error - -.. py:function:: bluetoothIsDiscovering() - - Return true if the local Bluetooth adapter is currently in the device discovery process - - -SignalStrengthFacade -========================= -.. py:function:: startTrackingSignalStrengths() - - Starts tracking signal strengths - -.. py:function:: readSignalStrengths() - - Returns the current signal strengths - - :return: A map of gsm_signal_strength - -.. py:function:: stopTrackingSignalStrengths() - - Stops tracking signal strength - - -WebCamFacade -========================= - -.. py:function:: webcamStart(resolutionLevel, jpegQuality, port) - - Starts an MJPEG stream and returns a Tuple of address and port for the stream - - :param int resolutionLevel: increasing this number provides higher resolution (default=0) - :param int jpegQuality: a number from 0-10 (default=20) - :param int port: If port is specified, the webcam service will bind to port, otherwise it will pick any available port (default=0) - -.. py:function:: webcamAdjustQuality(resolutionLevel, jpegQuality) - - Adjusts the quality of the webcam stream while it is running - - :param int resolutionLevel: increasing this number provides higher resolution (default=0) - :param int jpegQuality: a number from 0-10 (default=20) - -.. py:function:: cameraStartPreview(resolutionLevel, jpegQuality, filepath) - - Start Preview Mode. Throws 'preview' events - - :param int resolutionLevel: increasing this number provides higher resolution (default=0) - :param int jpegQuality: a number from 0-10 (default=20) - :param str filepath: Path to store jpeg files - - :return: True if successful - -.. py:function:: cameraStopPreview() - - Stop the preview mode - - -UiFacade -========================= - -Dialog --------- -.. py:function:: dialogCreateInput(title, message, defaultText, inputType) - - Create a text input dialog - - :param str title: title of the input box - :param str message: message to display above the input box - :param str defaultText(optional): text to insert into the input box - :param str inputType(optional): type of input data, ie number or text - -.. py:function:: dialogCreatePassword(title, message) - - Create a password input dialog - - :param str title: title of the input box - :param str message: message to display above the input box - -.. py:function:: dialogGetInput(title, message, defaultText) - - Create a password input dialog - - :param str title: title of the input box - :param str message: message to display above the input box - :param str defaultText(optional): text to insert into the input box - -.. py:function:: dialogGetPassword(title, message) - - Queries the user for a password - - :param str title: title of the password box - :param str message: message to display above the input box - -.. py:function:: dialogCreateSeekBar(start, maximum, title) - - Create seek bar dialog - - :param int start: default=50 - :param int maximum: default=100 - :param int title: title - -.. py:function:: dialogCreateTimePicker(hour, minute, is24hour) - - Create time picker dialog - - :param int hour: default=0 - :param int miute: default=0 - :param bool is24hour: default=false - -.. py:function:: dialogCreateDatePicker(year, month, day) - - Create date picker dialog - - :param int year: default=1970 - :param int month: default=1 - :param int day: default=1 - - -NFC -------------- -**Data structs** -*QPython NFC json result* -:: - - { - "role": , # could be self/master/slave - "stat": , # could be ok / fail / cancl - "message": - } - -**APIs** - -.. py:function:: dialogCreateNFCBeamMaster(title, message, inputType) - - Create a dialog where you could create a qpython beam master - - :param str title: title of the input box - :param str message: message to display above the input box - :param str inputType(optional): type of input data, ie number or text - -.. py:function:: NFCBeamMessage(content, title, message) - - Create a dialog where you could create a qpython beam master - - :param str content: message you want to sent - :param str title: title of the input box - :param str message: message to display above the input box - :param str inputType(optional): type of input data, ie number or text - -.. py:function:: dialogCreateNFCBeamSlave(title, message) - - Create a qpython beam slave - - :param str title: title of the input box - :param str message: message to display above the input box - -Progress --------------- -.. py:function:: dialogCreateSpinnerProgress(message, maximumProgress) - - Create a spinner progress dialog - - :param str message(optional): message - :param int maximunProgress(optional): dfault=100 - -.. py:function:: dialogSetCurrentProgress(current) - - Set progress dialog current value - - :param int current: current - -.. py:function:: dialogSetMaxProgress(max) - - Set progress dialog maximum value - - :param int max: max - - -.. py:function:: dialogCreateHorizontalProgress(title, message, maximumProgress) - - Create a horizontal progress dialog - - :param str title(optional): title - :param str message(optional): message - :param int maximunProgress(optional): dfault=100 - - -Alert ----------- -.. py:function:: dialogCreateAlert(title, message) - - Create alert dialog - - :param str title(optional): title - :param str message(optional): message - :param int maximunProgress(optional): dfault=100 - - -Dialog Control ---------------- -.. py:function:: dialogSetPositiveButtonText(text) - - Set alert dialog positive button text - - :param str text: text - -.. py:function:: dialogSetNegativeButtonText(text) - - Set alert dialog negative button text - - :param str text: text - -.. py:function:: dialogSetNeutralButtonText(text) - - Set alert dialog button text - - :param str text: text - -.. py:function:: dialogSetItems(items) - - Set alert dialog list items - - :param list items: items - -.. py:function:: dialogSetSingleChoiceItems(items, selected) - - Set alert dialog list items - - :param list items: items - :param int selected: selected item index (default=0) - -.. py:function:: dialogSetMultiChoiceItems(items, selected) - - Set dialog multiple choice items and selection - - :param list items: items - :param int selected: selected item index (default=0) - -.. py:function:: addContextMenuItem(label, event, eventData) - - Adds a new item to context menu - - :param str label: label for this menu item - :param str event: event that will be generated on menu item click - :param object eventData: event object - -.. py:function:: addOptionsMenuItem(label, event, eventData, iconName) - - Adds a new item to context menu - - :param str label: label for this menu item - :param str event: event that will be generated on menu item click - :param object eventData: event object - :param str iconName: Android system menu icon, see http://developer.android.com/reference/android/R.drawable.html - -.. py:function:: dialogGetResponse() - - Returns dialog response - -.. py:function:: dialogGetSelectedItems() - - This method provides list of items user selected - -.. py:function:: dialogDismiss() - - Dismiss dialog - -.. py:function:: dialogShow() - - Show dialog - - -Layout ---------- -.. py:function:: fullShow(layout) - - Show Full Screen - - :param string layout: String containing View layout - -.. py:function:: fullDismiss() - - Dismiss Full Screen - -.. py:function:: fullQuery() - - Get Fullscreen Properties - -.. py:function:: fullQueryDetail(id) - - Get fullscreen properties for a specific widget - - :param str id: id of layout widget - -.. py:function:: fullSetProperty(id) - - Set fullscreen widget property - - :param str id: id of layout widget - :param str property: name of property to set - :param str value: value to set property to - -.. py:function:: fullSetList(id, list) - - Attach a list to a fullscreen widget - - :param str id: id of layout widget - :param list list: List to set - -.. py:function:: fullKeyOverride(keycodes, enable) - - Override default key actions - - :param str keycodes: id of layout widget - :param bool enable: List to set (default=true) - - - -WebView ------------ -.. py:function:: webViewShow() - - Display a WebView with the given URL - - :param str url: url - :param bool wait(optional): block until the user exits the WebView - -USB Host Serial Facade -====================== - -*QPython 1.3.1+ and QPython3 1.0.3+ contains this feature* - -SL4A Facade for USB Serial devices by Android USB Host API. - - -It control the USB-Serial like devices -from Andoroid which has USB Host Controller . - -The sample -`demonstration is also available at youtube video `_ - - -Requirements -------------- -* Android device which has USB Host controller (and enabled in that firmware). -* Android 4.0 (API14) or later. -* USB Serial devices (see [Status](#Status)). -* USB Serial devices were not handled by Android kernel. - - > I heard some android phone handle USB Serial devices - > make /dev/ttyUSB0 in kernel level. - > In this case, Android does not be able to handle the device - > from OS level. - - please check Android Applications be able to grab the target USB Devices, - such as `USB Device Info `_. - -Status ---------------- -* probably work with USB CDC, like FTDI, Arduino or else. - -* 2012/09/10: work with 78K0F0730 device (new RL78) with Tragi BIOS board. - - `M78K0F0730 `_ - -* 2012/09/24: work with some pl2303 devcies. - -Author -------- -This facade developped by `Kuri65536 `_ -you can see the commit log in it. - - -APIs --------- -.. py:function:: usbserialGetDeviceList() - - Returns USB devices reported by USB Host API. - - :return: Returns "Map of id and string information Map - - -.. py:function:: usbserialDisconnect(connID) - - Disconnect all USB-device - - :param str connID: connection ID - -.. py:function:: usbserialActiveConnections() - - Returns active USB-device connections. - - :return: Returns "Active USB-device connections by Map UUID vs device-name." - - -.. py:function:: usbserialWriteBinary(base64, connID) - - Send bytes over the currently open USB Serial connection. - - :param str base64: - :param str connId: - -.. py:function:: usbserialReadBinary(bufferSize, connID) - - Read up to bufferSize bytes and return a chunked, base64 encoded string - - :param int bufferSize: - :param str connId: - -.. py:function:: usbserialConnect(hash, options) - - Connect to a device with USB-Host. request the connection and exit - - :param str hash: - :param str options: - - :return: Returns messages the request status - -.. py:function:: usbserialHostEnable() - - Requests that the host be enable for USB Serial connections. - - :return: True if the USB Device is accesible - -.. py:function:: usbserialWrite(String ascii, String connID) - - Sends ASCII characters over the currently open USB Serial connection - - :param str ascii: - :param str connID: - -.. py:function:: usbserialReadReady(connID) - - :param str connID: - - :return: True if the next read is guaranteed not to block - - -.. py:function:: usbserialRead(connID, bufferSize) - - Read up to bufferSize ASCII characters. - - :param str connID: - :param int bufferSize: - -.. py:function:: usbserialGetDeviceName(connID) - - Queries a remote device for it's name or null if it can't be resolved - - :param str connID: diff --git a/docs/_sources/en/guide_contributors.rst.txt b/docs/_sources/en/guide_contributors.rst.txt deleted file mode 100644 index 4de51a61..00000000 --- a/docs/_sources/en/guide_contributors.rst.txt +++ /dev/null @@ -1,40 +0,0 @@ -Welcome contribute -=============================== -Thanks for supporting this project, QPython is a greate project, and we hope you join us to help with make it more greater. - -Please send email to us(support at qpython.org) to introduce youself briefly, and which part do you want to contribute. - -Then we will consider to invite you to join the qpython-collaborator group. - -How to help with test -======================== - -.. toctree:: - :maxdepth: 2 - - guide_contributors_test - -How to contribute documentation -================================ - -How to translate -================================ - - -How to launch a local QPython users community -================================================================ - -How to organise a local qpython user sharing event ----------------------------------------- - -How to became the developer member -==================================== - -How to develop qpython built-in programs ----------------------------------------- - -How to sponsor QPython project -==================================== - - -More detail coming soon... diff --git a/docs/_sources/en/guide_contributors_test.rst.txt b/docs/_sources/en/guide_contributors_test.rst.txt deleted file mode 100644 index c4c00939..00000000 --- a/docs/_sources/en/guide_contributors_test.rst.txt +++ /dev/null @@ -1,33 +0,0 @@ -QPython is keeping develop! -If you are interested about what we are doing and want to make some contribution, follow this guide to make this project better! - - -Join the tester community --------------------------- -We create a G+ community where you could report bugs or offer suggestions -> `QPython tester G+ community(For QPython testers) `_ - -Join us now! - -.. image:: ../_static/1.png - :scale: 50 % - - -Become a tester ----------------- -After join the tester community, you could become a tester! -Click this and become a tester -> `I'm ready for test `_ - -.. image:: ../_static/2.png - -Report or suggest -------------------- -If you find out any bugs or have any cool idea about QPython, please let us know about it. -You could write down your suggestion or bug report on the community. - -.. image:: ../_static/3.png - - - -Feedback ---------- -Send your feedback to QPython using the contact information: support@qpython.org diff --git a/docs/_sources/en/guide_developers.rst.txt b/docs/_sources/en/guide_developers.rst.txt deleted file mode 100644 index 22a7d2b3..00000000 --- a/docs/_sources/en/guide_developers.rst.txt +++ /dev/null @@ -1,75 +0,0 @@ -Android -============================== -Android part offers the common Python user interaction functions, like console, editor, file browsing, QRCode reader etc. - - -Console ---------- - - -Editor ------------ - - -File browsing ------------- - - -QRCode reader ------------------------- - - -QSL4A -============================== -QSL4A is the folk of SL4A for QPython, which allows users being able to program with Python script for android. - - -QPython Core -============================== -Besides Python core, QPython core offer three types programming mode also. - -Python 2.x ------------ - -Python 3.x ------------ - -Console program ---------------- - -Kivy program ------------- - -WebApp program --------------- - - - -Pip and libraries -============================== -Pip and libraries offer great expansion ability for QPython. - -Pip ---------- - -Libraries ----------- - - -Quick tools -============================== -Quick tools offers better guide for using QPython well for different users. - -QPython API ------------- - -FTP --------- - - -QPY.IO (Enterprise service) -============================== -It's a enterprise service which aim at offering quick android development delivery with QPython. - -It's QPython's maintainers' main paid service, but not a opensource project. - diff --git a/docs/_sources/en/guide_extend.rst.txt b/docs/_sources/en/guide_extend.rst.txt deleted file mode 100644 index bda077ed..00000000 --- a/docs/_sources/en/guide_extend.rst.txt +++ /dev/null @@ -1,131 +0,0 @@ -QPython Open API -===================================================== -QPython has an open activity which allow you run qpython from outside. - -The MPyAPI's definition seems like the following: - -:: - - - - - - - - - - - - - - - - - - - - - - - - - - - -**So, with it's help, you could:** - -Share some content to QPython's scripts ---------------------------------------------- -You could choose some content in some app, and share to qpython's script, then you could handle the content with the **sys.argv[2]** - -`Watch the demo video on YouTube `_ - - -Run QPython's script from your own application ------------------------------------------------------- - -You can call QPython to run some script or python code in your application by call this activity, like the following sample: - -:: - - // code sample shows how to call qpython API - String extPlgPlusName = "org.qpython.qpy"; // QPython package name - Intent intent = new Intent(); - intent.setClassName(extPlgPlusName, "org.qpython.qpylib.MPyApi"); - intent.setAction(extPlgPlusName + ".action.MPyApi"); - - Bundle mBundle = new Bundle(); - mBundle.putString("app", "myappid"); - mBundle.putString("act", "onPyApi"); - mBundle.putString("flag", "onQPyExec"); // any String flag you may use in your context - mBundle.putString("param", ""); // param String param you may use in your context - - /* - * The Python code we will run - */ - String code = "import androidhelper\n" + - "droid = androidhelper.Android()\n" + - "line = droid.dialogGetInput()\n" + - "s = 'Hello %s' % line.result\n" + - "droid.makeToast(s)\n" - - mBundle.putString("pycode", code); - intent.putExtras(mBundle); - startActivityForResult(intent, SCRIPT_EXEC_PY); - ... - - - - // And you can handle the qpython callabck result in onActivityResult - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { - if (requestCode == SCRIPT_EXEC_PY) { - if (data!=null) { - Bundle bundle = data.getExtras(); - String flag = bundle.getString("flag"); - String param = bundle.getString("param"); - String result = bundle.getString("result"); // Result your Pycode generate - Toast.makeText(this, "onQPyExec: return ("+result+")", Toast.LENGTH_SHORT).show(); - } else { - Toast.makeText(this, "onQPyExec: data is null", Toast.LENGTH_SHORT).show(); - - } - } - } - - -`Checkout the full project from github `_ - -And there is `a production application - QPython Plugin for Tasker `_ - -QPython Online Service -===================================================== - -Now the QPython online service only open for QPython, not QPython3. - - -QPypi ---------------------------------------------------------- -Can I install some packages which required pre-compiled ? -Sure, you could install some pre-compiled packages from QPypi, you could find it through "Libraries" on dashboard. - - -.. image:: ../_static/guide_extend_pic2.png - -If you couldn't found the package here, you could send email to river@qpython.org . - -QPY.IO ---------------------------------------------------- -Can I build an independent APK from QPython script? - -Sure you can. now the service is **in BETA**, it's a challenging thing. We will publish it as a online service, for we want to let the development process is simple, you don't need to own the development environment set up when you want to build a application. - - -.. image:: ../_static/guide_extend_pic1.png - -If you want to try it out or have some business proposal, please contact with us by sending email to river@qpython.org . diff --git a/docs/_sources/en/guide_helloworld.rst.txt b/docs/_sources/en/guide_helloworld.rst.txt deleted file mode 100644 index d07001f6..00000000 --- a/docs/_sources/en/guide_helloworld.rst.txt +++ /dev/null @@ -1,121 +0,0 @@ -Writing "Hello World" -======================== - - -Hello world ----------------- -.. image:: ../_static/guide_helloworld_pic1.png - :alt: hello world - -Well, after you became a bit more familiar with QPython, let's create our first program in QPython. Obviously, it will be `helloworld.py`. ;) - -Start QPython, open editor and enter the following code: - -:: - - import androidhelper - droid = androidhelper.Android() - droid.makeToast('Hello, Username!') - -No wonder, it's just similar to any other hello-world program. When executed, it just shows pop-up message on the screen (see screenshot on the top). Anyway, it's a good example of QPython program. - -SL4A library ------------- - -It begins with *import androidhelper* — the most useful module in QPython, which encapsulates almost all interface with Android, available in Python. Any script developed in QPython starts with this statement (at least if it claims to communicate with user). Read more about Python library `here `_ and import statement `here `_ - -By the way, if you're going to make your script compatible with SL4A, you should replace the first line with the following code (and use `android` instead `androidhelper` further in the program): - -:: - - try: - import androidhelper as android - except ImportError: - import android - -Ok, next we're creating an object `droid` (actually a class), it is necessary to call RPC functions in order to communicate with Android. - -And the last line of our code calls such function, `droid.makeToast()`, which shows a small pop-up message (a "toast") on the screen. - -Well, let's add some more functionality. Let it ask the user name and greet them. - -More samples ---------------- -We can display a simple dialog box with the title, prompt, edit field and buttons **Ok** and **Cancel** using `dialogGetInput` call. Replace the last line of your code and save it as `hello1.py`: - -:: - - import androidhelper - droid = androidhelper.Android() - respond = droid.dialogGetInput("Hello", "What is your name?") - -Well, I think it should return any respond, any user reaction. That's why I wrote `respond = ...`. But what the call actually returns? Let's check. Just add `print` statement after the last line: - -:: - - import androidhelper - droid = androidhelper.Android() - respond = droid.dialogGetInput("Hello", "What is your name?") - print respond - -Then save and run it... - -Oops! Nothing printed? Don't worry. Just pull notification bar and you will see "QPython Program Output: hello1.py" — tap it! - - -As you can see, `droid.dialogGetInput()` returns a JSON object with three fields. We need only one — `result` which contains an actual input from user. - -Let's add script's reaction: - -:: - - import androidhelper - droid = androidhelper.Android() - respond = droid.dialogGetInput("Hello", "What is your name?") - print respond - message = 'Hello, %s!' % respond.result - droid.makeToast(message) - -Last two lines (1) format the message and (2) show the message to the user in the toast. See `Python docs `_ if you still don't know what `%` means. - -Wow! It works! ;) - -Now I'm going to add a bit of logic there. Think: what happen if the user clicks **Cancel** button, or clicks **Ok** leaving the input field blank? - -You can play with the program checking what contains `respond` variable in every case. - -First of all, I want to put text entered by user to a separate variable: `name = respond.result`. Then I'm going to check it, and if it contains any real text, it will be considered as a name and will be used in greeting. Otherwise another message will be shown. Replace fifth line `message = 'Hello, %s!' % respond.result` with the following code: - -:: - - name = respond.result - if name: - message = 'Hello, %s!' % name - else: - message = "Hey! And you're not very polite, %Username%!" - -Use **<** and **>** buttons on the toolbar to indent/unindent lines in if-statement (or just use space/backspace keys). You can read more about indentation in Python `here `_; if-statement described `here `_. - -First of all, we put user input to the variable `name`. Then we check does `name` contain anything? In case the user left the line blank and clicked **Ok**, the return value is empty string `''`. In case of **Cancel** button pressed, the return value is `None`. Both are treated as false in if-statement. So, only if `name` contans anything meaninful, then-statement is executed and greeting "Hello, ...!" shown. In case of empty input the user will see "Hey! And you're not very polite, %Username%!" message. - -Ok, here is the whole program: - -:: - - import androidhelper - droid = androidhelper.Android() - respond = droid.dialogGetInput("Hello", "What is your name?") - print respond - name = respond.result - if name: - message = 'Hello, %s!' % name - else: - message = "Hey! And you're not very polite, %Username%!" - droid.makeToast(message) - - -`Thanks dmych offer the first draft in his blog `_ - - - - diff --git a/docs/_sources/en/guide_howtostart.rst.txt b/docs/_sources/en/guide_howtostart.rst.txt deleted file mode 100644 index 8575d63e..00000000 --- a/docs/_sources/en/guide_howtostart.rst.txt +++ /dev/null @@ -1,133 +0,0 @@ - - -QPython: How To Start -======================== -Now, I will introduce the QPython's features through it's interfaces. - -1. Dashboard ------------------- - -.. image:: ../_static/guide_howtostart_pic1.png - :alt: QPython start - - -After you installed QPython, start it in the usual way by tapping its icon in the menu. Screenshot on the top of this post shows what you should see when QPython just started. - -**Start button** - -By tapping the big button with Python logo in the center of the screen you can - -**Launch your local script or project** - -*Get script from QR code* (funny brand new way to share and distribute your code, you can create QRCode through `QPython's QRCode generator `_ - -Now you can install many 3rd libaries ( pure python libraries mainly ) through pip_console.py script. - -If you want QPython to run some script of project when you click the start button, you can make it by setting default program in setting activity. - - -**Developer kit dashboard** - -If you swipe to the left instead of tapping, you will see another (second) main screen of QPython *(Pic. 2)*. As for me, it is much more useful and comfortable for developer. - -.. image:: ../_static/guide_howtostart_pic2.png - :alt: QPython develop dashboard - - -Tools available here: - -* **Console** — yes, it's regular Python console, feel free to comunicate with interpreter directly -* **Editor** — QPython has a nice text editor integrated with the rest, you can write code and run it without leaving the application -* **My QPython** — here you can find your scripts and projects -* **System** — maintain libraries and components: install and uninstall them -* **Package Index** opens the page `QPyPI `_ in browser allowing to install packages listed there -* **Community** leads to `QPython.org `_ page. Feel free to join or ask&answer questions in the QPython community. - -By long clicking on the console or editor, you have chance to create the shortcut on desktop which allow you enter console or editor directly. - -Next, let's see the console and the editor. - -2. Console and editor -------------------------- - -.. image:: ../_static/guide_howtostart_pic3.png - :alt: QPython console - - -As I said before, there is an ordinary Python console. Many people usually use it to explore objects' properties, consult about syntax and test their ideas. You can type your commands directly and Python interpreter will execute them. You can open additional consoles by tapping the plus button (1) and usedrop-down list on the upper left corner to switch between consoles (2). To close the console just tap the close button (3). - -.. image:: ../_static/guide_howtostart_pic4.png - :alt: QPython notification - - -Please note, there will be notification in the notification bar unless you explicitly close the console and you always can reach the open console by tapping the notification. - - - -.. image:: ../_static/guide_howtostart_pic5.png - :alt: QPython editor - - -The editor allows you obviously (hello Cap!) enter and modify text. Here you can develop your scripts, save them and execute. The editor supports Python syntax highlighting and shows line numbers (there is no ability to go to the line by number though). *(above picture)* - -When typing, you can easily control indentation level (which is critical for Python code) using two buttons on the toolbar (1). Next buttons on the toolbar are **Save** and **Save As** (2), then goes **Run** (3), **Undo**, **Search**, **Recent Files** and **Settings** buttons. Also there are two buttons on the top: **Open** and **New** (5). - -When saving, don't forget to add `.py` estension to the file name since the editor don't do it for you. - -3. Programs --------------------- -You can find the scripts or projects in My QPython. My QPython contains the scripts and Projects. - -By long clicking on script or project, you have chance to create the shortcut for the script or project. Once you have created the shortcuts on desktop, you can directly run the script or project from desktop. - - -**Scripts** -Scripts : A single script. The scripts are in the /sdcard/com.hipipal.qpyplus/scripts directory. -If you want your script could be found in My QPython, please upload it to this directory. - -When you click the script, you can choose the following actions: - -- Run : Run the script -- Open : Edit the script with built-in editor -- Rename : Rename the script -- Delete : Delete the script - -**Projects** -Projects : A directory which should contain the main.py as the project's default launch script, and you can put other dependency 3rd libraries or resources in the same directory, if you want your project could be found in My QPython, please upload them into this directory. - -When you click on the project, you can choose the following actions: - -- Run : run the project -- Open : use it to explore project's resources -- Rename : Rename the project -- Delete : Delete the project - -4. Libraries --------------- - -By installing 3rd libraries, you can extend your qpython's programming ability quickly. There are some ways to install libraries. - -**QPypi** - -You can install some pre-built libraries from QPypi, like numpy etc. - -**Pip console** - -You can install most pure python libraries through pip console. - - -Besides the two ways above, you could copy libraries into the /sdcard/qpython/lib/python2.7/site-packages in your device. - - -*Notice:* -Some libraries mixed with c/c++ files could not be install through pip console for the android lacks the compiler environment, you could ask help from qpython developer team. - - -5. Community --------------- -It will redirect to the QPython.org, including somthe source of this documentation, and there are some qpython user communities' link, many questions of qpython usage or programming could be asked in the community. - - - - -`Thanks dmych offer the first draft in his blog `_ diff --git a/docs/_sources/en/guide_ide.rst.txt b/docs/_sources/en/guide_ide.rst.txt deleted file mode 100644 index 45865c81..00000000 --- a/docs/_sources/en/guide_ide.rst.txt +++ /dev/null @@ -1,49 +0,0 @@ -Use the best way for developing -=================================================== - - -Develop from QEditor ----------------------------------------- -QEditor is the QPython's built-in editor, which supports Python / HTML syntax highlight. - - -**QEditor's main features** - -* Edit / View plain text file, like Python, Lua, HTML, Javascript and so on - -* Edit and run Python script & Python syntax highlight - -* Edit and run Shell script - -* Preview HTML with built-in HTML browser - -* Search by keyword, code snippets, code share - -You could run the QPython script directly when you develop from QEditor, so when you are moving it's the most convient way for QPython develop. - - -Develop from browser --------------------------------------- -QPython has a built-in script which is **qedit4web.py**, you could see it when you click the start button and choose "Run local script". -After run it, you could see the result. - -.. image:: ../_static/guide_ide_qedit4web.png - :alt: QPython qedit4web - -Then, you could access the url from your PC/Laptop's browser for developing, just like the below pics. - -.. image:: ../_static/guide_ide_qedit4web_choose.png - :alt: QPython qedit4web choose project or file - -*After choose some project or script, you could start to develop* - -.. image:: ../_static/guide_ide_qedit4web_develop.png - :alt: QPython qedit4web - - -With it's help, you could write from browser and run from your android phone. It is very convenient. - - -Develop from your computer --------------------------- -Besides the above ways, you could develop the script with your way, then upload to your phone and run with QPython also. diff --git a/docs/_sources/en/guide_libraries.rst.txt b/docs/_sources/en/guide_libraries.rst.txt deleted file mode 100644 index e4bb3ef2..00000000 --- a/docs/_sources/en/guide_libraries.rst.txt +++ /dev/null @@ -1,292 +0,0 @@ -QPython built-in Libraries -========================== -QPython is using the Python 2.7.2 and it support most Python stardard libraries. And you could see their documentation through Python documentation. - -QPython dynload libraries --------------------------------------------------------------- -Just like Python, QPython contains python built-in .so libraries. - -Usually, you don't need to import them manually, they were used in stardard libraries, and could be imported automatically. - -* _codecs_cn.so -* _codecs_hk.so -* _codecs_iso2022.so -* _codecs_jp.so -* _codecs_kr.so -* _codecs_tw.so -* _csv.so -* _ctypes.so -* _ctypes_test.so -* _hashlib.so -* _heapq.so -* _hotshot.so -* _io.so -* _json.so -* _lsprof.so -* _multibytecodec.so -* _sqlite3.so -* _ssl.so -* _testcapi.so -* audioop.so -* future_builtins.so -* grp.so -* mmap.so -* resource.so -* syslog.so -* termios.so -* unicodedata.so - -QPython stardard libraries ---------------------------- -The following libraries are the stardard QPython libraries which are the same as Python: - -- `BaseHTTPServer.py `_ -- `binhex.py `_ -- `fnmatch.py `_ -- mhlib.py -- quopri.py -- sysconfig.py -- Bastion.py -- bisect.py -- formatter.py -- mimetools.py -- random.py -- tabnanny.py -- CGIHTTPServer.py -- bsddb -- fpformat.py -- mimetypes.py -- re.py -- tarfile.py -- ConfigParser.py -- cProfile.py -- fractions.py -- mimify.py -- repr.py -- telnetlib.py -- Cookie.py -- calendar.py -- ftplib.py -- modulefinder.py -- rexec.py -- tempfile.py -- DocXMLRPCServer.py -- cgi.py -- functools.py -- multifile.py -- rfc822.py -- textwrap.py -- HTMLParser.py -- cgitb.py -- genericpath.py -- mutex.py -- rlcompleter.py -- this.py -- chunk.py -- getopt.py -- netrc.py -- robotparser.py -- threading.py -- MimeWriter.py -- cmd.py -- getpass.py -- new.py -- runpy.py -- timeit.py -- Queue.py -- code.py -- gettext.py -- nntplib.py -- sched.py -- toaiff.py -- SimpleHTTPServer.py -- codecs.py -- glob.py -- ntpath.py -- sets.py -- token.py -- SimpleXMLRPCServer.py -- codeop.py -- gzip.py -- nturl2path.py -- sgmllib.py -- tokenize.py -- SocketServer.py -- collections.py -- hashlib.py -- numbers.py -- sha.py -- trace.py -- StringIO.py -- colorsys.py -- heapq.py -- opcode.py -- shelve.py -- traceback.py -- UserDict.py -- commands.py -- hmac.py -- optparse.py -- shlex.py -- tty.py -- UserList.py -- compileall.py -- hotshot -- os.py -- shutil.py -- types.py -- UserString.py -- compiler -- htmlentitydefs.py -- os2emxpath.py -- site.py -- unittest -- _LWPCookieJar.py -- config -- htmllib.py -- smtpd.py -- urllib.py -- _MozillaCookieJar.py -- contextlib.py -- httplib.py -- pdb.py -- smtplib.py -- urllib2.py -- __future__.py -- cookielib.py -- ihooks.py -- pickle.py -- sndhdr.py -- urlparse.py -- __phello__.foo.py -- copy.py -- imaplib.py -- pickletools.py -- socket.py -- user.py -- _abcoll.py -- copy_reg.py -- imghdr.py -- pipes.py -- sqlite3 -- uu.py -- _pyio.py -- csv.py -- importlib -- pkgutil.py -- sre.py -- uuid.py -- _strptime.py -- ctypes -- imputil.py -- plat-linux4 -- sre_compile.py -- warnings.py -- _threading_local.py -- dbhash.py -- inspect.py -- platform.py -- sre_constants.py -- wave.py -- _weakrefset.py -- decimal.py -- io.py -- plistlib.py -- sre_parse.py -- weakref.py -- abc.py -- difflib.py -- json -- popen2.py -- ssl.py -- webbrowser.py -- aifc.py -- dircache.py -- keyword.py -- poplib.py -- stat.py -- whichdb.py -- antigravity.py -- dis.py -- lib-tk -- posixfile.py -- statvfs.py -- wsgiref -- anydbm.py -- distutils -- linecache.py -- posixpath.py -- string.py -- argparse.py -- doctest.py -- locale.py -- pprint.py -- stringold.py -- xdrlib.py -- ast.py -- dumbdbm.py -- logging -- profile.py -- stringprep.py -- xml -- asynchat.py -- dummy_thread.py -- macpath.py -- pstats.py -- struct.py -- xmllib.py -- asyncore.py -- dummy_threading.py -- macurl2path.py -- pty.py -- subprocess.py -- xmlrpclib.py -- atexit.py -- email -- mailbox.py -- py_compile.py -- sunau.py -- zipfile.py -- audiodev.py -- encodings -- mailcap.py -- pyclbr.py -- sunaudio.py -- base64.py -- filecmp.py -- markupbase.py -- pydoc.py -- symbol.py -- bdb.py -- fileinput.py -- md5.py -- pydoc_data -- symtable.py - - - -Python 3rd Libraries -========================== - -- `BeautifulSoup.py(3) `_ -- pkg_resources.py -- androidhelper -- plyer -- `bottle.py `_ -- qpy.py -- qpythoninit.py -- setuptools -- `pip `_ - - -Androidhelper APIs -======================== -To simplify QPython SL4A development in IDEs with a -"hepler" class derived from the default Android class containing -SL4A facade functions & API documentation - - -.. toctree:: - :maxdepth: 2 - - guide_androidhelpers diff --git a/docs/_sources/en/guide_program.rst.txt b/docs/_sources/en/guide_program.rst.txt deleted file mode 100644 index 07962d77..00000000 --- a/docs/_sources/en/guide_program.rst.txt +++ /dev/null @@ -1,191 +0,0 @@ -QPython's main features -==================================== - -**With QPython, you could build android applications with android application and script language now.** - - -Why should I choose QPython ------------------------- -The smartphone is becomming people's essential information & technical assitant, so an flexiable script engine could help people complete most jobs efficiently without complex development. - -QPython offer **an amazing developing experience**, with it's help, you could implement the program easily without complex installing IDE, compiling, package progress etc. - -QPython's main features -------------------------- -You can do most jobs through QPython just like the way that Python does on PC/Laptop. - - -**Libraries** - -- QPython supports most stardard Python libraries. - -- QPython supports many 3rd Python libraries which implemented with pure Python code. - -- QPython supports some Python libraries mixed with C/C++ code which pre-compiled by QPython develop team. - -- QPython allows you put on the libraries by yourself. - -Besides these, QPython offers some extra features which Python doesn't offer, Like: - -- Android APIs Access(Like SMS, GPS, NFC, BLUETOOTH etc) - -*Why QPython require so many permissions?* - -QPython need these permissions to access Android's API. - - -**Runtime modes** - -QPython supports several runtime modes for android. - -**Console mode** - -It's the default runtime mode in QPython, it's very common in PC/laptop. - - -**Kivy mode** - -QPython supports `Kivy `_ as the GUI programming solution. - - -Kivy is an open source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps. - -Your device should support opengl2.0 for supporting kivy mode. - -By insert into the following header in your script, you can let your script run with kivy mode. - -:: - - #qpy:kivy - - -*An kivy program in QPython sample* - -:: - - #qpy:kivy - from kivy.app import App - from kivy.uix.button import Button - - class TestApp(App): - def build(self): - return Button(text='Hello World') - - TestApp().run() - - -If your library require the opengl driver, you shoule declare the kivy mode header in your script, like the jnius. - -*NOTE: QPython3 didn't support kivy mode yet, we have plan to support it in the future* - -**WebApp mode** - -We recommend you implement WebApp with QPython for it offer the easy to accomplish UI and Take advantage of Python's fast programming strong point. - -WebApp will start a webview in front, and run a python web service background. -You could use *bottle*(QPython built-in library) to implement the web service, or you could install *django* / *flask* framework also. - - -By insert into the following header in your script, you can let your script run with webapp mode. - -:: - - #qpy:webapp: - #qpy: - #qpy:// - -For example - -:: - - #qpy:webapp:Hello QPython - #qpy://localhost:8080/hello - - -The previous should start a webview which should load the *http://localhost:8080/hello* as the default page, and the webview will keep the titlebar which title is "Hello QPython", if you add the *#qpy:fullscreen* it will hide the titlebar. - - -:: - - #qpy:webapp:Hello Qpython - #qpy://127.0.0.1:8080/ - """ - This is a sample for qpython webapp - """ - - from bottle import Bottle, ServerAdapter - from bottle import run, debug, route, error, static_file, template - - - ######### QPYTHON WEB SERVER ############### - - class MyWSGIRefServer(ServerAdapter): - server = None - - def run(self, handler): - from wsgiref.simple_server import make_server, WSGIRequestHandler - if self.quiet: - class QuietHandler(WSGIRequestHandler): - def log_request(*args, **kw): pass - self.options['handler_class'] = QuietHandler - self.server = make_server(self.host, self.port, handler, **self.options) - self.server.serve_forever() - - def stop(self): - #sys.stderr.close() - import threading - threading.Thread(target=self.server.shutdown).start() - #self.server.shutdown() - self.server.server_close() #<--- alternative but causes bad fd exception - print "# qpyhttpd stop" - - - ######### BUILT-IN ROUTERS ############### - @route('/__exit', method=['GET','HEAD']) - def __exit(): - global server - server.stop() - - @route('/assets/') - def server_static(filepath): - return static_file(filepath, root='/sdcard') - - - ######### WEBAPP ROUTERS ############### - @route('/') - def home(): - return template('

Hello {{name}} !

'+ \ - 'View source',name='QPython') - - - ######### WEBAPP ROUTERS ############### - app = Bottle() - app.route('/', method='GET')(home) - app.route('/__exit', method=['GET','HEAD'])(__exit) - app.route('/assets/', method='GET')(server_static) - - try: - server = MyWSGIRefServer(host="127.0.0.1", port="8080") - app.run(server=server,reloader=False) - except Exception,ex: - print "Exception: %s" % repr(ex) - - -If you want the webapp could be close when you exit the webview, you have to define the *@route('/__exit', method=['GET','HEAD'])* method , for the qpython will request the *http://localhost:8080/__exit* when you exit the webview. So you can release other resource in this function. - -.. image:: ../_static/guide_program_pic1.png - :alt: QPython WebApp Sample - -*Running screenshot* - - -In the other part of the code, you could implement a webserver whish serve on localhost:8080 and make the URL /hello implement as your webapp's homepage. - - -**Q mode** - -If you don't want the QPython display some UI, pelase try to use the QScript mode, it could run a script background, just insert the following header into your script: - -:: - - #qpy:qpyapp diff --git a/docs/_sources/zh/contributorshowto.rst.txt b/docs/_sources/zh/contributorshowto.rst.txt deleted file mode 100644 index da17ec1e..00000000 --- a/docs/_sources/zh/contributorshowto.rst.txt +++ /dev/null @@ -1,36 +0,0 @@ - -QPython文档体系说明 ---------------------- - -QPython 文档体系分为 英文/中文 两部分,我们努力保持两种语言对应内容的准确和同步,其中内容其中又分为 - -* 快速开始 (使用上的帮助) - -* 编程指南 (主要是用QPython来进行编程和开发的指南) - -* QPython黑客指南 (深入折腾的指导) - -* 贡献者指南 (QPython贡献者指南,分为在QPython team内的,和以外的) - - -如何提交文档 -------------------------------- -文档非常重要,我们用sphinx来组织文档,并且文档会通过github page功能直接推到qpython.org网站中 -在想要贡献QPython文档之前仔细阅读我们的指南 - -* git clone http://github.com/qpython-android/qpython - -* 进入到 项目的qpython-docs目录中 - -* 按照sphinx规则编辑source中的文件即可 - -* 最后cd到qpython-docs中并运行build.sh - -* 打开浏览器打开本地文件检查, - -* 如果检查无问题则可以提交,然后浏览qpython.org即可看到最新的更新 - - -如何提交翻译 -------------------------------- -QPython是一个支持多语言的应用,你可以通过以下方式来提交对应国家的翻译 diff --git a/docs/_sources/zh/howtostart.rst.txt b/docs/_sources/zh/howtostart.rst.txt deleted file mode 100644 index 8a1ed07f..00000000 --- a/docs/_sources/zh/howtostart.rst.txt +++ /dev/null @@ -1,28 +0,0 @@ -快速开始 -========= - -* `QPython - 使用说明 `_ -* `QPython - 快速开始 `_ -* `“你好,世界!” `_ - -编程指南 -============ - -* `QPython - 开发 WEB APP `_ -* `QPython - Bottle 快速了解 `_ - -QPython黑客指南 -================= - -* `QPython - 编程向导 `_ -* `QPython 黑客 `_ - -贡献者指南 -================= -欢迎加入 QPython 团队 - -.. toctree:: - :maxdepth: 2 - - contributorshowto - diff --git a/docs/_sources/zh/quickstart.rst.txt b/docs/_sources/zh/quickstart.rst.txt deleted file mode 100644 index eb41fb3b..00000000 --- a/docs/_sources/zh/quickstart.rst.txt +++ /dev/null @@ -1,3 +0,0 @@ -ٿʼ -======== - diff --git a/docs/_sources/zhindex.rst.txt b/docs/_sources/zhindex.rst.txt deleted file mode 100644 index 6006633f..00000000 --- a/docs/_sources/zhindex.rst.txt +++ /dev/null @@ -1,33 +0,0 @@ -中文用户向导 -============================================= - -欢迎 ! ------------------------------- -QPython/QPython3 的最新版本1.3.2(QPython), 1.0.2(QPython3) 已经发布,它包含了许多惊艳的特性,请从应用市场安装 - - -QPython 起步 ------------------------- -.. toctree:: - :maxdepth: 2 - - zh/howtostart - - -更多链接 ------------------------------- -* `常见问题 `_ -* `在百度贴吧里讨论 `_ -* `在微博问我们问题 `_ -* `给我们发邮件 `_ -* `报告问题 `_ - -QPython 用户开发组 ------------------------------- -* 请加入 `QPython 用户开发者组 `_ 来和全世界的 QPython 用户一块来玩转QPython。 -* 加入QPython QQ组(Q群:540717901)来和中国活跃的QPython 用户一起玩转 QPython - -如何贡献 ---------- -想成为 QPython 的贡献者么?请 `给我们发邮件 `_ - diff --git a/docs/document.html b/docs/document.html deleted file mode 100644 index f2ee009d..00000000 --- a/docs/document.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - -Welcome to read the QPython guide! — QPython 0.9 documentation - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
-
    -
  • Guide »
  • -
  • Welcome to read the QPython guide!
  • -
-
-
-
-images/bestpython.png -
-

Welcome to read the QPython guide!

-

QPython is a script engine that runs Python on android devices. It lets your android device run Python scripts and projects. It contains the Python interpreter, console, editor, and the SL4A Library for Android. It’s Python on Android!

-

QPython has several millions users in the world already, it’s a great project for programming users, welcome to join us for contributing to this project NOW.

-
-

What’s NEW

-

QPython project include the QPython and QPython3 applications.

-

QPython application is using the Python 2.7.2 , and QPython application is using the Python 3.2.2 .

-

QPython’s newest version is 1.3.2 (Released on 2017/5/12) , QPython3’s newest version is 1.0.2 (Released on 2017/3/29), New versions include many amazing features, please upgrade to the newest version as soon from google play, amazon appstore etc.

-
-
-

Thanks these guys who are contributing

-

They are pushing on the QPython project moving forward.

-River is the project's organizer and the current online QPython's author. -Mae is a beautiful and talented girl developer who is good at python & android programming. -Zoom.Quiet is a knowledgeable guy who is famous in many opensource communities. -MathiasLuo is a android geek developer -liyuanrui is a Chinese geek -Kyle kersey is a US geek -

Do you want to join the great QPython team ? You could Ask qustions on twitter or email us. -And you could fork us on github and send pull request.

-
-
-

QPython Communities

-

There are many active QPython communities where you could meet the QPython users like you

- -

And you could talk to us through social network

- -

It’s the official QPython Users & Contributors’ Guide, please follow these steps for using and contributing.

-
-
-

Support

-

We are happy to hear feedback from you, but sometimes some bugs or features demand may not be implemented soon for we lack resources.

-

So if you have any issue need the core developer team to solve with higher priority, you could try the bountysource service.

-
- -
-

Others

-
- -
-
- -
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/faq.html b/docs/en/faq.html deleted file mode 100644 index 1a25f157..00000000 --- a/docs/en/faq.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - -FAQ — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

FAQ

-

How to run qpython script from other terminals ?

-
    -
  • You could “share to” qpython from 3rd apps.
  • -
  • You need to root the android device first, then soure the env vars (Just like the qpython wiki link you mentioned) and execute the /data/data/org.qpython.qpy/bin/python or /data/data/org.qpython.qpy/bin/python-android5 (for android 5 above)
  • -
-

Case sample

-

Support pygame ?

-

Even you could import pygame in QPython, but QPython doesn’t support pygame now.

-

We will consider to support it later, please follow us on facebook to get it’s progress.

-

Case sample

-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide.html b/docs/en/guide.html deleted file mode 100644 index ff76de0f..00000000 --- a/docs/en/guide.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - -Getting started — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
-
    -
  • Guide »
  • -
  • Getting started
  • -
-
-
-
-
-

Getting started

-

How to start quickly ? Just follow the following steps:

- -
- -
-

Developers’ Guide

-

QPython developers’ goal is pushing out a great Python for android.

- -
- -
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide_androidhelpers.html b/docs/en/guide_androidhelpers.html deleted file mode 100644 index 2feba989..00000000 --- a/docs/en/guide_androidhelpers.html +++ /dev/null @@ -1,3669 +0,0 @@ - - - - - -AndroidFacade — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-

The Scripting Layer for Android (abridged as SL4A, and previously named Android Scripting Environment or ASE) is a library that allows the creation and running of scripts written in various scripting languages directly on Android devices. QPython start to extend the SL4A project and integrate it.

-../images/sl4a.jpg -

There are many SL4A APIs, if you found any issue, please report an issue.

-
-

AndroidFacade

-
-

Clipboard APIs

-
-
-setClipboard(text)
-

Put text in the clipboard

- --- - - - -
Parameters:text (str) – text
-
-
-
-getClipboard(text)
-

Read text from the clipboard

- --- - - - -
Returns:The text in the clipboard
-
-
sample code to show setClipboard/getClipboard
-
-
-
-
-

Intent & startActivity APIs

-
-
-makeIntent(action, uri, type, extras, categories, packagename, classname, flags)
-

Starts an activity and returns the result

- --- - - - - - -
Parameters:
    -
  • action (str) – action
  • -
  • uri(Optional) (str) – uri
  • -
  • type(Optional) (str) – MIME type/subtype of the URI
  • -
  • extras(Optional) (object) – a Map of extras to add to the Intent
  • -
  • categories(Optional) (list) – a List of categories to add to the Intent
  • -
  • packagename(Optional) (str) – name of package. If used, requires classname to be useful
  • -
  • classname(Optional) (str) – name of class. If used, requires packagename to be useful
  • -
  • flags(Optional) (int) – Intent flags
  • -
-
Returns:

An object representing an Intent

-
-
-
sample code to show makeIntent
-
-
-
-
-getIntent()
-

Returns the intent that launched the script

-
-
sample code to show getIntent
-
-
-
-
-startActivityForResult(action, uri, type, extras, packagename, classname)
-

Starts an activity and returns the result

- --- - - - - - -
Parameters:
    -
  • action (str) – action
  • -
  • uri(Optional) (str) – uri
  • -
  • type(Optional) (str) – MIME type/subtype of the URI
  • -
  • extras(Optional) (object) – a Map of extras to add to the Intent
  • -
  • packagename(Optional) (str) – name of package. If used, requires classname to be useful
  • -
  • classname(Optional) (str) – name of class. If used, requires packagename to be useful
  • -
-
Returns:

A Map representation of the result Intent

-
-
-
sample code to show startActivityForResult
-
-
-
-
-startActivityForResultIntent(intent)
-

Starts an activity and returns the result

- --- - - - - - -
Parameters:intent (Intent) – Intent in the format as returned from makeIntent
Returns:A Map representation of the result Intent
-
-
sample code to show startActivityForResultIntent
-
-
-
-
-startActivityIntent(intent, wait)
-

Starts an activity

- --- - - - -
Parameters:
    -
  • intent (Intent) – Intent in the format as returned from makeIntent
  • -
  • wait(Optional) (bool) – block until the user exits the started activity
  • -
-
-
-
sample code to show startActivityIntent
-
-
-
-
-startActivity(action, uri, type, extras, wait, packagename, classname)
-

Starts an activity

- --- - - - -
Parameters:
    -
  • action (str) – action
  • -
  • uri(Optional) (str) – uri
  • -
  • type(Optional) (str) – MIME type/subtype of the URI
  • -
  • extras(Optional) (object) – a Map of extras to add to the Intent
  • -
  • wait(Optional) (bool) – block until the user exits the started activity
  • -
  • packagename(Optional) (str) – name of package. If used, requires classname to be useful
  • -
  • classname(Optional) (str) – name of class. If used, requires packagename to be useful
  • -
-
-
-
sample code to show startActivityForResultIntent
-
-
-
-
-

SendBroadcast APIs

-
-
-sendBroadcast(action, uri, type, extras, packagename, classname)
-

Send a broadcast

- --- - - - -
Parameters:
    -
  • action (str) – action
  • -
  • uri(Optional) (str) – uri
  • -
  • type(Optional) (str) – MIME type/subtype of the URI
  • -
  • extras(Optional) (object) – a Map of extras to add to the Intent
  • -
  • packagename(Optional) (str) – name of package. If used, requires classname to be useful
  • -
  • classname(Optional) (str) – name of class. If used, requires packagename to be useful
  • -
-
-
-
sample code to show sendBroadcast
-
-
-
-
-sendBroadcastIntent(intent)
-

Send a broadcast

- --- - - - -
Parameters:intent (Intent) – Intent in the format as returned from makeIntent
-
-
sample code to show sendBroadcastIntent
-
-
-
-
-

Vibrate

-
-
-vibrate(intent)
-

Vibrates the phone or a specified duration in milliseconds

- --- - - - -
Parameters:duration (int) – duration in milliseconds
-
-
sample code to show vibrate
-
-
-
-
-

NetworkStatus

-
-
-getNetworkStatus()
-

Returns the status of network connection

-
-
sample code to show getNetworkStatus
-
-
-
-
-

PackageVersion APIs

-
-
-requiredVersion(requiredVersion)
-

Checks if version of QPython SL4A is greater than or equal to the specified version

- --- - - - - - -
Parameters:requiredVersion (int) – requiredVersion
Returns:true or false
-
-
-
-getPackageVersionCode(packageName)
-

Returns package version code

- --- - - - - - -
Parameters:packageName (str) – packageName
Returns:Package version code
-
-
-
-getPackageVersion(packageName)
-

Returns package version name

- --- - - - - - -
Parameters:packageName (str) – packageName
Returns:Package version name
-
-
sample code to show getPackageVersionCode & getPackageVersion
-
-
-
-
-

System APIs

-
-
-getConstants(classname)
-

Get list of constants (static final fields) for a class

- --- - - - - - -
Parameters:classname (str) – classname
Returns:list
-
-
sample code to show getConstants
-
-
-
-
-environment()
-

A map of various useful environment details

- --- - - - -
Returns:environment map object includes id, display, offset, TZ, SDK, download, appcache, availblocks, blocksize, blockcount, sdcard
-
-
sample code to show environment
-
-
-
-
-log(message)
-

Writes message to logcat

- --- - - - -
Parameters:message (str) – message
-
-
sample code to show log
-
-
-
-
-

SendEmail

-
-
-sendEmail(to, subject, body, attachmentUri)
-

Launches an activity that sends an e-mail message to a given recipient

- --- - - - -
Parameters:
    -
  • to (str) – A comma separated list of recipients
  • -
  • subject (str) – subject
  • -
  • body (str) – mail body
  • -
  • attachmentUri(Optional) (str) – message
  • -
-
-
-
sample code to show sendEmail
-
-
-
-
-

Toast, getInput, getPassword, notify APIs

-
-
-makeToast(message)
-

Displays a short-duration Toast notification

- --- - - - -
Parameters:message (str) – message
-
-
sample code to show makeToast
-
-
-
-
-getInput(title, message)
-

Queries the user for a text input

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
-
-
-
sample code to show getInput
-
-
-
-
-getPassword(title, message)
-

Queries the user for a password

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
-
-
-
sample code to show getPassword
-
-
-
-
-notify(title, message, url)
-

Displays a notification that will be canceled when the user clicks on it

- --- - - - -
Parameters:
    -
  • title (str) – title
  • -
  • message (str) – message
  • -
  • url(optional) (str) – url
  • -
-
-
-
-
::
-
import androidhelper -droid = androidhelper.Android() -droid.notify(‘Hello’,’QPython’,’http://qpython.org’) # you could set the 3rd parameter None also
-
-
-
-
-

ApplicationManagerFacade

-
-

Manager APIs

-
-
-getLaunchableApplications()
-

Returns a list of all launchable application class names

- --- - - - -
Returns:map object
-
-
sample code to show getLaunchableApplications
-
-
-
-
-launch(classname)
-

Start activity with the given class name

- --- - - - -
Parameters:classname (str) – classname
-
-
sample code to show launch
-
-
-
-
-getRunningPackages()
-

Returns a list of packages running activities or services

- --- - - - -
Returns:List of packages running activities
-
-
sample code to show getRunningPackages
-
-
-
-
-forceStopPackage(packageName)
-

Force stops a package

- --- - - - -
Parameters:packageName (str) – packageName
-
-
sample code to show forceStopPackage
-
-
-
-
-
-

CameraFacade

-
-
-cameraCapturePicture(targetPath)
-

Take a picture and save it to the specified path

- --- - - - -
Returns:A map of Booleans autoFocus and takePicture where True indicates success
-
-
-
-cameraInteractiveCapturePicture(targetPath)
-

Starts the image capture application to take a picture and saves it to the specified path

-
-
-
-

CommonIntentsFacade

-
-

Barcode

-
-
-scanBarcode()
-

Starts the barcode scanner

- --- - - - -
Returns:A Map representation of the result Intent
-
-
-
-

View APIs

-
-
-pick(uri)
-

Display content to be picked by URI (e.g. contacts)

- --- - - - -
Returns:A map of result values
-
-
-
-view(uri, type, extras)
-

Start activity with view action by URI (i.e. browser, contacts, etc.)

-
-
-
-viewMap(query)
-

Opens a map search for query (e.g. pizza, 123 My Street)

-
-
-
-viewContacts()
-

Opens the list of contacts

-
-
-
-viewHtml(path)
-

Opens the browser to display a local HTML file

-
-
- -

Starts a search for the given query

-
-
-
-
-

ContactsFacade

-
-
-pickContact()
-

Displays a list of contacts to pick from

- --- - - - -
Returns:A map of result values
-
-
-
-pickPhone()
-

Displays a list of phone numbers to pick from

- --- - - - -
Returns:The selected phone number
-
-
-
-contactsGetAttributes()
-

Returns a List of all possible attributes for contacts

- --- - - - -
Returns:a List of contacts as Maps
-
-
-
-contactsGetIds()
-

Returns a List of all contact IDs

-
-
-
-contactsGet(attributes)
-

Returns a List of all contacts

-
-
-
-contactsGetById(id)
-

Returns contacts by ID

-
-
-
-contactsGetCount()
-

Returns the number of contacts

-
-
-
-queryContent(uri, attributes, selection, selectionArgs, order)
-

Content Resolver Query

- --- - - - -
Returns:result of query as Maps
-
-
-
-queryAttributes(uri)
-

Content Resolver Query Attributes

- --- - - - -
Returns:a list of available columns for a given content uri
-
-
-
-

EventFacade

-
-
-eventClearBuffer()
-

Clears all events from the event buffer

-
-
-
-eventRegisterForBroadcast(category, enqueue)
-

Registers a listener for a new broadcast signal

-
-
-
-eventUnregisterForBroadcast(category)
-

Stop listening for a broadcast signal

-
-
-
-eventGetBrodcastCategories()
-

Lists all the broadcast signals we are listening for

-
-
-
-eventPoll(number_of_events)
-

Returns and removes the oldest n events (i.e. location or sensor update, etc.) from the event buffer

- --- - - - -
Returns:A List of Maps of event properties
-
-
-
-eventWaitFor(eventName, timeout)
-

Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer

- --- - - - -
Returns:Map of event properties
-
-
-
-eventWait(timeout)
-

Blocks until an event occurs. The returned event is removed from the buffer

- --- - - - -
Returns:Map of event properties
-
-
-
-eventPost(name, data, enqueue)
-

Post an event to the event queue

-
-
-
-rpcPostEvent(name, data)
-

Post an event to the event queue

-
-
-
-receiveEvent()
-

Returns and removes the oldest event (i.e. location or sensor update, etc.) from the event buffer

- --- - - - -
Returns:Map of event properties
-
-
-
-waitForEvent(eventName, timeout)
-

Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer

- --- - - - -
Returns:Map of event properties
-
-
-
-startEventDispatcher(port)
-

Opens up a socket where you can read for events posted

-
-
-
-stopEventDispatcher()
-

Stops the event server, you can’t read in the port anymore

-
-
-
-

LocationFacade

-
-

Providers APIs

-
-
-locationProviders()
-

Returns availables providers on the phone

-
-
-
-locationProviderEnabled(provider)
-

Ask if provider is enabled

-
-
-
-

Location APIs

-
-
-startLocating(minDistance, minUpdateDistance)
-

Starts collecting location data

-
-
-
-readLocation()
-

Returns the current location as indicated by all available providers

- --- - - - -
Returns:A map of location information by provider
-
-
-
-stopLocating()
-

Stops collecting location data

-
-
-
-getLastKnownLocation()
-

Returns the last known location of the device

- --- - - - -
Returns:A map of location information by provider
-
-

sample code

-
Droid = androidhelper.Android()
-location = Droid.getLastKnownLocation().result
-location = location.get('network', location.get('gps'))
-
-
-
-
-

GEO

-
-
-geocode(latitude, longitude, maxResults)
-

Returns a list of addresses for the given latitude and longitude

- --- - - - -
Returns:A list of addresses
-
-
-
-
-

PhoneFacade

-
-

PhoneStat APIs

-
-
-startTrackingPhoneState()
-

Starts tracking phone state

-
-
-
-readPhoneState()
-

Returns the current phone state and incoming number

- --- - - - -
Returns:A Map of “state” and “incomingNumber”
-
-
-
-stopTrackingPhoneState()
-

Stops tracking phone state

-
-
-
-

Call & Dia APIs

-
-
-phoneCall(uri)
-

Calls a contact/phone number by URI

-
-
-
-phoneCallNumber(number)
-

Calls a phone number

-
-
-
-phoneDial(uri)
-

Dials a contact/phone number by URI

-
-
-
-phoneDialNumber(number)
-

Dials a phone number

-
-
-
-

Get information APIs

-
-
-getCellLocation()
-

Returns the current cell location

-
-
-
-getNetworkOperator()
-

Returns the numeric name (MCC+MNC) of current registered operator

-
-
-
-getNetworkOperatorName()
-

Returns the alphabetic name of current registered operator

-
-
-
-getNetworkType()
-

Returns a the radio technology (network type) currently in use on the device

-
-
-
-getPhoneType()
-

Returns the device phone type

-
-
-
-getSimCountryIso()
-

Returns the ISO country code equivalent for the SIM provider’s country code

-
-
-
-getSimOperator()
-

Returns the MCC+MNC (mobile country code + mobile network code) of the provider of the SIM. 5 or 6 decimal digits

-
-
-
-getSimOperatorName()
-

Returns the Service Provider Name (SPN)

-
-
-
-getSimSerialNumber()
-

Returns the serial number of the SIM, if applicable. Return null if it is unavailable

-
-
-
-getSimState()
-

Returns the state of the device SIM card

-
-
-
-getSubscriberId()
-

Returns the unique subscriber ID, for example, the IMSI for a GSM phone. Return null if it is unavailable

-
-
-
-getVoiceMailAlphaTag()
-

Retrieves the alphabetic identifier associated with the voice mail number

-
-
-
-getVoiceMailNumber()
-

Returns the voice mail number. Return null if it is unavailable

-
-
-
-checkNetworkRoaming()
-

Returns true if the device is considered roaming on the current network, for GSM purposes

-
-
-
-getDeviceId()
-

Returns the unique device ID, for example, the IMEI for GSM and the MEID for CDMA phones. Return null if device ID is not available

-
-
-
-getDeviceSoftwareVersion()
-

Returns the software version number for the device, for example, the IMEI/SV for GSM phones. Return null if the software version is not available

-
-
-
-getLine1Number()
-

Returns the phone number string for line 1, for example, the MSISDN for a GSM phone. Return null if it is unavailable

-
-
-
-getNeighboringCellInfo()
-

Returns the neighboring cell information of the device

-
-
-
-
-

MediaRecorderFacade

-
-

Audio

-
-
-recorderStartMicrophone(targetPath)
-

Records audio from the microphone and saves it to the given location

-
-
-
-

Video APIs

-
-
-recorderStartVideo(targetPath, duration, videoSize)
-

Records video from the camera and saves it to the given location. -Duration specifies the maximum duration of the recording session. -If duration is 0 this method will return and the recording will only be stopped -when recorderStop is called or when a scripts exits. -Otherwise it will block for the time period equal to the duration argument. -videoSize: 0=160x120, 1=320x240, 2=352x288, 3=640x480, 4=800x480.

-
-
-
-recorderCaptureVideo(targetPath, duration, recordAudio)
-

Records video (and optionally audio) from the camera and saves it to the given location. -Duration specifies the maximum duration of the recording session. -If duration is not provided this method will return immediately and the recording will only be stopped -when recorderStop is called or when a scripts exits. -Otherwise it will block for the time period equal to the duration argument.

-
-
-
-startInteractiveVideoRecording(path)
-

Starts the video capture application to record a video and saves it to the specified path

-
-
-
-

Stop

-
-
-recorderStop()
-

Stops a previously started recording

-
-
-
-
-

SensorManagerFacade

-
-

Start & Stop

-
-
-startSensingTimed(sensorNumber, delayTime)
-

Starts recording sensor data to be available for polling

-
-
-
-startSensingThreshold(ensorNumber, threshold, axis)
-

Records to the Event Queue sensor data exceeding a chosen threshold

-
-
-
-startSensing(sampleSize)
-

Starts recording sensor data to be available for polling

-
-
-
-stopSensing()
-

Stops collecting sensor data

-
-
-
-

Read data APIs

-
-
-readSensors()
-

Returns the most recently recorded sensor data

-
-
-
-sensorsGetAccuracy()
-

Returns the most recently received accuracy value

-
-
-
-sensorsGetLight()
-

Returns the most recently received light value

-
-
-
-sensorsReadAccelerometer()
-

Returns the most recently received accelerometer values

- --- - - - -
Returns:a List of Floats [(acceleration on the) X axis, Y axis, Z axis]
-
-
-
-sensorsReadMagnetometer()
-

Returns the most recently received magnetic field values

- --- - - - -
Returns:a List of Floats [(magnetic field value for) X axis, Y axis, Z axis]
-
-
-
-sensorsReadOrientation()
-

Returns the most recently received orientation values

- --- - - - -
Returns:a List of Doubles [azimuth, pitch, roll]
-
-

sample code

-
Droid = androidhelper.Android()
-Droid.startSensingTimed(1, 250)
-sensor = Droid.sensorsReadOrientation().result
-Droid.stopSensing()
-
-
-
-
-
-

SettingsFacade

-
-

Screen

-
-
-setScreenTimeout(value)
-

Sets the screen timeout to this number of seconds

- --- - - - -
Returns:The original screen timeout
-
-
-
-getScreenTimeout()
-

Gets the screen timeout

- --- - - - -
Returns:the current screen timeout in seconds
-
-
-
-

AirplanerMode

-
-
-checkAirplaneMode()
-

Checks the airplane mode setting

- --- - - - -
Returns:True if airplane mode is enabled
-
-
-
-toggleAirplaneMode(enabled)
-

Toggles airplane mode on and off

- --- - - - -
Returns:True if airplane mode is enabled
-
-
-
-

Ringer Silent Mode

-
-
-checkRingerSilentMode()
-

Checks the ringer silent mode setting

- --- - - - -
Returns:True if ringer silent mode is enabled
-
-
-
-toggleRingerSilentMode(enabled)
-

Toggles ringer silent mode on and off

- --- - - - -
Returns:True if ringer silent mode is enabled
-
-
-
-

Vibrate Mode

-
-
-toggleVibrateMode(enabled)
-

Toggles vibrate mode on and off. If ringer=true then set Ringer setting, else set Notification setting

- --- - - - -
Returns:True if vibrate mode is enabled
-
-
-
-getVibrateMode(ringer)
-

Checks Vibration setting. If ringer=true then query Ringer setting, else query Notification setting

- --- - - - -
Returns:True if vibrate mode is enabled
-
-
-
-

Ringer & Media Volume

-
-
-getMaxRingerVolume()
-

Returns the maximum ringer volume

-
-
-
-getRingerVolume()
-

Returns the current ringer volume

-
-
-
-setRingerVolume(volume)
-

Sets the ringer volume

-
-
-
-getMaxMediaVolume()
-

Returns the maximum media volume

-
-
-
-getMediaVolume()
-

Returns the current media volume

-
-
-
-setMediaVolume(volume)
-

Sets the media volume

-
-
-
-

Screen Brightness

-
-
-getScreenBrightness()
-

Returns the screen backlight brightness

- --- - - - -
Returns:the current screen brightness between 0 and 255
-
-
-
-setScreenBrightness(value)
-

Sets the the screen backlight brightness

- --- - - - -
Returns:the original screen brightness
-
-
-
-checkScreenOn()
-

Checks if the screen is on or off (requires API level 7)

- --- - - - -
Returns:True if the screen is currently on
-
-
-
-
-

SmsFacade

-
-
-smsSend(destinationAddress, text)
-

Sends an SMS

- --- - - - -
Parameters:
    -
  • destinationAddress (str) – typically a phone number
  • -
  • text (str) –
  • -
-
-
-
-
-smsGetMessageCount(unreadOnly, folder)
-

Returns the number of messages

- --- - - - -
Parameters:
    -
  • unreadOnly (bool) – typically a phone number
  • -
  • folder(optional) (str) – default “inbox”
  • -
-
-
-
-
-smsGetMessageIds(unreadOnly, folder)
-

Returns a List of all message IDs

- --- - - - -
Parameters:
    -
  • unreadOnly (bool) – typically a phone number
  • -
  • folder(optional) (str) – default “inbox”
  • -
-
-
-
-
-smsGetMessages(unreadOnly, folder, attributes)
-

Returns a List of all messages

- --- - - - - - -
Parameters:
    -
  • unreadOnly (bool) – typically a phone number
  • -
  • folder (str) – default “inbox”
  • -
  • attributes(optional) (list) – attributes
  • -
-
Returns:

a List of messages as Maps

-
-
-
-
-smsGetMessageById(id, attributes)
-

Returns message attributes

- --- - - - - - -
Parameters:
    -
  • id (int) – message ID
  • -
  • attributes(optional) (list) – attributes
  • -
-
Returns:

a List of messages as Maps

-
-
-
-
-smsGetAttributes()
-

Returns a List of all possible message attributes

-
-
-
-smsDeleteMessage(id)
-

Deletes a message

- --- - - - - - -
Parameters:id (int) – message ID
Returns:True if the message was deleted
-
-
-
-smsMarkMessageRead(ids, read)
-

Marks messages as read

- --- - - - - - -
Parameters:
    -
  • ids (list) – List of message IDs to mark as read
  • -
  • read (bool) – true or false
  • -
-
Returns:

number of messages marked read

-
-
-
-
-

SpeechRecognitionFacade

-
-
-recognizeSpeech(prompt, language, languageModel)
-

Recognizes user’s speech and returns the most likely result

- --- - - - - - -
Parameters:
    -
  • prompt(optional) (str) – text prompt to show to the user when asking them to speak
  • -
  • language(optional) (str) – language override to inform the recognizer that it should expect speech in a language different than the one set in the java.util.Locale.getDefault()
  • -
  • languageModel(optional) (str) – informs the recognizer which speech model to prefer (see android.speech.RecognizeIntent)
  • -
-
Returns:

An empty string in case the speech cannot be recongnized

-
-
-
-
-

ToneGeneratorFacade

-
-
-generateDtmfTones(phoneNumber, toneDuration)
-

Generate DTMF tones for the given phone number

- --- - - - -
Parameters:
    -
  • phoneNumber (str) – phone number
  • -
  • toneDuration(optional) (int) – default 100, duration of each tone in milliseconds
  • -
-
-
-
-
-

WakeLockFacade

-
-
-wakeLockAcquireFull()
-

Acquires a full wake lock (CPU on, screen bright, keyboard bright)

-
-
-
-wakeLockAcquirePartial()
-

Acquires a partial wake lock (CPU on)

-
-
-
-wakeLockAcquireBright()
-

Acquires a bright wake lock (CPU on, screen bright)

-
-
-
-wakeLockAcquireDim()
-

Acquires a dim wake lock (CPU on, screen dim)

-
-
-
-wakeLockRelease()
-

Releases the wake lock

-
-
-
-

WifiFacade

-
-
-wifiGetScanResults()
-

Returns the list of access points found during the most recent Wifi scan

-
-
-
-wifiLockAcquireFull()
-

Acquires a full Wifi lock

-
-
-
-wifiLockAcquireScanOnly()
-

Acquires a scan only Wifi lock

-
-
-
-wifiLockRelease()
-

Releases a previously acquired Wifi lock

-
-
-
-wifiStartScan()
-

Starts a scan for Wifi access points

- --- - - - -
Returns:True if the scan was initiated successfully
-
-
-
-checkWifiState()
-

Checks Wifi state

- --- - - - -
Returns:True if Wifi is enabled
-
-
-
-toggleWifiState(enabled)
-

Toggle Wifi on and off

- --- - - - - - -
Parameters:enabled(optional) (bool) – enabled
Returns:True if Wifi is enabled
-
-
-
-wifiDisconnect()
-

Disconnects from the currently active access point

- --- - - - -
Returns:True if the operation succeeded
-
-
-
-wifiGetConnectionInfo()
-

Returns information about the currently active access point

-
-
-
-wifiReassociate()
-

Returns information about the currently active access point

- --- - - - -
Returns:True if the operation succeeded
-
-
-
-wifiReconnect()
-

Reconnects to the currently active access point

- --- - - - -
Returns:True if the operation succeeded
-
-
-
-

BatteryManagerFacade

-
-
-readBatteryData()
-

Returns the most recently recorded battery data

-
-
-
-batteryStartMonitoring()
-

Starts tracking battery state

-
-
-
-batteryStopMonitoring()
-

Stops tracking battery state

-
-
-
-batteryGetStatus()
-

Returns the most recently received battery status data: -1 - unknown; -2 - charging; -3 - discharging; -4 - not charging; -5 - full

-
-
-
-batteryGetHealth()
-

Returns the most recently received battery health data: -1 - unknown; -2 - good; -3 - overheat; -4 - dead; -5 - over voltage; -6 - unspecified failure

-
-
-
-batteryGetPlugType()
-

Returns the most recently received plug type data: --1 - unknown -0 - unplugged -1 - power source is an AC charger -2 - power source is a USB port

-
-
-
-batteryCheckPresent()
-

Returns the most recently received battery presence data

-
-
-
-batteryGetLevel()
-

Returns the most recently received battery level (percentage)

-
-
-
-batteryGetVoltage()
-

Returns the most recently received battery voltage

-
-
-
-batteryGetTemperature()
-

Returns the most recently received battery temperature

-
-
-
-batteryGetTechnology()
-

Returns the most recently received battery technology data

-
-
-
-

ActivityResultFacade

-
-
-setResultBoolean(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultByte(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultShort(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultChar(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultInteger(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultLong(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultFloat(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultDouble(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultString(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultBooleanArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultByteArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultShortArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultCharArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultIntegerArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultLongArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultFloatArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultDoubleArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultStringArray(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-setResultSerializable(resultCode, resultValue)
-

Sets the result of a script execution. Whenever the script APK is called via startActivityForResult(), -the resulting intent will contain SCRIPT_RESULT extra with the given value

- --- - - - -
Parameters:
    -
  • resultCode (int) –
  • -
  • resultValue (byte) –
  • -
-
-
-
-
-

MediaPlayerFacade

-
-

Control

-
-
-mediaPlay(url, tag, play)
-

Open a media file

- --- - - - - - -
Parameters:
    -
  • url (str) – url of media resource
  • -
  • tag(optional) (str) – string identifying resource (default=default)
  • -
  • play(optional) (bool) – start playing immediately
  • -
-
Returns:

true if play successful

-
-
-
-
-mediaPlayPause(tag)
-

pause playing media file

- --- - - - - - -
Parameters:tag (str) – string identifying resource (default=default)
Returns:true if successful
-
-
-
-mediaPlayStart(tag)
-

start playing media file

- --- - - - - - -
Parameters:tag (str) – string identifying resource (default=default)
Returns:true if successful
-
-
-
-mediaPlayClose(tag)
-

Close media file

- --- - - - - - -
Parameters:tag (str) – string identifying resource (default=default)
Returns:true if successful
-
-
-
-mediaIsPlaying(tag)
-

Checks if media file is playing

- --- - - - - - -
Parameters:tag (str) – string identifying resource (default=default)
Returns:true if successful
-
-
-
-mediaPlaySetLooping(enabled, tag)
-

Set Looping

- --- - - - - - -
Parameters:
    -
  • enabled (bool) – default true
  • -
  • tag (str) – string identifying resource (default=default)
  • -
-
Returns:

True if successful

-
-
-
-
-mediaPlaySeek(msec, tag)
-

Seek To Position

- --- - - - - - -
Parameters:
    -
  • msec (int) – default true
  • -
  • tag (str) – string identifying resource (default=default)
  • -
-
Returns:

New Position (in ms)

-
-
-
-
-

Get Information

-
-
-mediaPlayInfo(tag)
-

Information on current media

- --- - - - - - -
Parameters:tag (str) – string identifying resource (default=default)
Returns:Media Information
-
-
-
-mediaPlayList()
-

Lists currently loaded media

- --- - - - -
Returns:List of Media Tags
-
-
-
-
-

PreferencesFacade

-
-
-prefGetValue(key, filename)
-

Read a value from shared preferences

- --- - - - -
Parameters:
    -
  • key (str) – key
  • -
  • filename(optional) (str) – Desired preferences file. If not defined, uses the default Shared Preferences.
  • -
-
-
-
-
-prefPutValue(key, value, filename)
-

Write a value to shared preferences

- --- - - - -
Parameters:
    -
  • key (str) – key
  • -
  • value (str) – value
  • -
  • filename(optional) (str) – Desired preferences file. If not defined, uses the default Shared Preferences.
  • -
-
-
-
-
-prefGetAll(filename)
-

Get list of Shared Preference Values

- --- - - - -
Parameters:filename(optional) (str) – Desired preferences file. If not defined, uses the default Shared Preferences.
-
-
-
-

QPyInterfaceFacade

-
-
-executeQPy(script)
-

Execute a qpython script by absolute path

- --- - - - - - -
Parameters:script (str) – The absolute path of the qpython script
Returns:bool
-
-
-
-

TextToSpeechFacade

-
-
-ttsSpeak(message)
-

Speaks the provided message via TTS

- --- - - - -
Parameters:message (str) – message
-
-
-
-ttsIsSpeaking()
-

Returns True if speech is currently in progress

-
-
-
-

EyesFreeFacade

-
-
-ttsSpeak(message)
-

Speaks the provided message via TTS

- --- - - - -
Parameters:message (str) – message
-
-
-
-

BluetoothFacade

-
-
-bluetoothActiveConnections()
-

Returns active Bluetooth connections

-
-
-
-bluetoothWriteBinary(base64, connID)
-

Send bytes over the currently open Bluetooth connection

- --- - - - -
Parameters:
    -
  • base64 (str) – A base64 encoded String of the bytes to be sent
  • -
  • connID(optional) (str) – Connection id
  • -
-
-
-
-
-bluetoothReadBinary(bufferSize, connID)
-

Read up to bufferSize bytes and return a chunked, base64 encoded string

- --- - - - -
Parameters:
    -
  • bufferSize (int) – default 4096
  • -
  • connID(optional) (str) – Connection id
  • -
-
-
-
-
-bluetoothConnect(uuid, address)
-

Connect to a device over Bluetooth. Blocks until the connection is established or fails

- --- - - - - - -
Parameters:
    -
  • uuid (str) – The UUID passed here must match the UUID used by the server device
  • -
  • address(optional) (str) – The user will be presented with a list of discovered devices to choose from if an address is not provided
  • -
-
Returns:

True if the connection was established successfully

-
-
-
-
-bluetoothAccept(uuid, timeout)
-

Listens for and accepts a Bluetooth connection. Blocks until the connection is established or fails

- --- - - - -
Parameters:
    -
  • uuid (str) – The UUID passed here must match the UUID used by the server device
  • -
  • timeout (int) – How long to wait for a new connection, 0 is wait for ever (default=0)
  • -
-
-
-
-
-bluetoothMakeDiscoverable(duration)
-

Requests that the device be discoverable for Bluetooth connections

- --- - - - -
Parameters:duration (int) – period of time, in seconds, during which the device should be discoverable (default=300)
-
-
-
-bluetoothWrite(ascii, connID)
-

Sends ASCII characters over the currently open Bluetooth connection

- --- - - - -
Parameters:
    -
  • ascii (str) – text
  • -
  • connID (str) – Connection id
  • -
-
-
-
-
-bluetoothReadReady(connID)
-

Sends ASCII characters over the currently open Bluetooth connection

- --- - - - -
Parameters:
    -
  • ascii (str) – text
  • -
  • connID (str) – Connection id
  • -
-
-
-
-
-bluetoothRead(bufferSize, connID)
-

Read up to bufferSize ASCII characters

- --- - - - -
Parameters:
    -
  • bufferSize (int) – default=4096
  • -
  • connID(optional) (str) – Connection id
  • -
-
-
-
-
-bluetoothReadLine(connID)
-

Read the next line

- --- - - - -
Parameters:connID(optional) (str) – Connection id
-
-
-
-bluetoothGetRemoteDeviceName(address)
-

Queries a remote device for it’s name or null if it can’t be resolved

- --- - - - -
Parameters:address (str) – Bluetooth Address For Target Device
-
-
-
-bluetoothGetLocalName()
-

Gets the Bluetooth Visible device name

-
-
-
-bluetoothSetLocalName(name)
-

Sets the Bluetooth Visible device name, returns True on success

- --- - - - -
Parameters:name (str) – New local name
-
-
-
-bluetoothGetScanMode()
-

Gets the scan mode for the local dongle. -Return values: --1 when Bluetooth is disabled. -0 if non discoverable and non connectable. -1 connectable non discoverable. -3 connectable and discoverable.

-
-
-
-bluetoothGetConnectedDeviceName(connID)
-

Returns the name of the connected device

- --- - - - -
Parameters:connID (str) – Connection id
-
-
-
-checkBluetoothState()
-

Checks Bluetooth state

- --- - - - -
Returns:True if Bluetooth is enabled
-
-
-
-toggleBluetoothState(enabled, prompt)
-

Toggle Bluetooth on and off

- --- - - - - - -
Parameters:
    -
  • enabled (bool) –
  • -
  • prompt (str) – Prompt the user to confirm changing the Bluetooth state, default=true
  • -
-
Returns:

True if Bluetooth is enabled

-
-
-
-
-bluetoothStop(connID)
-

Stops Bluetooth connection

- --- - - - -
Parameters:connID (str) – Connection id
-
-
-
-bluetoothGetLocalAddress()
-

Returns the hardware address of the local Bluetooth adapter

-
-
-
-bluetoothDiscoveryStart()
-

Start the remote device discovery process

- --- - - - -
Returns:true on success, false on error
-
-
-
-bluetoothDiscoveryCancel()
-

Cancel the current device discovery process

- --- - - - -
Returns:true on success, false on error
-
-
-
-bluetoothIsDiscovering()
-

Return true if the local Bluetooth adapter is currently in the device discovery process

-
-
-
-

SignalStrengthFacade

-
-
-startTrackingSignalStrengths()
-

Starts tracking signal strengths

-
-
-
-readSignalStrengths()
-

Returns the current signal strengths

- --- - - - -
Returns:A map of gsm_signal_strength
-
-
-
-stopTrackingSignalStrengths()
-

Stops tracking signal strength

-
-
-
-

WebCamFacade

-
-
-webcamStart(resolutionLevel, jpegQuality, port)
-

Starts an MJPEG stream and returns a Tuple of address and port for the stream

- --- - - - -
Parameters:
    -
  • resolutionLevel (int) – increasing this number provides higher resolution (default=0)
  • -
  • jpegQuality (int) – a number from 0-10 (default=20)
  • -
  • port (int) – If port is specified, the webcam service will bind to port, otherwise it will pick any available port (default=0)
  • -
-
-
-
-
-webcamAdjustQuality(resolutionLevel, jpegQuality)
-

Adjusts the quality of the webcam stream while it is running

- --- - - - -
Parameters:
    -
  • resolutionLevel (int) – increasing this number provides higher resolution (default=0)
  • -
  • jpegQuality (int) – a number from 0-10 (default=20)
  • -
-
-
-
-
-cameraStartPreview(resolutionLevel, jpegQuality, filepath)
-

Start Preview Mode. Throws ‘preview’ events

- --- - - - - - -
Parameters:
    -
  • resolutionLevel (int) – increasing this number provides higher resolution (default=0)
  • -
  • jpegQuality (int) – a number from 0-10 (default=20)
  • -
  • filepath (str) – Path to store jpeg files
  • -
-
Returns:

True if successful

-
-
-
-
-cameraStopPreview()
-

Stop the preview mode

-
-
-
-

UiFacade

-
-

Dialog

-
-
-dialogCreateInput(title, message, defaultText, inputType)
-

Create a text input dialog

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
  • defaultText(optional) (str) – text to insert into the input box
  • -
  • inputType(optional) (str) – type of input data, ie number or text
  • -
-
-
-
-
-dialogCreatePassword(title, message)
-

Create a password input dialog

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
-
-
-
-
-dialogGetInput(title, message, defaultText)
-

Create a password input dialog

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
  • defaultText(optional) (str) – text to insert into the input box
  • -
-
-
-
-
-dialogGetPassword(title, message)
-

Queries the user for a password

- --- - - - -
Parameters:
    -
  • title (str) – title of the password box
  • -
  • message (str) – message to display above the input box
  • -
-
-
-
-
-dialogCreateSeekBar(start, maximum, title)
-

Create seek bar dialog

- --- - - - -
Parameters:
    -
  • start (int) – default=50
  • -
  • maximum (int) – default=100
  • -
  • title (int) – title
  • -
-
-
-
-
-dialogCreateTimePicker(hour, minute, is24hour)
-

Create time picker dialog

- --- - - - -
Parameters:
    -
  • hour (int) – default=0
  • -
  • miute (int) – default=0
  • -
  • is24hour (bool) – default=false
  • -
-
-
-
-
-dialogCreateDatePicker(year, month, day)
-

Create date picker dialog

- --- - - - -
Parameters:
    -
  • year (int) – default=1970
  • -
  • month (int) – default=1
  • -
  • day (int) – default=1
  • -
-
-
-
-
-

NFC

-

Data structs -QPython NFC json result

-
{
-"role": <role>, # could be self/master/slave
-"stat": <stat>, # could be ok / fail / cancl
-"message": <message get>
-}
-
-
-

APIs

-
-
-dialogCreateNFCBeamMaster(title, message, inputType)
-

Create a dialog where you could create a qpython beam master

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
  • inputType(optional) (str) – type of input data, ie number or text
  • -
-
-
-
-
-NFCBeamMessage(content, title, message)
-

Create a dialog where you could create a qpython beam master

- --- - - - -
Parameters:
    -
  • content (str) – message you want to sent
  • -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
  • inputType(optional) (str) – type of input data, ie number or text
  • -
-
-
-
-
-dialogCreateNFCBeamSlave(title, message)
-

Create a qpython beam slave

- --- - - - -
Parameters:
    -
  • title (str) – title of the input box
  • -
  • message (str) – message to display above the input box
  • -
-
-
-
-
-

Progress

-
-
-dialogCreateSpinnerProgress(message, maximumProgress)
-

Create a spinner progress dialog

- --- - - - -
Parameters:
    -
  • message(optional) (str) – message
  • -
  • maximunProgress(optional) (int) – dfault=100
  • -
-
-
-
-
-dialogSetCurrentProgress(current)
-

Set progress dialog current value

- --- - - - -
Parameters:current (int) – current
-
-
-
-dialogSetMaxProgress(max)
-

Set progress dialog maximum value

- --- - - - -
Parameters:max (int) – max
-
-
-
-dialogCreateHorizontalProgress(title, message, maximumProgress)
-

Create a horizontal progress dialog

- --- - - - -
Parameters:
    -
  • title(optional) (str) – title
  • -
  • message(optional) (str) – message
  • -
  • maximunProgress(optional) (int) – dfault=100
  • -
-
-
-
-
-

Alert

-
-
-dialogCreateAlert(title, message)
-

Create alert dialog

- --- - - - -
Parameters:
    -
  • title(optional) (str) – title
  • -
  • message(optional) (str) – message
  • -
  • maximunProgress(optional) (int) – dfault=100
  • -
-
-
-
-
-

Dialog Control

-
-
-dialogSetPositiveButtonText(text)
-

Set alert dialog positive button text

- --- - - - -
Parameters:text (str) – text
-
-
-
-dialogSetNegativeButtonText(text)
-

Set alert dialog negative button text

- --- - - - -
Parameters:text (str) – text
-
-
-
-dialogSetNeutralButtonText(text)
-

Set alert dialog button text

- --- - - - -
Parameters:text (str) – text
-
-
-
-dialogSetItems(items)
-

Set alert dialog list items

- --- - - - -
Parameters:items (list) – items
-
-
-
-dialogSetSingleChoiceItems(items, selected)
-

Set alert dialog list items

- --- - - - -
Parameters:
    -
  • items (list) – items
  • -
  • selected (int) – selected item index (default=0)
  • -
-
-
-
-
-dialogSetMultiChoiceItems(items, selected)
-

Set dialog multiple choice items and selection

- --- - - - -
Parameters:
    -
  • items (list) – items
  • -
  • selected (int) – selected item index (default=0)
  • -
-
-
-
-
-addContextMenuItem(label, event, eventData)
-

Adds a new item to context menu

- --- - - - -
Parameters:
    -
  • label (str) – label for this menu item
  • -
  • event (str) – event that will be generated on menu item click
  • -
  • eventData (object) – event object
  • -
-
-
-
-
-addOptionsMenuItem(label, event, eventData, iconName)
-

Adds a new item to context menu

- --- - - - -
Parameters: -
-
-
-
-dialogGetResponse()
-

Returns dialog response

-
-
-
-dialogGetSelectedItems()
-

This method provides list of items user selected

-
-
-
-dialogDismiss()
-

Dismiss dialog

-
-
-
-dialogShow()
-

Show dialog

-
-
-
-

Layout

-
-
-fullShow(layout)
-

Show Full Screen

- --- - - - -
Parameters:layout (string) – String containing View layout
-
-
-
-fullDismiss()
-

Dismiss Full Screen

-
-
-
-fullQuery()
-

Get Fullscreen Properties

-
-
-
-fullQueryDetail(id)
-

Get fullscreen properties for a specific widget

- --- - - - -
Parameters:id (str) – id of layout widget
-
-
-
-fullSetProperty(id)
-

Set fullscreen widget property

- --- - - - -
Parameters:
    -
  • id (str) – id of layout widget
  • -
  • property (str) – name of property to set
  • -
  • value (str) – value to set property to
  • -
-
-
-
-
-fullSetList(id, list)
-

Attach a list to a fullscreen widget

- --- - - - -
Parameters:
    -
  • id (str) – id of layout widget
  • -
  • list (list) – List to set
  • -
-
-
-
-
-fullKeyOverride(keycodes, enable)
-

Override default key actions

- --- - - - -
Parameters:
    -
  • keycodes (str) – id of layout widget
  • -
  • enable (bool) – List to set (default=true)
  • -
-
-
-
-
-

WebView

-
-
-webViewShow()
-

Display a WebView with the given URL

- --- - - - -
Parameters:
    -
  • url (str) – url
  • -
  • wait(optional) (bool) – block until the user exits the WebView
  • -
-
-
-
-
-
-

USB Host Serial Facade

-

QPython 1.3.1+ and QPython3 1.0.3+ contains this feature

-

SL4A Facade for USB Serial devices by Android USB Host API.

-

It control the USB-Serial like devices -from Andoroid which has USB Host Controller .

-

The sample -demonstration is also available at youtube video

-
-

Requirements

-
    -
  • Android device which has USB Host controller (and enabled in that firmware).

    -
  • -
  • Android 4.0 (API14) or later.

    -
  • -
  • USB Serial devices (see [Status](#Status)).

    -
  • -
  • USB Serial devices were not handled by Android kernel.

    -

    > I heard some android phone handle USB Serial devices -> make /dev/ttyUSB0 in kernel level. -> In this case, Android does not be able to handle the device -> from OS level.

    -

    please check Android Applications be able to grab the target USB Devices, -such as USB Device Info.

    -
  • -
-
-
-

Status

-
    -
  • probably work with USB CDC, like FTDI, Arduino or else.

    -
  • -
  • 2012/09/10: work with 78K0F0730 device (new RL78) with Tragi BIOS board.

    -

    M78K0F0730

    -
  • -
  • 2012/09/24: work with some pl2303 devcies.

    -
  • -
-
-
-

Author

-

This facade developped by Kuri65536 -you can see the commit log in it.

-
-
-

APIs

-
-
-usbserialGetDeviceList()
-

Returns USB devices reported by USB Host API.

- --- - - - -
Returns:Returns “Map of id and string information Map<String, String>
-
-
-
-usbserialDisconnect(connID)
-

Disconnect all USB-device

- --- - - - -
Parameters:connID (str) – connection ID
-
-
-
-usbserialActiveConnections()
-

Returns active USB-device connections.

- --- - - - -
Returns:Returns “Active USB-device connections by Map UUID vs device-name.”
-
-
-
-usbserialWriteBinary(base64, connID)
-

Send bytes over the currently open USB Serial connection.

- --- - - - -
Parameters:
    -
  • base64 (str) –
  • -
  • connId (str) –
  • -
-
-
-
-
-usbserialReadBinary(bufferSize, connID)
-

Read up to bufferSize bytes and return a chunked, base64 encoded string

- --- - - - -
Parameters:
    -
  • bufferSize (int) –
  • -
  • connId (str) –
  • -
-
-
-
-
-usbserialConnect(hash, options)
-

Connect to a device with USB-Host. request the connection and exit

- --- - - - - - -
Parameters:
    -
  • hash (str) –
  • -
  • options (str) –
  • -
-
Returns:

Returns messages the request status

-
-
-
-
-usbserialHostEnable()
-

Requests that the host be enable for USB Serial connections.

- --- - - - -
Returns:True if the USB Device is accesible
-
-
-
-usbserialWrite(String ascii, String connID)
-

Sends ASCII characters over the currently open USB Serial connection

- --- - - - -
Parameters:
    -
  • ascii (str) –
  • -
  • connID (str) –
  • -
-
-
-
-
-usbserialReadReady(connID)
-
--- - - - - - -
Parameters:connID (str) –
Returns:True if the next read is guaranteed not to block
-
-
-
-usbserialRead(connID, bufferSize)
-

Read up to bufferSize ASCII characters.

- --- - - - -
Parameters:
    -
  • connID (str) –
  • -
  • bufferSize (int) –
  • -
-
-
-
-
-usbserialGetDeviceName(connID)
-

Queries a remote device for it’s name or null if it can’t be resolved

- --- - - - -
Parameters:connID (str) –
-
-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide_contributors.html b/docs/en/guide_contributors.html deleted file mode 100644 index ced42de5..00000000 --- a/docs/en/guide_contributors.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - -Welcome contribute — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

Welcome contribute

-

Thanks for supporting this project, QPython is a greate project, and we hope you join us to help with make it more greater.

-

Please send email to us(support at qpython.org) to introduce youself briefly, and which part do you want to contribute.

-

Then we will consider to invite you to join the qpython-collaborator group.

-
- -
-

How to contribute documentation

-
-
-

How to translate

-
-
-

How to launch a local QPython users community

-
-

How to organise a local qpython user sharing event

-
-
-
-

How to became the developer member

-
-

How to develop qpython built-in programs

-
-
-
-

How to sponsor QPython project

-

More detail coming soon…

-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide_contributors_test.html b/docs/en/guide_contributors_test.html deleted file mode 100644 index 692d0426..00000000 --- a/docs/en/guide_contributors_test.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - -Join the tester community — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-

QPython is keeping develop! -If you are interested about what we are doing and want to make some contribution, follow this guide to make this project better!

-
-

Join the tester community

-

We create a G+ community where you could report bugs or offer suggestions -> QPython tester G+ community(For QPython testers)

-

Join us now!

-../images/1.png -
-
-

Become a tester

-

After join the tester community, you could become a tester! -Click this and become a tester -> I’m ready for test

-../images/2.png -
-
-

Report or suggest

-

If you find out any bugs or have any cool idea about QPython, please let us know about it. -You could write down your suggestion or bug report on the community.

-../images/3.png -
-
-

Feedback

-

Send your feedback to QPython using the contact information: support@qpython.org

-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide_developers.html b/docs/en/guide_developers.html deleted file mode 100644 index cb139273..00000000 --- a/docs/en/guide_developers.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - -Android — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

Android

-

Android part offers the common Python user interaction functions, like console, editor, file browsing, QRCode reader etc.

-
-

Console

-
-
-

Editor

-
-
-

File browsing

-
-
-

QRCode reader

-
-
-
-

QSL4A

-

QSL4A is the folk of SL4A for QPython, which allows users being able to program with Python script for android.

-
-
-

QPython Core

-

Besides Python core, QPython core offer three types programming mode also.

-
-

Python 2.x

-
-
-

Python 3.x

-
-
-

Console program

-
-
-

Kivy program

-
-
-

WebApp program

-
-
-
-

Pip and libraries

-

Pip and libraries offer great expansion ability for QPython.

-
-

Pip

-
-
-

Libraries

-
-
-
-

Quick tools

-

Quick tools offers better guide for using QPython well for different users.

-
-

QPython API

-
-
-

FTP

-
-
-
-

QPY.IO (Enterprise service)

-

It’s a enterprise service which aim at offering quick android development delivery with QPython.

-

It’s QPython’s maintainers’ main paid service, but not a opensource project.

-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide_extend.html b/docs/en/guide_extend.html deleted file mode 100644 index 7f7b9fe5..00000000 --- a/docs/en/guide_extend.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - -QPython Open API — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

QPython Open API

-

QPython has an open activity which allow you run qpython from outside.

-

The MPyAPI’s definition seems like the following:

-
<activity
-android:name="org.qpython.qpylib.MPyApi"
-android:label="@string/qpy_run_with_share"
-android:screenOrientation="user"
-android:configChanges="orientation|keyboardHidden"
-android:exported="true">
-<intent-filter>
-<action android:name="org.qpython.qpylib.action.MPyApi" />
-<category android:name="android.intent.category.DEFAULT" />
-<category android:name="android.intent.category.LAUNCHER" />
-</intent-filter>
-<intent-filter>
-<action android:name="android.intent.action.VIEW" />
-<category android:name="android.intent.category.DEFAULT" />
-<category android:name="android.intent.category.BROWSABLE" />
-<data android:scheme="http" />
-<data android:scheme="https" />
-</intent-filter>
-<intent-filter>
-<action android:name="android.intent.action.SEND"/>
-<category android:name="android.intent.category.DEFAULT"/>
-<data android:mimeType="text/plain"/>
-</intent-filter>
-<intent-filter>
-<action android:name="android.intent.action.SEND"/>
-<category android:name="android.intent.category.DEFAULT"/>
-<data android:mimeType="image/*"/>
-</intent-filter>
-</activity>
-
-
-

So, with it’s help, you could:

-
-

Share some content to QPython’s scripts

-

You could choose some content in some app, and share to qpython’s script, then you could handle the content with the sys.argv[2]

-

Watch the demo video on YouTube

-
-
-

Run QPython’s script from your own application

-

You can call QPython to run some script or python code in your application by call this activity, like the following sample:

-
// code sample shows how to call qpython API
-String extPlgPlusName = "org.qpython.qpy";          // QPython package name
-Intent intent = new Intent();
-intent.setClassName(extPlgPlusName, "org.qpython.qpylib.MPyApi");
-intent.setAction(extPlgPlusName + ".action.MPyApi");
-Bundle mBundle = new Bundle();
-mBundle.putString("app", "myappid");
-mBundle.putString("act", "onPyApi");
-mBundle.putString("flag", "onQPyExec"); // any String flag you may use in your context
-mBundle.putString("param", "");         // param String param you may use in your context
-/*
-* The Python code we will run
-*/
-String code = "import androidhelper\n" +
-"droid = androidhelper.Android()\n" +
-"line = droid.dialogGetInput()\n" +
-"s = 'Hello %s' % line.result\n" +
-"droid.makeToast(s)\n"
-mBundle.putString("pycode", code);
-intent.putExtras(mBundle);
-startActivityForResult(intent, SCRIPT_EXEC_PY);
-...
-// And you can handle the qpython callabck result in onActivityResult
-@Override
-protected void onActivityResult(int requestCode, int resultCode, Intent data) {
-if (requestCode == SCRIPT_EXEC_PY) {
-if (data!=null) {
-Bundle bundle = data.getExtras();
-String flag = bundle.getString("flag");
-String param = bundle.getString("param");
-String result = bundle.getString("result"); // Result your Pycode generate
-Toast.makeText(this, "onQPyExec: return ("+result+")", Toast.LENGTH_SHORT).show();
-} else {
-Toast.makeText(this, "onQPyExec: data is null", Toast.LENGTH_SHORT).show();
-}
-}
-}
-
-
-

Checkout the full project from github

-

And there is a production application - QPython Plugin for Tasker

-
-
-
-

QPython Online Service

-

Now the QPython online service only open for QPython, not QPython3.

-
-

QPypi

-

Can I install some packages which required pre-compiled ? -Sure, you could install some pre-compiled packages from QPypi, you could find it through “Libraries” on dashboard.

-../images/guide_extend_pic2.png -

If you couldn’t found the package here, you could send email to river@qpython.org .

-
-
-

QPY.IO

-

Can I build an independent APK from QPython script?

-

Sure you can. now the service is in BETA, it’s a challenging thing. We will publish it as a online service, for we want to let the development process is simple, you don’t need to own the development environment set up when you want to build a application.

-../images/guide_extend_pic1.png -

If you want to try it out or have some business proposal, please contact with us by sending email to river@qpython.org .

-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide_helloworld.html b/docs/en/guide_helloworld.html deleted file mode 100644 index 7ba93f3d..00000000 --- a/docs/en/guide_helloworld.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - -Writing “Hello World” — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

Writing “Hello World”

-
-

Hello world

-hello world -

Well, after you became a bit more familiar with QPython, let’s create our first program in QPython. Obviously, it will be helloworld.py. ;)

-

Start QPython, open editor and enter the following code:

-
import androidhelper
-droid = androidhelper.Android()
-droid.makeToast('Hello, Username!')
-
-
-

No wonder, it’s just similar to any other hello-world program. When executed, it just shows pop-up message on the screen (see screenshot on the top). Anyway, it’s a good example of QPython program.

-
-
-

SL4A library

-

It begins with import androidhelper — the most useful module in QPython, which encapsulates almost all interface with Android, available in Python. Any script developed in QPython starts with this statement (at least if it claims to communicate with user). Read more about Python library here and import statement here

-

By the way, if you’re going to make your script compatible with SL4A, you should replace the first line with the following code (and use android instead androidhelper further in the program):

-
try:
-import androidhelper as android
-except ImportError:
-import android
-
-
-

Ok, next we’re creating an object droid (actually a class), it is necessary to call RPC functions in order to communicate with Android.

-

And the last line of our code calls such function, droid.makeToast(), which shows a small pop-up message (a “toast”) on the screen.

-

Well, let’s add some more functionality. Let it ask the user name and greet them.

-
-
-

More samples

-

We can display a simple dialog box with the title, prompt, edit field and buttons Ok and Cancel using dialogGetInput call. Replace the last line of your code and save it as hello1.py:

-
import androidhelper
-droid = androidhelper.Android()
-respond = droid.dialogGetInput("Hello", "What is your name?")
-
-
-

Well, I think it should return any respond, any user reaction. That’s why I wrote respond = …. But what the call actually returns? Let’s check. Just add print statement after the last line:

-
import androidhelper
-droid = androidhelper.Android()
-respond = droid.dialogGetInput("Hello", "What is your name?")
-print respond
-
-
-

Then save and run it…

-

Oops! Nothing printed? Don’t worry. Just pull notification bar and you will see “QPython Program Output: hello1.py” — tap it!

-

As you can see, droid.dialogGetInput() returns a JSON object with three fields. We need only one — result which contains an actual input from user.

-

Let’s add script’s reaction:

-
import androidhelper
-droid = androidhelper.Android()
-respond = droid.dialogGetInput("Hello", "What is your name?")
-print respond
-message = 'Hello, %s!' % respond.result
-droid.makeToast(message)
-
-
-

Last two lines (1) format the message and (2) show the message to the user in the toast. See Python docs if you still don’t know what % means.

-

Wow! It works! ;)

-

Now I’m going to add a bit of logic there. Think: what happen if the user clicks Cancel button, or clicks Ok leaving the input field blank?

-

You can play with the program checking what contains respond variable in every case.

-

First of all, I want to put text entered by user to a separate variable: name = respond.result. Then I’m going to check it, and if it contains any real text, it will be considered as a name and will be used in greeting. Otherwise another message will be shown. Replace fifth line message = ‘Hello, %s!’ % respond.result with the following code:

-
name = respond.result
-if name:
-message = 'Hello, %s!' % name
-else:
-message = "Hey! And you're not very polite, %Username%!"
-
-
-

Use < and > buttons on the toolbar to indent/unindent lines in if-statement (or just use space/backspace keys). You can read more about indentation in Python here; if-statement described here.

-

First of all, we put user input to the variable name. Then we check does name contain anything? In case the user left the line blank and clicked Ok, the return value is empty string . In case of Cancel button pressed, the return value is None. Both are treated as false in if-statement. So, only if name contans anything meaninful, then-statement is executed and greeting “Hello, …!” shown. In case of empty input the user will see “Hey! And you’re not very polite, %Username%!” message.

-

Ok, here is the whole program:

-
import androidhelper
-droid = androidhelper.Android()
-respond = droid.dialogGetInput("Hello", "What is your name?")
-print respond
-name = respond.result
-if name:
-message = 'Hello, %s!' % name
-else:
-message = "Hey! And you're not very polite, %Username%!"
-droid.makeToast(message)
-
-
-

Thanks dmych offer the first draft in his blog

-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide_howtostart.html b/docs/en/guide_howtostart.html deleted file mode 100644 index 8bcefb0e..00000000 --- a/docs/en/guide_howtostart.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - -QPython: How To Start — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

QPython: How To Start

-

Now, I will introduce the QPython’s features through it’s interfaces.

-
-

1. Dashboard

-QPython start -

After you installed QPython, start it in the usual way by tapping its icon in the menu. Screenshot on the top of this post shows what you should see when QPython just started.

-

Start button

-

By tapping the big button with Python logo in the center of the screen you can

-

Launch your local script or project

-

Get script from QR code (funny brand new way to share and distribute your code, you can create QRCode through QPython’s QRCode generator

-

Now you can install many 3rd libaries ( pure python libraries mainly ) through pip_console.py script.

-

If you want QPython to run some script of project when you click the start button, you can make it by setting default program in setting activity.

-

Developer kit dashboard

-

If you swipe to the left instead of tapping, you will see another (second) main screen of QPython (Pic. 2). As for me, it is much more useful and comfortable for developer.

-QPython develop dashboard -

Tools available here:

-
    -
  • Console — yes, it’s regular Python console, feel free to comunicate with interpreter directly
  • -
  • Editor — QPython has a nice text editor integrated with the rest, you can write code and run it without leaving the application
  • -
  • My QPython — here you can find your scripts and projects
  • -
  • System — maintain libraries and components: install and uninstall them
  • -
  • Package Index opens the page QPyPI in browser allowing to install packages listed there
  • -
  • Community leads to QPython.org page. Feel free to join or ask&answer questions in the QPython community.
  • -
-

By long clicking on the console or editor, you have chance to create the shortcut on desktop which allow you enter console or editor directly.

-

Next, let’s see the console and the editor.

-
-
-

2. Console and editor

-QPython console -

As I said before, there is an ordinary Python console. Many people usually use it to explore objects’ properties, consult about syntax and test their ideas. You can type your commands directly and Python interpreter will execute them. You can open additional consoles by tapping the plus button (1) and usedrop-down list on the upper left corner to switch between consoles (2). To close the console just tap the close button (3).

-QPython notification -

Please note, there will be notification in the notification bar unless you explicitly close the console and you always can reach the open console by tapping the notification.

-QPython editor -

The editor allows you obviously (hello Cap!) enter and modify text. Here you can develop your scripts, save them and execute. The editor supports Python syntax highlighting and shows line numbers (there is no ability to go to the line by number though). (above picture)

-

When typing, you can easily control indentation level (which is critical for Python code) using two buttons on the toolbar (1). Next buttons on the toolbar are Save and Save As (2), then goes Run (3), Undo, Search, Recent Files and Settings buttons. Also there are two buttons on the top: Open and New (5).

-

When saving, don’t forget to add .py estension to the file name since the editor don’t do it for you.

-
-
-

3. Programs

-

You can find the scripts or projects in My QPython. My QPython contains the scripts and Projects.

-

By long clicking on script or project, you have chance to create the shortcut for the script or project. Once you have created the shortcuts on desktop, you can directly run the script or project from desktop.

-

Scripts -Scripts : A single script. The scripts are in the /sdcard/com.hipipal.qpyplus/scripts directory. -If you want your script could be found in My QPython, please upload it to this directory.

-

When you click the script, you can choose the following actions:

-
    -
  • Run : Run the script
  • -
  • Open : Edit the script with built-in editor
  • -
  • Rename : Rename the script
  • -
  • Delete : Delete the script
  • -
-

Projects -Projects : A directory which should contain the main.py as the project’s default launch script, and you can put other dependency 3rd libraries or resources in the same directory, if you want your project could be found in My QPython, please upload them into this directory.

-

When you click on the project, you can choose the following actions:

-
    -
  • Run : run the project
  • -
  • Open : use it to explore project’s resources
  • -
  • Rename : Rename the project
  • -
  • Delete : Delete the project
  • -
-
-
-

4. Libraries

-

By installing 3rd libraries, you can extend your qpython’s programming ability quickly. There are some ways to install libraries.

-

QPypi

-

You can install some pre-built libraries from QPypi, like numpy etc.

-

Pip console

-

You can install most pure python libraries through pip console.

-

Besides the two ways above, you could copy libraries into the /sdcard/qpython/lib/python2.7/site-packages in your device.

-

Notice: -Some libraries mixed with c/c++ files could not be install through pip console for the android lacks the compiler environment, you could ask help from qpython developer team.

-
-
-

5. Community

-

It will redirect to the QPython.org, including somthe source of this documentation, and there are some qpython user communities’ link, many questions of qpython usage or programming could be asked in the community.

-

Thanks dmych offer the first draft in his blog

-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide_ide.html b/docs/en/guide_ide.html deleted file mode 100644 index f614472e..00000000 --- a/docs/en/guide_ide.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - -Use the best way for developing — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

Use the best way for developing

-
-

Develop from QEditor

-

QEditor is the QPython’s built-in editor, which supports Python / HTML syntax highlight.

-

QEditor’s main features

-
    -
  • Edit / View plain text file, like Python, Lua, HTML, Javascript and so on
  • -
  • Edit and run Python script & Python syntax highlight
  • -
  • Edit and run Shell script
  • -
  • Preview HTML with built-in HTML browser
  • -
  • Search by keyword, code snippets, code share
  • -
-

You could run the QPython script directly when you develop from QEditor, so when you are moving it’s the most convient way for QPython develop.

-
-
-

Develop from browser

-

QPython has a built-in script which is qedit4web.py, you could see it when you click the start button and choose “Run local script”. -After run it, you could see the result.

-QPython qedit4web -

Then, you could access the url from your PC/Laptop’s browser for developing, just like the below pics.

-QPython qedit4web choose project or file -

After choose some project or script, you could start to develop

-QPython qedit4web -

With it’s help, you could write from browser and run from your android phone. It is very convenient.

-
-
-

Develop from your computer

-

Besides the above ways, you could develop the script with your way, then upload to your phone and run with QPython also.

-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide_libraries.html b/docs/en/guide_libraries.html deleted file mode 100644 index 02d95c8b..00000000 --- a/docs/en/guide_libraries.html +++ /dev/null @@ -1,568 +0,0 @@ - - - - - -QPython built-in Libraries — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

QPython built-in Libraries

-

QPython is using the Python 2.7.2 and it support most Python stardard libraries. And you could see their documentation through Python documentation.

-
-

QPython dynload libraries

-

Just like Python, QPython contains python built-in .so libraries.

-

Usually, you don’t need to import them manually, they were used in stardard libraries, and could be imported automatically.

-
    -
  • _codecs_cn.so
  • -
  • _codecs_hk.so
  • -
  • _codecs_iso2022.so
  • -
  • _codecs_jp.so
  • -
  • _codecs_kr.so
  • -
  • _codecs_tw.so
  • -
  • _csv.so
  • -
  • _ctypes.so
  • -
  • _ctypes_test.so
  • -
  • _hashlib.so
  • -
  • _heapq.so
  • -
  • _hotshot.so
  • -
  • _io.so
  • -
  • _json.so
  • -
  • _lsprof.so
  • -
  • _multibytecodec.so
  • -
  • _sqlite3.so
  • -
  • _ssl.so
  • -
  • _testcapi.so
  • -
  • audioop.so
  • -
  • future_builtins.so
  • -
  • grp.so
  • -
  • mmap.so
  • -
  • resource.so
  • -
  • syslog.so
  • -
  • termios.so
  • -
  • unicodedata.so
  • -
-
-
-

QPython stardard libraries

-

The following libraries are the stardard QPython libraries which are the same as Python:

-
    -
  • BaseHTTPServer.py
  • -
  • binhex.py
  • -
  • fnmatch.py
  • -
  • mhlib.py
  • -
  • quopri.py
  • -
  • sysconfig.py
  • -
  • Bastion.py
  • -
  • bisect.py
  • -
  • formatter.py
  • -
  • mimetools.py
  • -
  • random.py
  • -
  • tabnanny.py
  • -
  • CGIHTTPServer.py
  • -
  • bsddb
  • -
  • fpformat.py
  • -
  • mimetypes.py
  • -
  • re.py
  • -
  • tarfile.py
  • -
  • ConfigParser.py
  • -
  • cProfile.py
  • -
  • fractions.py
  • -
  • mimify.py
  • -
  • repr.py
  • -
  • telnetlib.py
  • -
  • Cookie.py
  • -
  • calendar.py
  • -
  • ftplib.py
  • -
  • modulefinder.py
  • -
  • rexec.py
  • -
  • tempfile.py
  • -
  • DocXMLRPCServer.py
  • -
  • cgi.py
  • -
  • functools.py
  • -
  • multifile.py
  • -
  • rfc822.py
  • -
  • textwrap.py
  • -
  • HTMLParser.py
  • -
  • cgitb.py
  • -
  • genericpath.py
  • -
  • mutex.py
  • -
  • rlcompleter.py
  • -
  • this.py
  • -
  • chunk.py
  • -
  • getopt.py
  • -
  • netrc.py
  • -
  • robotparser.py
  • -
  • threading.py
  • -
  • MimeWriter.py
  • -
  • cmd.py
  • -
  • getpass.py
  • -
  • new.py
  • -
  • runpy.py
  • -
  • timeit.py
  • -
  • Queue.py
  • -
  • code.py
  • -
  • gettext.py
  • -
  • nntplib.py
  • -
  • sched.py
  • -
  • toaiff.py
  • -
  • SimpleHTTPServer.py
  • -
  • codecs.py
  • -
  • glob.py
  • -
  • ntpath.py
  • -
  • sets.py
  • -
  • token.py
  • -
  • SimpleXMLRPCServer.py
  • -
  • codeop.py
  • -
  • gzip.py
  • -
  • nturl2path.py
  • -
  • sgmllib.py
  • -
  • tokenize.py
  • -
  • SocketServer.py
  • -
  • collections.py
  • -
  • hashlib.py
  • -
  • numbers.py
  • -
  • sha.py
  • -
  • trace.py
  • -
  • StringIO.py
  • -
  • colorsys.py
  • -
  • heapq.py
  • -
  • opcode.py
  • -
  • shelve.py
  • -
  • traceback.py
  • -
  • UserDict.py
  • -
  • commands.py
  • -
  • hmac.py
  • -
  • optparse.py
  • -
  • shlex.py
  • -
  • tty.py
  • -
  • UserList.py
  • -
  • compileall.py
  • -
  • hotshot
  • -
  • os.py
  • -
  • shutil.py
  • -
  • types.py
  • -
  • UserString.py
  • -
  • compiler
  • -
  • htmlentitydefs.py
  • -
  • os2emxpath.py
  • -
  • site.py
  • -
  • unittest
  • -
  • _LWPCookieJar.py
  • -
  • config
  • -
  • htmllib.py
  • -
  • smtpd.py
  • -
  • urllib.py
  • -
  • _MozillaCookieJar.py
  • -
  • contextlib.py
  • -
  • httplib.py
  • -
  • pdb.py
  • -
  • smtplib.py
  • -
  • urllib2.py
  • -
  • __future__.py
  • -
  • cookielib.py
  • -
  • ihooks.py
  • -
  • pickle.py
  • -
  • sndhdr.py
  • -
  • urlparse.py
  • -
  • __phello__.foo.py
  • -
  • copy.py
  • -
  • imaplib.py
  • -
  • pickletools.py
  • -
  • socket.py
  • -
  • user.py
  • -
  • _abcoll.py
  • -
  • copy_reg.py
  • -
  • imghdr.py
  • -
  • pipes.py
  • -
  • sqlite3
  • -
  • uu.py
  • -
  • _pyio.py
  • -
  • csv.py
  • -
  • importlib
  • -
  • pkgutil.py
  • -
  • sre.py
  • -
  • uuid.py
  • -
  • _strptime.py
  • -
  • ctypes
  • -
  • imputil.py
  • -
  • plat-linux4
  • -
  • sre_compile.py
  • -
  • warnings.py
  • -
  • _threading_local.py
  • -
  • dbhash.py
  • -
  • inspect.py
  • -
  • platform.py
  • -
  • sre_constants.py
  • -
  • wave.py
  • -
  • _weakrefset.py
  • -
  • decimal.py
  • -
  • io.py
  • -
  • plistlib.py
  • -
  • sre_parse.py
  • -
  • weakref.py
  • -
  • abc.py
  • -
  • difflib.py
  • -
  • json
  • -
  • popen2.py
  • -
  • ssl.py
  • -
  • webbrowser.py
  • -
  • aifc.py
  • -
  • dircache.py
  • -
  • keyword.py
  • -
  • poplib.py
  • -
  • stat.py
  • -
  • whichdb.py
  • -
  • antigravity.py
  • -
  • dis.py
  • -
  • lib-tk
  • -
  • posixfile.py
  • -
  • statvfs.py
  • -
  • wsgiref
  • -
  • anydbm.py
  • -
  • distutils
  • -
  • linecache.py
  • -
  • posixpath.py
  • -
  • string.py
  • -
  • argparse.py
  • -
  • doctest.py
  • -
  • locale.py
  • -
  • pprint.py
  • -
  • stringold.py
  • -
  • xdrlib.py
  • -
  • ast.py
  • -
  • dumbdbm.py
  • -
  • logging
  • -
  • profile.py
  • -
  • stringprep.py
  • -
  • xml
  • -
  • asynchat.py
  • -
  • dummy_thread.py
  • -
  • macpath.py
  • -
  • pstats.py
  • -
  • struct.py
  • -
  • xmllib.py
  • -
  • asyncore.py
  • -
  • dummy_threading.py
  • -
  • macurl2path.py
  • -
  • pty.py
  • -
  • subprocess.py
  • -
  • xmlrpclib.py
  • -
  • atexit.py
  • -
  • email
  • -
  • mailbox.py
  • -
  • py_compile.py
  • -
  • sunau.py
  • -
  • zipfile.py
  • -
  • audiodev.py
  • -
  • encodings
  • -
  • mailcap.py
  • -
  • pyclbr.py
  • -
  • sunaudio.py
  • -
  • base64.py
  • -
  • filecmp.py
  • -
  • markupbase.py
  • -
  • pydoc.py
  • -
  • symbol.py
  • -
  • bdb.py
  • -
  • fileinput.py
  • -
  • md5.py
  • -
  • pydoc_data
  • -
  • symtable.py
  • -
-
-
-
-

Python 3rd Libraries

- -
- -
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/en/guide_program.html b/docs/en/guide_program.html deleted file mode 100644 index b9c35536..00000000 --- a/docs/en/guide_program.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - -QPython’s main features — QPython 0.9 documentation - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-
-

QPython’s main features

-

With QPython, you could build android applications with android application and script language now.

-
-

Why should I choose QPython

-

The smartphone is becomming people’s essential information & technical assitant, so an flexiable script engine could help people complete most jobs efficiently without complex development.

-

QPython offer an amazing developing experience, with it’s help, you could implement the program easily without complex installing IDE, compiling, package progress etc.

-
-
-

QPython’s main features

-

You can do most jobs through QPython just like the way that Python does on PC/Laptop.

-

Libraries

-
    -
  • QPython supports most stardard Python libraries.
  • -
  • QPython supports many 3rd Python libraries which implemented with pure Python code.
  • -
  • QPython supports some Python libraries mixed with C/C++ code which pre-compiled by QPython develop team.
  • -
  • QPython allows you put on the libraries by yourself.
  • -
-

Besides these, QPython offers some extra features which Python doesn’t offer, Like:

-
    -
  • Android APIs Access(Like SMS, GPS, NFC, BLUETOOTH etc)
  • -
-

Why QPython require so many permissions?

-

QPython need these permissions to access Android’s API.

-

Runtime modes

-

QPython supports several runtime modes for android.

-

Console mode

-

It’s the default runtime mode in QPython, it’s very common in PC/laptop.

-

Kivy mode

-

QPython supports Kivy as the GUI programming solution.

-

Kivy is an open source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps.

-

Your device should support opengl2.0 for supporting kivy mode.

-

By insert into the following header in your script, you can let your script run with kivy mode.

-
#qpy:kivy
-
-
-

An kivy program in QPython sample

-
#qpy:kivy
-from kivy.app import App
-from kivy.uix.button import Button
-class TestApp(App):
-def build(self):
-return Button(text='Hello World')
-TestApp().run()
-
-
-

If your library require the opengl driver, you shoule declare the kivy mode header in your script, like the jnius.

-

NOTE: QPython3 didn’t support kivy mode yet, we have plan to support it in the future

-

WebApp mode

-

We recommend you implement WebApp with QPython for it offer the easy to accomplish UI and Take advantage of Python’s fast programming strong point.

-

WebApp will start a webview in front, and run a python web service background. -You could use bottle*(QPython built-in library) to implement the web service, or you could install *django / flask framework also.

-

By insert into the following header in your script, you can let your script run with webapp mode.

-
#qpy:webapp:<app title>
-#qpy:<fullscreen or remove this line>
-#qpy://<ip:port:path>
-
-
-

For example

-
#qpy:webapp:Hello QPython
-#qpy://localhost:8080/hello
-
-
-

The previous should start a webview which should load the http://localhost:8080/hello as the default page, and the webview will keep the titlebar which title is “Hello QPython”, if you add the #qpy:fullscreen it will hide the titlebar.

-
#qpy:webapp:Hello Qpython
-#qpy://127.0.0.1:8080/
-"""
-This is a sample for qpython webapp
-"""
-from bottle import Bottle, ServerAdapter
-from bottle import run, debug, route, error, static_file, template
-######### QPYTHON WEB SERVER ###############
-class MyWSGIRefServer(ServerAdapter):
-server = None
-def run(self, handler):
-from wsgiref.simple_server import make_server, WSGIRequestHandler
-if self.quiet:
-class QuietHandler(WSGIRequestHandler):
-def log_request(*args, **kw): pass
-self.options['handler_class'] = QuietHandler
-self.server = make_server(self.host, self.port, handler, **self.options)
-self.server.serve_forever()
-def stop(self):
-#sys.stderr.close()
-import threading
-threading.Thread(target=self.server.shutdown).start()
-#self.server.shutdown()
-self.server.server_close() #<--- alternative but causes bad fd exception
-print "# qpyhttpd stop"
-######### BUILT-IN ROUTERS ###############
-@route('/__exit', method=['GET','HEAD'])
-def __exit():
-global server
-server.stop()
-@route('/assets/<filepath:path>')
-def serverstatic(filepath):
-return static_file(filepath, root='/sdcard')
-######### WEBAPP ROUTERS ###############
-@route('/')
-def home():
-return template('<h1>Hello {{name}} !</h1>'+ \
-'<a href="/assets/qpython/projects/WebApp Sample/main.py">View source</a>',name='QPython')
-######### WEBAPP ROUTERS ###############
-app = Bottle()
-app.route('/', method='GET')(home)
-app.route('/__exit', method=['GET','HEAD'])(__exit)
-app.route('/assets/<filepath:path>', method='GET')(serverstatic)
-try:
-server = MyWSGIRefServer(host="127.0.0.1", port="8080")
-app.run(server=server,reloader=False)
-except Exception,ex:
-print "Exception: %s" % repr(ex)
-
-
-

If you want the webapp could be close when you exit the webview, you have to define the @route(‘/__exit’, method=[‘GET’,’HEAD’]) method , for the qpython will request the http://localhost:8080/__exit when you exit the webview. So you can release other resource in this function.

-QPython WebApp Sample -

Running screenshot

-

In the other part of the code, you could implement a webserver whish serve on localhost:8080 and make the URL /hello implement as your webapp’s homepage.

-

Q mode

-

If you don’t want the QPython display some UI, pelase try to use the QScript mode, it could run a script background, just insert the following header into your script:

-
#qpy:qpyapp
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/favicon.ico b/docs/favicon.ico deleted file mode 100644 index 5650a967..00000000 Binary files a/docs/favicon.ico and /dev/null differ diff --git a/docs/genindex.html b/docs/genindex.html deleted file mode 100644 index b4d3afc0..00000000 --- a/docs/genindex.html +++ /dev/null @@ -1,823 +0,0 @@ - - - - - -Index — QPython 0.9 documentation - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-

Index

-
-A -| B -| C -| D -| E -| F -| G -| L -| M -| N -| P -| Q -| R -| S -| T -| U -| V -| W -
-

A

- - - -
-

B

- - - -
-

C

- - - -
-

D

- - - -
-

E

- - - -
-

F

- - - -
-

G

- - - -
-

L

- - - -
-

M

- - - -
-

N

- - - -
-

P

- - - -
-

Q

- - - -
-

R

- - - -
-

S

- - - -
-

T

- - - -
-

U

- - - -
-

V

- - - -
-

W

- - - -
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/images/1.png b/docs/images/1.png deleted file mode 100644 index a539f0e8..00000000 Binary files a/docs/images/1.png and /dev/null differ diff --git a/docs/images/2.png b/docs/images/2.png deleted file mode 100644 index dd65bc6c..00000000 Binary files a/docs/images/2.png and /dev/null differ diff --git a/docs/images/3.png b/docs/images/3.png deleted file mode 100644 index cb9bbea5..00000000 Binary files a/docs/images/3.png and /dev/null differ diff --git a/docs/images/bestpython.png b/docs/images/bestpython.png deleted file mode 100644 index 59940ff3..00000000 Binary files a/docs/images/bestpython.png and /dev/null differ diff --git a/docs/images/guide_extend_pic1.png b/docs/images/guide_extend_pic1.png deleted file mode 100644 index fae7de0e..00000000 Binary files a/docs/images/guide_extend_pic1.png and /dev/null differ diff --git a/docs/images/guide_extend_pic2.png b/docs/images/guide_extend_pic2.png deleted file mode 100644 index bcff8648..00000000 Binary files a/docs/images/guide_extend_pic2.png and /dev/null differ diff --git a/docs/images/guide_helloworld_pic1.png b/docs/images/guide_helloworld_pic1.png deleted file mode 100644 index 712e9864..00000000 Binary files a/docs/images/guide_helloworld_pic1.png and /dev/null differ diff --git a/docs/images/guide_howtostart_pic1.png b/docs/images/guide_howtostart_pic1.png deleted file mode 100644 index 54c666a7..00000000 Binary files a/docs/images/guide_howtostart_pic1.png and /dev/null differ diff --git a/docs/images/guide_howtostart_pic2.png b/docs/images/guide_howtostart_pic2.png deleted file mode 100644 index 296a5150..00000000 Binary files a/docs/images/guide_howtostart_pic2.png and /dev/null differ diff --git a/docs/images/guide_howtostart_pic3.png b/docs/images/guide_howtostart_pic3.png deleted file mode 100644 index f7caf8c7..00000000 Binary files a/docs/images/guide_howtostart_pic3.png and /dev/null differ diff --git a/docs/images/guide_howtostart_pic4.png b/docs/images/guide_howtostart_pic4.png deleted file mode 100644 index 6d2b2fc3..00000000 Binary files a/docs/images/guide_howtostart_pic4.png and /dev/null differ diff --git a/docs/images/guide_howtostart_pic5.png b/docs/images/guide_howtostart_pic5.png deleted file mode 100644 index 9e30aed4..00000000 Binary files a/docs/images/guide_howtostart_pic5.png and /dev/null differ diff --git a/docs/images/guide_ide_qedit4web.png b/docs/images/guide_ide_qedit4web.png deleted file mode 100644 index 09f2ccb3..00000000 Binary files a/docs/images/guide_ide_qedit4web.png and /dev/null differ diff --git a/docs/images/guide_ide_qedit4web_choose.png b/docs/images/guide_ide_qedit4web_choose.png deleted file mode 100644 index 6f3edfd3..00000000 Binary files a/docs/images/guide_ide_qedit4web_choose.png and /dev/null differ diff --git a/docs/images/guide_ide_qedit4web_develop.png b/docs/images/guide_ide_qedit4web_develop.png deleted file mode 100644 index 0fde32ce..00000000 Binary files a/docs/images/guide_ide_qedit4web_develop.png and /dev/null differ diff --git a/docs/images/guide_program_pic1.png b/docs/images/guide_program_pic1.png deleted file mode 100644 index 4cdf975c..00000000 Binary files a/docs/images/guide_program_pic1.png and /dev/null differ diff --git a/docs/images/sl4a.jpg b/docs/images/sl4a.jpg deleted file mode 100644 index cf451532..00000000 Binary files a/docs/images/sl4a.jpg and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100755 index c62840d2..00000000 --- a/docs/index.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - QPython - Best Mobile Python IDE - - - - - - - - - - -
-
- - - - - -
-
- -
-
-
- - -
-
-
- -
-
-

Welcome to read the QPython guide!

-
- QPython is a script engine that runs Python on android devices. lt lets your android device run Python scripts and projects. lt contains the Python interpreter,console,editor,and the SL4A Library for Android. lt’s Python on Android! -
-
    -
  • - -
  • -
  • - -
  • -
-
-
-
- -
-
-
-
    -
  • -
    -

    What’s NEW

    -

    QPython project include the QPython and QPython3 applications.

    -

    QPython application is using the Python 2.7.2, and QPyton application is using the Python 3.2.2.

    -

    QPython’s newest version is 1.3.(Released on 2017/3/20),QPython3’s newest ……

    -
    -
  • -
  • -
    -

    QPython communities

    -

    There are many active QPython communities where you could meet the QPython users like you

    -
      -
    •  • Join Facebook community
    • -
    •  • Join Google group
    • -
    •  • Join Gitter chat
    • -
    •  • Join G+ community(For QPython testers)
    • -
    •  • QPython on Stackoverflow
    • -
    -
    -
  • -
  • -
    -

    Support

    -

    We are happy to hear feedback from you, but sometimes some bugs or features demand may not be implented soon for we lack resources.

    -

    We are happy to hear feedback from you, but sometimes some bugs or features demand may not be implented soon for we lack resources.

    -
    -
  • -
-
-
-
-
- -
-
-
-
- - -
- - - - - diff --git a/docs/objects.inv b/docs/objects.inv deleted file mode 100644 index f9891171..00000000 Binary files a/docs/objects.inv and /dev/null differ diff --git a/docs/quick-start/index.html b/docs/quick-start/index.html deleted file mode 100644 index 19b2bad9..00000000 --- a/docs/quick-start/index.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - -Quick Start | QPyPI - - - - - - - -
- - -
-
-
- -
-

Quick Start

-
-
-

A hands-on introduction to Python for beginning programmers

-

If you are a new guy to QPython, you should watch the tutorial video and just follow the steps to learn how to run script with QPython -

-
-
-
-

Running with Console

-

Running QPython’s simple script with console model

-
#qpy:2
-#qpy:console
-#qpy:http://qpython.com/s/qpy-sample.py
-
-class Calculator(object):
-    #define class to simulate a simple calculator
-    def __init__ (self):
-        #start with zero
-        self.current = 0
-    def add(self, amount):
-        #add number to current
-        self.current += amount
-    def getCurrent(self):
-        return self.current
-
-myBuddy = Calculator() # make myBuddy into a Calculator object
-myBuddy.add(2) #use myBuddy's new add method derived from the Calculator class
-print(myBuddy.getCurrent()) #print myBuddy's current instance variable
-
-
-
-
-
-

Running with Kivy

-

Running QPython’s script with GUI model ( Kivy library )

-
#qpy:2
-#qpy:kivy
-#qpy:http://qpython.com/s/qpy-guisample.py
-
-from kivy.app import App
-from kivy.uix.button import Button
-
-class TestApp(App):
-    def build(self):
-        # display a button with the text : Hello QPython 
-        return Button(text='Hello QPython')
-
-TestApp().run()
-
-
-
-
-

Running as Web App ( QPython needs >= 0.9.7.x )

-

Running Web App with QPython

-
#qpy:2
-#qpy:webapp:Hello Qpython
-#qpy://localhost:8080/hello
-"""
-This is a sample for qpython webapp
-"""
-from bottle import route, run
-
-@route('/hello')
-def hello():
-    return "Hello World!"
-
-run(host='localhost', port=8080)
-
-
- -
-

-
-
-
-
-
-
-
-
- - diff --git a/docs/search.html b/docs/search.html deleted file mode 100644 index 9fd552de..00000000 --- a/docs/search.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - -Search — QPython 0.9 documentation - - - - - - - - - - - - - - - - - -
-
- - - -
-
-
-
- -
-
- -
-
-
-

Search

-
- -

-Please activate JavaScript to enable the search -functionality. -

-
-

-From here you can search these documents. Enter your search -words into the box below and click "search". Note that the search -function will automatically search for all of the words. Pages -containing fewer words won't appear in the result list. -

-
- - - -
-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - - \ No newline at end of file diff --git a/docs/searchindex.js b/docs/searchindex.js deleted file mode 100644 index 7ac31bac..00000000 --- a/docs/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({docnames:["document","en/faq","en/guide","en/guide_androidhelpers","en/guide_contributors","en/guide_contributors_test","en/guide_developers","en/guide_extend","en/guide_helloworld","en/guide_howtostart","en/guide_ide","en/guide_libraries","en/guide_program","zh/contributorshowto","zh/howtostart","zh/quickstart","zhindex"],envversion:52,filenames:["document.rst","en/faq.rst","en/guide.rst","en/guide_androidhelpers.rst","en/guide_contributors.rst","en/guide_contributors_test.rst","en/guide_developers.rst","en/guide_extend.rst","en/guide_helloworld.rst","en/guide_howtostart.rst","en/guide_ide.rst","en/guide_libraries.rst","en/guide_program.rst","zh/contributorshowto.rst","zh/howtostart.rst","zh/quickstart.rst","zhindex.rst"],objects:{"":{NFCBeamMessage:[3,0,1,""],addContextMenuItem:[3,0,1,""],addOptionsMenuItem:[3,0,1,""],batteryCheckPresent:[3,0,1,""],batteryGetHealth:[3,0,1,""],batteryGetLevel:[3,0,1,""],batteryGetPlugType:[3,0,1,""],batteryGetStatus:[3,0,1,""],batteryGetTechnology:[3,0,1,""],batteryGetTemperature:[3,0,1,""],batteryGetVoltage:[3,0,1,""],batteryStartMonitoring:[3,0,1,""],batteryStopMonitoring:[3,0,1,""],bluetoothAccept:[3,0,1,""],bluetoothActiveConnections:[3,0,1,""],bluetoothConnect:[3,0,1,""],bluetoothDiscoveryCancel:[3,0,1,""],bluetoothDiscoveryStart:[3,0,1,""],bluetoothGetConnectedDeviceName:[3,0,1,""],bluetoothGetLocalAddress:[3,0,1,""],bluetoothGetLocalName:[3,0,1,""],bluetoothGetRemoteDeviceName:[3,0,1,""],bluetoothGetScanMode:[3,0,1,""],bluetoothIsDiscovering:[3,0,1,""],bluetoothMakeDiscoverable:[3,0,1,""],bluetoothRead:[3,0,1,""],bluetoothReadBinary:[3,0,1,""],bluetoothReadLine:[3,0,1,""],bluetoothReadReady:[3,0,1,""],bluetoothSetLocalName:[3,0,1,""],bluetoothStop:[3,0,1,""],bluetoothWrite:[3,0,1,""],bluetoothWriteBinary:[3,0,1,""],cameraCapturePicture:[3,0,1,""],cameraInteractiveCapturePicture:[3,0,1,""],cameraStartPreview:[3,0,1,""],cameraStopPreview:[3,0,1,""],checkAirplaneMode:[3,0,1,""],checkBluetoothState:[3,0,1,""],checkNetworkRoaming:[3,0,1,""],checkRingerSilentMode:[3,0,1,""],checkScreenOn:[3,0,1,""],checkWifiState:[3,0,1,""],contactsGet:[3,0,1,""],contactsGetAttributes:[3,0,1,""],contactsGetById:[3,0,1,""],contactsGetCount:[3,0,1,""],contactsGetIds:[3,0,1,""],dialogCreateAlert:[3,0,1,""],dialogCreateDatePicker:[3,0,1,""],dialogCreateHorizontalProgress:[3,0,1,""],dialogCreateInput:[3,0,1,""],dialogCreateNFCBeamMaster:[3,0,1,""],dialogCreateNFCBeamSlave:[3,0,1,""],dialogCreatePassword:[3,0,1,""],dialogCreateSeekBar:[3,0,1,""],dialogCreateSpinnerProgress:[3,0,1,""],dialogCreateTimePicker:[3,0,1,""],dialogDismiss:[3,0,1,""],dialogGetInput:[3,0,1,""],dialogGetPassword:[3,0,1,""],dialogGetResponse:[3,0,1,""],dialogGetSelectedItems:[3,0,1,""],dialogSetCurrentProgress:[3,0,1,""],dialogSetItems:[3,0,1,""],dialogSetMaxProgress:[3,0,1,""],dialogSetMultiChoiceItems:[3,0,1,""],dialogSetNegativeButtonText:[3,0,1,""],dialogSetNeutralButtonText:[3,0,1,""],dialogSetPositiveButtonText:[3,0,1,""],dialogSetSingleChoiceItems:[3,0,1,""],dialogShow:[3,0,1,""],environment:[3,0,1,""],eventClearBuffer:[3,0,1,""],eventGetBrodcastCategories:[3,0,1,""],eventPoll:[3,0,1,""],eventPost:[3,0,1,""],eventRegisterForBroadcast:[3,0,1,""],eventUnregisterForBroadcast:[3,0,1,""],eventWait:[3,0,1,""],eventWaitFor:[3,0,1,""],executeQPy:[3,0,1,""],forceStopPackage:[3,0,1,""],fullDismiss:[3,0,1,""],fullKeyOverride:[3,0,1,""],fullQuery:[3,0,1,""],fullQueryDetail:[3,0,1,""],fullSetList:[3,0,1,""],fullSetProperty:[3,0,1,""],fullShow:[3,0,1,""],generateDtmfTones:[3,0,1,""],geocode:[3,0,1,""],getCellLocation:[3,0,1,""],getClipboard:[3,0,1,""],getConstants:[3,0,1,""],getDeviceId:[3,0,1,""],getDeviceSoftwareVersion:[3,0,1,""],getInput:[3,0,1,""],getIntent:[3,0,1,""],getLastKnownLocation:[3,0,1,""],getLaunchableApplications:[3,0,1,""],getLine1Number:[3,0,1,""],getMaxMediaVolume:[3,0,1,""],getMaxRingerVolume:[3,0,1,""],getMediaVolume:[3,0,1,""],getNeighboringCellInfo:[3,0,1,""],getNetworkOperator:[3,0,1,""],getNetworkOperatorName:[3,0,1,""],getNetworkStatus:[3,0,1,""],getNetworkType:[3,0,1,""],getPackageVersion:[3,0,1,""],getPackageVersionCode:[3,0,1,""],getPassword:[3,0,1,""],getPhoneType:[3,0,1,""],getRingerVolume:[3,0,1,""],getRunningPackages:[3,0,1,""],getScreenBrightness:[3,0,1,""],getScreenTimeout:[3,0,1,""],getSimCountryIso:[3,0,1,""],getSimOperator:[3,0,1,""],getSimOperatorName:[3,0,1,""],getSimSerialNumber:[3,0,1,""],getSimState:[3,0,1,""],getSubscriberId:[3,0,1,""],getVibrateMode:[3,0,1,""],getVoiceMailAlphaTag:[3,0,1,""],getVoiceMailNumber:[3,0,1,""],launch:[3,0,1,""],locationProviderEnabled:[3,0,1,""],locationProviders:[3,0,1,""],log:[3,0,1,""],makeIntent:[3,0,1,""],makeToast:[3,0,1,""],mediaIsPlaying:[3,0,1,""],mediaPlay:[3,0,1,""],mediaPlayClose:[3,0,1,""],mediaPlayInfo:[3,0,1,""],mediaPlayList:[3,0,1,""],mediaPlayPause:[3,0,1,""],mediaPlaySeek:[3,0,1,""],mediaPlaySetLooping:[3,0,1,""],mediaPlayStart:[3,0,1,""],notify:[3,0,1,""],phoneCall:[3,0,1,""],phoneCallNumber:[3,0,1,""],phoneDial:[3,0,1,""],phoneDialNumber:[3,0,1,""],pick:[3,0,1,""],pickContact:[3,0,1,""],pickPhone:[3,0,1,""],prefGetAll:[3,0,1,""],prefGetValue:[3,0,1,""],prefPutValue:[3,0,1,""],queryAttributes:[3,0,1,""],queryContent:[3,0,1,""],readBatteryData:[3,0,1,""],readLocation:[3,0,1,""],readPhoneState:[3,0,1,""],readSensors:[3,0,1,""],readSignalStrengths:[3,0,1,""],receiveEvent:[3,0,1,""],recognizeSpeech:[3,0,1,""],recorderCaptureVideo:[3,0,1,""],recorderStartMicrophone:[3,0,1,""],recorderStartVideo:[3,0,1,""],recorderStop:[3,0,1,""],requiredVersion:[3,0,1,""],rpcPostEvent:[3,0,1,""],scanBarcode:[3,0,1,""],search:[3,0,1,""],sendBroadcast:[3,0,1,""],sendBroadcastIntent:[3,0,1,""],sendEmail:[3,0,1,""],sensorsGetAccuracy:[3,0,1,""],sensorsGetLight:[3,0,1,""],sensorsReadAccelerometer:[3,0,1,""],sensorsReadMagnetometer:[3,0,1,""],sensorsReadOrientation:[3,0,1,""],setClipboard:[3,0,1,""],setMediaVolume:[3,0,1,""],setResultBoolean:[3,0,1,""],setResultBooleanArray:[3,0,1,""],setResultByte:[3,0,1,""],setResultByteArray:[3,0,1,""],setResultChar:[3,0,1,""],setResultCharArray:[3,0,1,""],setResultDouble:[3,0,1,""],setResultDoubleArray:[3,0,1,""],setResultFloat:[3,0,1,""],setResultFloatArray:[3,0,1,""],setResultInteger:[3,0,1,""],setResultIntegerArray:[3,0,1,""],setResultLong:[3,0,1,""],setResultLongArray:[3,0,1,""],setResultSerializable:[3,0,1,""],setResultShort:[3,0,1,""],setResultShortArray:[3,0,1,""],setResultString:[3,0,1,""],setResultStringArray:[3,0,1,""],setRingerVolume:[3,0,1,""],setScreenBrightness:[3,0,1,""],setScreenTimeout:[3,0,1,""],smsDeleteMessage:[3,0,1,""],smsGetAttributes:[3,0,1,""],smsGetMessageById:[3,0,1,""],smsGetMessageCount:[3,0,1,""],smsGetMessageIds:[3,0,1,""],smsGetMessages:[3,0,1,""],smsMarkMessageRead:[3,0,1,""],smsSend:[3,0,1,""],startActivity:[3,0,1,""],startActivityForResult:[3,0,1,""],startActivityForResultIntent:[3,0,1,""],startActivityIntent:[3,0,1,""],startEventDispatcher:[3,0,1,""],startInteractiveVideoRecording:[3,0,1,""],startLocating:[3,0,1,""],startSensing:[3,0,1,""],startSensingThreshold:[3,0,1,""],startSensingTimed:[3,0,1,""],startTrackingPhoneState:[3,0,1,""],startTrackingSignalStrengths:[3,0,1,""],stopEventDispatcher:[3,0,1,""],stopLocating:[3,0,1,""],stopSensing:[3,0,1,""],stopTrackingPhoneState:[3,0,1,""],stopTrackingSignalStrengths:[3,0,1,""],toggleAirplaneMode:[3,0,1,""],toggleBluetoothState:[3,0,1,""],toggleRingerSilentMode:[3,0,1,""],toggleVibrateMode:[3,0,1,""],toggleWifiState:[3,0,1,""],ttsIsSpeaking:[3,0,1,""],ttsSpeak:[3,0,1,""],usbserialActiveConnections:[3,0,1,""],usbserialConnect:[3,0,1,""],usbserialDisconnect:[3,0,1,""],usbserialGetDeviceList:[3,0,1,""],usbserialGetDeviceName:[3,0,1,""],usbserialHostEnable:[3,0,1,""],usbserialRead:[3,0,1,""],usbserialReadBinary:[3,0,1,""],usbserialReadReady:[3,0,1,""],usbserialWrite:[3,0,1,""],usbserialWriteBinary:[3,0,1,""],view:[3,0,1,""],viewContacts:[3,0,1,""],viewHtml:[3,0,1,""],viewMap:[3,0,1,""],waitForEvent:[3,0,1,""],wakeLockAcquireBright:[3,0,1,""],wakeLockAcquireDim:[3,0,1,""],wakeLockAcquireFull:[3,0,1,""],wakeLockAcquirePartial:[3,0,1,""],wakeLockRelease:[3,0,1,""],webViewShow:[3,0,1,""],webcamAdjustQuality:[3,0,1,""],webcamStart:[3,0,1,""],wifiDisconnect:[3,0,1,""],wifiGetConnectionInfo:[3,0,1,""],wifiGetScanResults:[3,0,1,""],wifiLockAcquireFull:[3,0,1,""],wifiLockAcquireScanOnly:[3,0,1,""],wifiLockRelease:[3,0,1,""],wifiReassociate:[3,0,1,""],wifiReconnect:[3,0,1,""],wifiStartScan:[3,0,1,""]}},objnames:{"0":["py","function","Python function"]},objtypes:{"0":"py:function"},terms:{"160x120":3,"320x240":3,"352x288":3,"3rd":[0,1,2,3,9,12],"640x480":3,"78k0f0730":3,"800x480":3,"\u4e16\u754c":14,"\u4e24\u90e8\u5206":13,"\u4e2d\u6587":13,"\u4e2d\u6587\u7528\u6237\u5411\u5bfc":0,"\u4e3b\u8981\u662f\u7528qpython\u6765\u8fdb\u884c\u7f16\u7a0b\u548c\u5f00\u53d1\u7684\u6307\u5357":13,"\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u6765\u63d0\u4ea4\u5bf9\u5e94\u56fd\u5bb6\u7684\u7ffb\u8bd1":13,"\u4f60\u597d":14,"\u4f7f\u7528\u4e0a\u7684\u5e2e\u52a9":13,"\u4f7f\u7528\u8bf4\u660e":14,"\u5176\u4e2d\u5185\u5bb9\u5176\u4e2d\u53c8\u5206\u4e3a":13,"\u5206\u4e3a\u5728qpython":13,"\u52a0\u5165qpython":16,"\u548c\u4ee5\u5916\u7684":13,"\u56e2\u961f":14,"\u5728\u5fae\u535a\u95ee\u6211\u4eec\u95ee\u9898":16,"\u5728\u60f3\u8981\u8d21\u732eqpython\u6587\u6863\u4e4b\u524d\u4ed4\u7ec6\u9605\u8bfb\u6211\u4eec\u7684\u6307\u5357":13,"\u5728\u767e\u5ea6\u8d34\u5427\u91cc\u8ba8\u8bba":16,"\u5982\u4f55\u63d0\u4ea4\u6587\u6863":[14,16],"\u5982\u4f55\u63d0\u4ea4\u7ffb\u8bd1":[14,16],"\u5982\u4f55\u8d21\u732e":0,"\u5982\u679c\u68c0\u67e5\u65e0\u95ee\u9898\u5219\u53ef\u4ee5\u63d0\u4ea4":13,"\u5b83\u5305\u542b\u4e86\u8bb8\u591a\u60ca\u8273\u7684\u7279\u6027":16,"\u5df2\u7ecf\u53d1\u5e03":16,"\u5e38\u89c1\u95ee\u9898":16,"\u5e76\u4e14\u6587\u6863\u4f1a\u901a\u8fc7github":13,"\u5f00\u53d1":14,"\u5feb\u901f\u4e86\u89e3":14,"\u5feb\u901f\u5f00\u59cb":[13,16],"\u60f3\u6210\u4e3a":16,"\u6211\u4eec\u52aa\u529b\u4fdd\u6301\u4e24\u79cd\u8bed\u8a00\u5bf9\u5e94\u5185\u5bb9\u7684\u51c6\u786e\u548c\u540c\u6b65":13,"\u6211\u4eec\u7528sphinx\u6765\u7ec4\u7ec7\u6587\u6863":13,"\u6253\u5f00\u6d4f\u89c8\u5668\u6253\u5f00\u672c\u5730\u6587\u4ef6\u68c0\u67e5":13,"\u62a5\u544a\u95ee\u9898":16,"\u6309\u7167sphinx\u89c4\u5219\u7f16\u8f91source\u4e2d\u7684\u6587\u4ef6\u5373\u53ef":13,"\u6587\u6863\u4f53\u7cfb\u5206\u4e3a":13,"\u6587\u6863\u975e\u5e38\u91cd\u8981":13,"\u66f4\u591a\u94fe\u63a5":0,"\u6700\u540ecd\u5230qpython":13,"\u6765\u548c\u4e2d\u56fd\u6d3b\u8dc3\u7684qpython":16,"\u6765\u548c\u5168\u4e16\u754c\u7684":16,"\u6b22\u8fce":0,"\u6b22\u8fce\u52a0\u5165":14,"\u6df1\u5165\u6298\u817e\u7684\u6307\u5bfc":13,"\u7136\u540e\u6d4f\u89c8qpython":13,"\u7528\u6237\u4e00\u5757\u6765\u73a9\u8f6cqpython":16,"\u7528\u6237\u4e00\u8d77\u73a9\u8f6c":16,"\u7528\u6237\u5f00\u53d1\u7ec4":0,"\u7528\u6237\u5f00\u53d1\u8005\u7ec4":16,"\u7684\u6700\u65b0\u7248\u672c1":16,"\u7684\u8d21\u732e\u8005\u4e48":16,"\u7ed9\u6211\u4eec\u53d1\u90ae\u4ef6":16,"\u7f16\u7a0b\u5411\u5bfc":14,"\u7f16\u7a0b\u6307\u5357":[13,16],"\u82f1\u6587":13,"\u8bf7":16,"\u8bf7\u4ece\u5e94\u7528\u5e02\u573a\u5b89\u88c5":16,"\u8bf7\u52a0\u5165":16,"\u8d21\u732e\u8005\u6307\u5357":[13,16],"\u8d77\u6b65":0,"\u8fdb\u5165\u5230":13,"\u9879\u76ee\u7684qpython":13,"\u9ed1\u5ba2":14,"boolean":3,"byte":3,"case":[1,3,8],"class":[3,8,11,12],"default":[3,7,9,11,12],"docs\u4e2d\u5e76\u8fd0\u884cbuild":13,"docs\u76ee\u5f55\u4e2d":13,"export":7,"final":3,"float":3,"function":[6,8,11,12],"import":[1,3,7,8,11,12],"int":[3,7],"long":[3,9],"new":[3,7,9,11],"null":[3,7],"org\u5373\u53ef\u770b\u5230\u6700\u65b0\u7684\u66f4\u65b0":13,"org\u7f51\u7ad9\u4e2d":13,"page\u529f\u80fd\u76f4\u63a5\u63a8\u5230qpython":13,"qpython\u6587\u6863\u4f53\u7cfb\u8bf4\u660e":[14,16],"qpython\u662f\u4e00\u4e2a\u652f\u6301\u591a\u8bed\u8a00\u7684\u5e94\u7528":13,"qpython\u8d21\u732e\u8005\u6307\u5357":13,"qpython\u9ed1\u5ba2\u6307\u5357":[13,16],"qq\u7ec4":16,"return":[3,7,8,12],"short":3,"static":3,"switch":9,"team\u5185\u7684":13,"throw":3,"true":[3,7],"try":[0,7,8,12],"var":1,"void":7,"while":3,ASE:3,And:[0,7,8,11],But:8,For:[3,5,12],GPS:12,IDE:12,IDEs:11,IDs:3,SMS:[3,12],TTS:3,That:8,The:[3,7,9,11,12],Then:[4,8,10],There:[0,3,9],Use:[0,2,8],With:[10,12],__exit:12,__future__:11,__phello__:11,_abcol:11,_codecs_cn:11,_codecs_hk:11,_codecs_iso2022:11,_codecs_jp:11,_codecs_kr:11,_codecs_tw:11,_csv:11,_ctype:11,_ctypes_test:11,_hashlib:11,_heapq:11,_hotshot:11,_io:11,_json:11,_lsprof:11,_lwpcookiejar:11,_mozillacookiejar:11,_multibytecodec:11,_pyio:11,_sqlite3:11,_ssl:11,_strptime:11,_testcapi:11,_threading_loc:11,_weakrefset:11,abc:11,abil:[6,9],abl:[3,6],about:[2,3,5,8,9],abov:[1,3,9,10],abridg:3,absolut:3,acceler:3,acceleromet:3,accept:3,acces:3,access:[3,10,12],accomplish:12,accuraci:3,acquir:3,act:7,action:[3,7,9],activ:[0,2,3,7,9],activityresultfacad:[2,11],actual:8,adapt:3,add:[3,8,9,12],addcontextmenuitem:3,addit:9,addoptionsmenuitem:3,address:3,adjust:3,advantag:12,after:[5,8,9,10],aifc:11,aim:6,airplan:3,airplanermod:11,alert:11,all:[3,8],allow:[3,6,7,9,12],almost:8,alphabet:3,alreadi:0,also:[2,3,6,9,10,12],altern:12,alwai:9,amaz:[0,12],amazon:0,andoroid:3,android5:1,android:[0,1,2,3,7,8,9,10,11,12,13],androidfacad:[2,11],androidhelp:[0,2,3,7,8],ani:[0,3,5,7,8],anoth:[8,9],answer:9,antigrav:11,anydbm:11,anymor:3,anyth:8,anywai:8,api14:3,api:[0,2,12],apk:[3,7],app:[1,7,12,14],appcach:3,applic:[0,2,3,9,12],applicationmanagerfacad:[2,11],appstor:0,arduino:3,arg:12,argpars:11,argument:3,argv:7,ascii:3,ask:[0,3,8,9],asset:12,assit:12,associ:3,ast:11,asynchat:11,asyncor:11,atexit:11,attach:3,attachmenturi:3,attribut:3,audio:11,audiodev:11,audioop:11,author:11,autofocu:3,automat:11,avail:[3,8,9],availblock:3,axi:3,azimuth:3,background:12,backlight:3,backspac:8,bad:12,bar:[3,8,9],barcod:11,base64:[3,11],basehttpserv:11,bastion:11,batteri:3,batterycheckpres:3,batterygethealth:3,batterygetlevel:3,batterygetplugtyp:3,batterygetstatu:3,batterygettechnolog:3,batterygettemperatur:3,batterygetvoltag:3,batterymanagerfacad:[2,11],batterystartmonitor:3,batterystopmonitor:3,bdb:11,beam:3,beautifulsoup:11,becam:[0,2,8],becom:[2,4,12],befor:9,begin:8,being:6,below:10,besid:[6,9,10,12],best:[0,2],beta:7,better:[5,6],between:[3,9],big:9,bin:1,bind:3,binhex:11,bio:3,bisect:11,bit:8,blank:8,block:3,blockcount:3,blocksiz:3,blog:[8,9],bluetooth:[3,12],bluetoothaccept:3,bluetoothactiveconnect:3,bluetoothconnect:3,bluetoothdiscoverycancel:3,bluetoothdiscoverystart:3,bluetoothfacad:[2,11],bluetoothgetconnecteddevicenam:3,bluetoothgetlocaladdress:3,bluetoothgetlocalnam:3,bluetoothgetremotedevicenam:3,bluetoothgetscanmod:3,bluetoothisdiscov:3,bluetoothmakediscover:3,bluetoothread:3,bluetoothreadbinari:3,bluetoothreadlin:3,bluetoothreadreadi:3,bluetoothsetlocalnam:3,bluetoothstop:3,bluetoothwrit:3,bluetoothwritebinari:3,board:3,bodi:3,bool:3,both:8,bottl:[11,12,14],bountysourc:0,box:[3,8],brand:9,briefli:4,bright:11,broadcast:3,brows:2,browsabl:7,browser:[2,3,9],bsddb:11,buffer:3,buffers:3,bug:[0,5],build:[7,12],built:[0,2,9,10,12],bundl:7,busi:7,button:[3,8,9,10,12],calendar:11,call:[7,8,11],callabck:7,camera:3,cameracapturepictur:3,camerafacad:[2,11],camerainteractivecapturepictur:3,camerastartpreview:3,camerastoppreview:3,can:[3,7,8,9,12],cancel:[3,8],cancl:3,cannot:3,cap:9,captur:3,card:3,categori:[3,7],caus:12,cdc:3,cdma:3,cell:3,center:9,cgi:11,cgihttpserv:11,cgitb:11,challeng:7,chanc:9,chang:3,charact:3,charg:3,charger:3,chat:0,check:[3,8],checkairplanemod:3,checkbluetoothst:3,checknetworkroam:3,checkout:7,checkringersilentmod:3,checkscreenon:3,checkwifist:3,choic:3,choos:[2,3,7,9,10],chosen:3,chunk:[3,11],claim:8,classnam:3,clear:3,click:[3,5,8,9,10],clipboard:11,clone:13,close:[3,9,12],cmd:11,code:[3,7,8,9,10,11,12],codec:11,codeop:11,collabor:4,collect:[3,11],colorsi:11,column:3,com:[3,9,13],come:4,comfort:9,comma:3,command:[9,11],commit:3,common:[6,12],commonintentsfacad:[2,11],commun:[2,8],compat:8,compil:[7,9,11,12],compileal:11,complet:12,complex:12,compon:9,comput:2,comun:9,config:11,configchang:7,configpars:11,confirm:3,connect:3,connid:3,consid:[1,3,4,8],consol:[0,2,12],constant:3,consult:9,contact:[3,5,7],contactsfacad:[2,11],contactsget:3,contactsgetattribut:3,contactsgetbyid:3,contactsgetcount:3,contactsgetid:3,contain:[0,3,8,9,11],contan:8,content:[2,3],context:[3,7],contextlib:11,contribut:[2,5],contributor:0,control:[9,11],conveni:10,convient:10,cooki:11,cookielib:11,cool:5,copi:[9,11],copy_reg:11,core:[0,2],corner:9,could:[0,1,3,5,7,9,10,11,12],couldn:7,countri:3,cprofil:11,cpu:3,creat:[3,5,8,9],creation:3,creator:2,critic:9,csv:11,ctype:11,current:3,dai:3,dashboard:[2,7],data:[1,7,11],date:3,dbhash:11,dead:3,debug:12,decim:[3,11],declar:12,def:12,defaulttext:3,defin:[3,12],definit:7,delaytim:3,delet:[3,9],deliveri:6,demand:0,demo:7,demonstr:3,depend:9,deriv:11,describ:8,desir:3,desktop:9,destinationaddress:3,detail:[3,4],dev:3,devci:3,develop:[0,3,5,6,7,8,9,11,12],devic:[0,1,3,9,12],dfault:3,dia:11,dial:3,dialog:[8,11],dialogcreatealert:3,dialogcreatedatepick:3,dialogcreatehorizontalprogress:3,dialogcreateinput:3,dialogcreatenfcbeammast:3,dialogcreatenfcbeamslav:3,dialogcreatepassword:3,dialogcreateseekbar:3,dialogcreatespinnerprogress:3,dialogcreatetimepick:3,dialogdismiss:3,dialoggetinput:[3,7,8],dialoggetpassword:3,dialoggetrespons:3,dialoggetselecteditem:3,dialogsetcurrentprogress:3,dialogsetitem:3,dialogsetmaxprogress:3,dialogsetmultichoiceitem:3,dialogsetnegativebuttontext:3,dialogsetneutralbuttontext:3,dialogsetpositivebuttontext:3,dialogsetsinglechoiceitem:3,dialogshow:3,didn:12,differ:[3,6],difflib:11,digit:3,dim:3,dircach:11,directli:[3,9,10],directori:9,dis:11,disabl:3,discharg:3,disconnect:3,discov:3,discover:3,discoveri:3,dismiss:3,displai:[3,8,12],distribut:9,distutil:11,django:12,dmych:[8,9],doc:8,doctest:11,document:[0,2,9,11],docxmlrpcserv:11,doe:[3,8,12],doesn:[1,12],doing:5,don:[7,8,9,11,12],dongl:3,doubl:3,down:[5,9],download:3,draft:[8,9],drawabl:3,driver:12,droid:[3,7,8],dtmf:3,dumbdbm:11,dummy_thread:11,durat:3,dure:3,dynload:2,each:3,easi:12,easili:[9,12],edit:[8,9,10],editor:[0,2,8,10],effici:12,els:[3,7,8],email:[0,4,7,11],empti:[3,8],enabl:3,encapsul:8,encod:[3,11],engin:[0,2,12],enqueu:3,ensornumb:3,enter:[8,9],enterpris:[0,2],env:1,environ:[3,7,9],equal:3,equival:3,error:[3,12],essenti:12,establish:3,estens:9,etc:[0,3,6,9,12],even:1,event:[2,3],eventclearbuff:3,eventdata:3,eventfacad:[2,11],eventgetbrodcastcategori:3,eventnam:3,eventpol:3,eventpost:3,eventregisterforbroadcast:3,eventunregisterforbroadcast:3,eventwait:3,eventwaitfor:3,ever:3,everi:8,exampl:[3,8,12],exceed:3,except:[8,12],execut:[1,3,8,9],executeqpi:3,exit:[3,12],expans:6,expect:3,experi:12,explicitli:9,explor:9,extend:[3,9],extplgplusnam:7,extra:[3,12],eyesfreefacad:[2,11],facad:[2,11],facebook:[0,1],fail:3,failur:3,fals:[3,8,12],familiar:8,faq:0,fast:12,featur:[0,2,3,9,10],feedback:[0,2,4],feel:9,field:[3,8],fifth:8,file:[2,3,9,10],filecmp:11,fileinput:11,filenam:3,filepath:[3,12],filter:7,find:[5,7,9],firmwar:3,first:[1,8,9],flag:[3,7],flask:12,flexiabl:12,fnmatch:11,folder:3,folk:6,follow:[0,1,2,5,7,8,9,11,12],foo:11,forc:3,forcestoppackag:3,forget:9,fork:0,format:[3,8],formatt:11,forward:0,found:[3,7,9],fpformat:11,fraction:11,framework:12,free:9,from:[0,1,2,3,8,9,11,12],front:12,ftdi:3,ftp:2,ftplib:11,full:[3,7],fulldismiss:3,fullkeyoverrid:3,fullqueri:3,fullquerydetail:3,fullscreen:[3,12],fullsetlist:3,fullsetproperti:3,fullshow:3,functool:11,funni:9,further:8,futur:12,future_builtin:11,gener:[3,7,9],generatedtmfton:3,genericpath:11,geo:11,geocod:3,get:[0,1,9,11,12],getcellloc:3,getclipboard:3,getconst:3,getdefault:3,getdeviceid:3,getdevicesoftwarevers:3,getextra:7,getinput:11,getint:3,getlastknownloc:3,getlaunchableappl:3,getline1numb:3,getmaxmediavolum:3,getmaxringervolum:3,getmediavolum:3,getneighboringcellinfo:3,getnetworkoper:3,getnetworkoperatornam:3,getnetworkstatu:3,getnetworktyp:3,getopt:11,getpackagevers:3,getpackageversioncod:3,getpass:11,getpassword:11,getphonetyp:3,getringervolum:3,getrunningpackag:3,getscreenbright:3,getscreentimeout:3,getsimcountryiso:3,getsimoper:3,getsimoperatornam:3,getsimserialnumb:3,getsimst:3,getstr:7,getsubscriberid:3,gettext:11,getvibratemod:3,getvoicemailalphatag:3,getvoicemailnumb:3,git:13,github:[0,7,13],gitter:0,given:3,glob:11,global:12,goal:2,goe:9,going:8,good:[3,8],googl:0,gps:3,grab:3,great:[0,2,4,6],greater:[3,4],greet:8,group:[0,4],grp:11,gsm:3,gsm_signal_strength:3,guarante:3,gui:12,guid:[5,6],gzip:11,handl:[3,7],handler:12,handler_class:12,happen:8,happi:0,hardwar:3,has:[0,3,7,9,10],hash:3,hashlib:11,have:[0,5,7,9,12],head:12,header:12,health:3,heapq:11,hear:0,heard:3,hei:8,hello1:8,hello:[0,2,3,7,9,12],helloworld:8,help:[0,2,7,9,10,12],hepler:11,here:[3,7,8,9],hide:12,higher:[0,3],highlight:[9,10],hipip:9,his:[8,9],hmac:11,home:12,homepag:12,hope:4,horizont:3,host:[2,11,12],hotshot:11,hour:3,how:[0,1,2,3,7],href:12,html:[3,10],htmlentitydef:11,htmllib:11,htmlparser:11,http:[3,7,12,13],httplib:11,icon:[3,9],iconnam:3,idea:[5,9],identifi:3,ids:3,ihook:11,imag:[3,7],imaplib:11,imei:3,imghdr:11,immedi:3,implement:[0,12],importerror:8,importlib:11,imputil:11,imsi:3,inbox:3,includ:[0,3,9],incom:3,incomingnumb:3,increas:3,indent:[8,9],independ:7,index:[3,9],indic:3,info:3,inform:[5,11,12],initi:3,innov:12,input:[3,8],inputtyp:3,insert:[3,12],inspect:11,instal:[7,9,12],instead:[8,9],integr:[3,9],intent:[7,11],interact:6,interest:5,interfac:[8,9,12],interpret:[0,9],introduc:[4,9],invit:4,is24hour:3,iso:3,issu:[0,3],item:3,its:9,java:3,javascript:10,jniu:12,job:12,join:[0,2,4,9],jpeg:3,jpegqual:3,json:[3,8,11],just:[1,2,8,9,10,11,12],keep:[5,12],kei:[3,8],kernel:3,keyboard:3,keyboardhidden:7,keycod:3,keyword:[10,11],kit:9,kivi:[2,12],know:[2,5,8],known:3,kuri65536:3,label:[3,7],lack:[0,9],languag:[3,12],languagemodel:3,laptop:[10,12],last:[3,8],later:[1,3],latitud:3,launch:[0,2,3,9],launchabl:3,launcher:7,layer:3,layout:11,lead:9,least:8,leav:[8,9],left:[8,9],length_short:7,let:[5,7,8,9,12],level:[3,9],lib:[9,11],libari:9,librari:[0,2,3,7,12],light:3,like:[0,1,3,6,7,9,10,11,12],line:[3,7,8,9,12],linecach:11,link:[1,9],linux4:11,list:[3,9],listen:3,load:[3,12],local:[0,2,3,9,10,11],localhost:12,locat:11,locationfacad:[2,11],locationprovid:3,locationprovideren:3,lock:3,log:[3,11],log_request:12,logcat:3,logic:8,logo:9,longitud:3,loop:3,lua:10,m78k0f0730:3,macpath:11,macurl2path:11,magnet:3,mai:[0,7],mail:3,mailbox:11,mailcap:11,main:[0,2,6,9,10],mainli:9,maintain:[6,9],make:[3,4,5,8,9,12],make_serv:12,makeint:3,maketext:7,maketoast:[3,7,8],manag:11,mani:[0,3,9,12],manual:11,map:3,mark:3,markupbas:11,master:3,match:3,max:3,maximum:3,maximumprogress:3,maximunprogress:3,maxresult:3,mbundl:7,mcc:3,md5:11,mean:8,meanin:8,media:11,mediaisplai:3,mediaplai:3,mediaplayclos:3,mediaplayerfacad:[2,11],mediaplayinfo:3,mediaplaylist:3,mediaplaypaus:3,mediaplayseek:3,mediaplaysetloop:3,mediaplaystart:3,mediarecorderfacad:[2,11],meet:0,meid:3,member:[0,2],mention:1,menu:[3,9],messag:[3,8],method:[3,12],mhlib:11,microphon:3,million:0,millisecond:3,mime:3,mimetool:11,mimetyp:[7,11],mimewrit:11,mimifi:11,mindist:3,minupdatedist:3,minut:3,miut:3,mix:[9,12],mjpeg:3,mmap:11,mnc:3,mobil:3,mode:[6,11,12],model:3,modifi:9,modul:8,modulefind:11,month:3,more:[2,4,9],most:[3,8,9,10,11,12],move:[0,10],mpyapi:7,msec:3,msisdn:3,much:9,multi:12,multifil:11,multipl:3,must:3,mutex:11,myappid:7,mywsgirefserv:12,name:[3,7,8,9,12],necessari:8,need:[0,1,7,8,11,12],neg:3,neighbor:3,netrc:11,network:[0,3],networkstatu:11,newest:0,next:[3,8,9],nfc:[11,12],nfcbeammessag:3,nice:9,nntplib:11,non:3,none:[3,8,12],note:[9,12],noth:8,notic:9,notif:[3,8,9],notifi:11,now:[1,5,7,8,9,12],ntpath:11,nturl2path:11,number:[3,9,11],number_of_ev:3,numer:3,numpi:9,object:[3,8,9],obvious:[8,9],occur:3,off:3,offer:[5,6,8,9,12],offici:0,offset:3,oldest:3,onactivityresult:7,onc:9,one:[3,8],onli:[2,3,7,8],onlin:[0,2],onpyapi:7,onqpyexec:7,oop:8,opcod:11,open:[0,2,3,8,9,12],opengl2:12,opengl:12,opensourc:6,oper:3,option:[3,12],optpars:11,order:[3,8],ordinari:9,org:[1,3,4,5,7,9],organis:2,orient:[3,7],origin:3,os2emxpath:11,other:[1,8,9,12],otherwis:[3,8],our:8,out:[2,5,7],output:8,outsid:7,over:3,overheat:3,overrid:[3,7],own:2,packag:[3,7,9,12],packagenam:3,packagevers:11,page:[9,12],paid:6,param:7,paramet:3,part:[4,6,12],partial:3,pass:[3,12],password:3,path:[3,12],paus:3,pdb:11,pelas:12,peopl:[9,12],percentag:3,period:3,permiss:12,phone:[3,10],phonecal:3,phonecallnumb:3,phonedi:3,phonedialnumb:3,phonefacad:[2,11],phonenumb:3,phonestat:11,pic:[9,10],pick:3,pickcontact:3,picker:3,pickl:11,pickletool:11,pickphon:3,pictur:[3,9],pip:[0,2,9,11],pip_consol:9,pipe:11,pitch:3,pizza:3,pkg_resourc:11,pkgutil:11,pl2303:3,plai:[0,3,8],plain:[7,10],plan:12,plat:11,platform:11,pleas:[0,1,3,4,5,7,9],plistlib:11,plu:9,plug:3,plugin:7,plyer:11,point:[3,12],polit:8,poll:3,pop:8,popen2:11,poplib:11,port:[3,12],posit:3,posixfil:11,posixpath:11,possibl:3,post:[3,9],power:[2,3],pprint:11,pre:[7,9,12],prefer:3,preferencesfacad:[2,11],prefgetal:3,prefgetvalu:3,prefputvalu:3,presenc:3,present:3,press:8,preview:[3,10],previou:12,previous:3,print:[8,12],prioriti:0,probabl:3,process:[3,7],product:7,profil:11,program:[0,8,12],progress:[1,11,12],project:[0,2,3,5,6,7,9,10,12],prompt:[3,8],properti:[3,9],propos:7,protect:7,provid:11,pstat:11,pty:11,publish:7,pull:[0,8],pure:[9,12],purpos:3,push:[0,2],put:[3,8,9,12],putextra:7,putstr:7,py_compil:11,pyclbr:11,pycod:7,pydoc:11,pydoc_data:11,pygam:1,python2:9,python:[0,1,2,7,8,9,10,12],qedit4web:10,qeditor:2,qpy:[0,1,2,11,12],qpy_run_with_shar:7,qpyapp:12,qpyhttpd:12,qpyinterfacefacad:[2,11],qpylib:7,qpypi:[2,9],qpyplu:9,qpython3:[0,3,7,12,16],qpython:[1,2,3,5,8,10,13,14],qpythoninit:11,qrcode:[2,9],qscript:12,qsl4a:[0,2],qualiti:3,queri:3,queryattribut:3,querycont:3,question:9,queue:[3,11],quick:[0,2],quickli:[2,9],quiet:12,quiethandl:12,quopri:11,qustion:0,radio:3,random:11,rapid:12,reach:9,reaction:8,read:[8,11],readbatterydata:3,reader:2,readi:5,readloc:3,readphonest:3,readsensor:3,readsignalstrength:3,real:8,receiv:3,receiveev:3,recent:[3,9],recipi:3,recogn:3,recognizeint:3,recognizespeech:3,recommend:12,recongn:3,reconnect:3,record:3,recordaudio:3,recordercapturevideo:3,recorderstartmicrophon:3,recorderstartvideo:3,recorderstop:3,redirect:9,refer:3,regist:3,regular:9,releas:[0,3,12],reload:12,remot:3,remov:[3,12],renam:9,replac:8,report:[0,2,3,4],repr:[11,12],repres:3,represent:3,request:[0,3,12],requestcod:7,requir:[7,11,12],requiredvers:3,resolut:3,resolutionlevel:3,resolv:3,resourc:[0,3,9,11,12],respond:8,respons:3,rest:9,result:[3,7,8,10],resultcod:[3,7],resultvalu:3,retriev:3,rexec:11,rfc822:11,ringer:11,river:7,rl78:3,rlcomplet:11,roam:3,robotpars:11,role:3,roll:3,root:[1,12],rout:12,router:12,rpc:8,rpcpostev:3,run:[0,1,2,3,8,9,10,12],runpi:11,runtim:12,said:9,same:[9,11],sampl:[1,2,3,7,12],samples:3,save:[3,8,9],scan:3,scanbarcod:3,scanner:3,sched:11,scheme:7,screen:[8,9,11],screenorient:7,screenshot:[8,9,12],script:[0,1,2,3,6,8,9,10,12],script_exec_pi:7,script_result:3,sdcard:[3,9,12],sdk:3,search:[3,9,10],second:[3,9],see:[3,8,9,10,11],seek:3,seem:7,select:3,selectionarg:3,self:[3,12],send:[0,3,4,5,7],sendbroadcast:11,sendbroadcastint:3,sendemail:11,sensor:3,sensormanagerfacad:[2,11],sensornumb:3,sensorsgetaccuraci:3,sensorsgetlight:3,sensorsreadacceleromet:3,sensorsreadmagnetomet:3,sensorsreadorient:3,sent:3,separ:[3,8],serial:[2,11],serv:12,serve_forev:12,server:[3,12],server_clos:12,server_stat:12,serveradapt:12,servic:[0,2,3,12],session:3,set:[3,7,9,11],setact:7,setclassnam:7,setclipboard:3,setmediavolum:3,setresultboolean:3,setresultbooleanarrai:3,setresultbyt:3,setresultbytearrai:3,setresultchar:3,setresultchararrai:3,setresultdoubl:3,setresultdoublearrai:3,setresultfloat:3,setresultfloatarrai:3,setresultinteg:3,setresultintegerarrai:3,setresultlong:3,setresultlongarrai:3,setresultserializ:3,setresultshort:3,setresultshortarrai:3,setresultstr:3,setresultstringarrai:3,setringervolum:3,setscreenbright:3,setscreentimeout:3,settingsfacad:[2,11],setuptool:11,sever:[0,12],sgmllib:11,sha:11,share:[1,2,3,9,10],shell:10,shelv:11,shlex:11,shortcut:9,shoul:12,should:[2,3,8,9],show:[3,7,8,9],shown:8,shutdown:12,shutil:11,signal:3,signalstrengthfacad:[2,11],silent:11,sim:3,similar:8,simpl:[7,8],simple_serv:12,simplehttpserv:11,simplexmlrpcserv:11,simplifi:11,sinc:9,singl:9,site:[9,11],sl4a:[0,2,3,6,11],slave:3,small:8,smartphon:12,smsdeletemessag:3,smsfacad:[2,11],smsgetattribut:3,smsgetmessag:3,smsgetmessagebyid:3,smsgetmessagecount:3,smsgetmessageid:3,smsmarkmessageread:3,smssend:3,smtpd:11,smtplib:11,sndhdr:11,snippet:10,social:0,socket:[3,11],socketserv:11,softwar:3,solut:12,solv:0,some:[0,2,3,5,8,9,10,12],sometim:0,somth:9,soon:[0,4],sour:1,sourc:[3,9,12],space:8,speak:3,specif:3,specifi:3,speech:3,speechrecognitionfacad:[2,11],spinner:3,spn:3,sponsor:[0,2],sqlite3:11,sre:11,sre_compil:11,sre_const:11,sre_pars:11,ssl:11,stackoverflow:0,stardard:[2,12],start:[0,8,10,11,12],startact:11,startactivityforresult:[3,7],startactivityforresultint:3,startactivityint:3,starteventdispatch:3,startinteractivevideorecord:3,startloc:3,startsens:3,startsensingthreshold:3,startsensingtim:3,starttrackingphonest:3,starttrackingsignalstrength:3,stat:[3,11],state:3,statement:8,static_fil:12,statu:11,statvf:11,stderr:12,step:[0,2],still:8,stop:[11,12],stopeventdispatch:3,stoploc:3,stopsens:3,stoptrackingphonest:3,stoptrackingsignalstrength:3,store:3,str:3,stream:3,street:3,strength:3,string:[3,7,8,11],stringio:11,stringold:11,stringprep:11,strong:12,struct:[3,11],subject:3,subprocess:11,subscrib:3,subtyp:3,succeed:3,success:3,successfulli:3,suggest:[2,4],sunau:11,sunaudio:11,suppli:3,support:[1,4,5,9,10,11,12],sure:7,swipe:9,symbol:11,symtabl:11,syntax:[9,10],sys:[7,12],sysconfig:11,syslog:11,system:[9,11],tabnanni:11,tag:3,take:[3,12],takepictur:3,talk:0,tap:[8,9],tarfil:11,target:[3,12],targetpath:3,tasker:7,team:[0,2,9,12],technic:12,technolog:[2,3],telnetlib:11,temperatur:3,tempfil:11,templat:12,termin:1,termio:11,test:[0,2,5,9],testapp:12,tester:[0,2,4],text:[3,7,8,9,10,12],texttospeechfacad:[2,11],textwrap:11,than:3,thank:[4,8,9],thei:[0,11],them:[3,8,9,11],thi:[0,3,4,5,7,8,9,11,12],thing:7,think:8,though:9,thread:[11,12],three:[6,8],threshold:3,through:[0,2,7,9,11,12],time:3,timeit:11,timeout:3,titl:[3,8,12],titlebar:12,toaiff:11,toast:[7,8,11],toggl:3,toggleairplanemod:3,togglebluetoothst:3,toggleringersilentmod:3,togglevibratemod:3,togglewifist:3,token:11,tone:3,tonedur:3,tonegeneratorfacad:[2,11],tool:[0,2,9],toolbar:[8,9],top:[8,9],touch:12,trace:11,traceback:11,track:3,tragi:3,translat:[0,2],treat:8,ttsisspeak:3,ttsspeak:3,tty:11,ttyusb0:3,tupl:3,twitter:0,two:[8,9],type:[3,6,9,11],typic:3,uifacad:[2,11],uix:12,unavail:3,undo:9,unicodedata:11,unind:8,uninstal:9,uniqu:3,unittest:11,unknown:3,unless:9,unplug:3,unreadonli:3,unspecifi:3,until:3,updat:3,upgrad:0,upload:[9,10],upper:9,uri:3,url:[3,10,12],urllib2:11,urllib:11,urlpars:11,usag:9,usb:[2,11],usbserialactiveconnect:3,usbserialconnect:3,usbserialdisconnect:3,usbserialgetdevicelist:3,usbserialgetdevicenam:3,usbserialhosten:3,usbserialread:3,usbserialreadbinari:3,usbserialreadreadi:3,usbserialwrit:3,usbserialwritebinari:3,use:[3,7,8,9,12],used:[3,8,11],usedrop:9,useful:[3,8,9],user:[2,3,6,7,8,9,11,12],userdict:11,userlist:11,usernam:8,userstr:11,uses:3,using:[0,5,6,8,9,11],usual:[9,11],util:3,uuid:[3,11],valu:[3,8],variabl:8,variou:3,veri:[8,10,12],version:[0,3],via:3,vibrat:11,video:[7,11],videos:3,view:[7,10,11,12],viewcontact:3,viewhtml:3,viewmap:3,visibl:3,voic:3,voltag:3,volum:11,wai:[0,2,8,9,12],wait:3,waitforev:3,wake:3,wakelockacquirebright:3,wakelockacquiredim:3,wakelockacquireful:3,wakelockacquireparti:3,wakelockfacad:[2,11],wakelockreleas:3,want:[0,2,3,4,5,7,8,9,12],warn:11,watch:7,wave:11,weakref:11,web:[12,14],webapp:[2,12],webbrows:11,webcam:3,webcamadjustqu:3,webcamfacad:[2,11],webcamstart:3,webserv:12,webview:[11,12],webviewshow:3,welcom:2,well:[6,8],were:[3,11],what:[5,8,9],when:[3,7,8,9,10,12],whenev:3,where:[0,3,5],which:[3,4,6,7,8,9,10,11,12],whichdb:11,whish:12,whole:8,why:[2,8],widget:3,wifi:3,wifidisconnect:3,wififacad:[2,11],wifigetconnectioninfo:3,wifigetscanresult:3,wifilockacquireful:3,wifilockacquirescanonli:3,wifilockreleas:3,wifireassoci:3,wifireconnect:3,wifistartscan:3,wiki:1,without:[9,12],wonder:8,work:[3,8],world:[0,2,12],worri:8,wow:8,write:[0,2,3,5,9,10],written:3,wrote:8,wsgiref:[11,12],wsgirequesthandl:12,xdrlib:11,xml:11,xmllib:11,xmlrpclib:11,year:3,yes:9,yet:12,you:[0,1,2,3,4,5,7,8,9,10,11,12],your:[0,2,5,8,9,12],yourself:12,youself:4,youtub:[3,7],zipfil:11},titles:["Welcome to read the QPython guide!","FAQ","Getting started","AndroidFacade","Welcome contribute","Join the tester community","Android","QPython Open API","Writing \u201cHello World\u201d","QPython: How To Start","Use the best way for developing","QPython built-in Libraries","QPython\u2019s main features","QPython\u6587\u6863\u4f53\u7cfb\u8bf4\u660e","\u5feb\u901f\u5f00\u59cb","???\u067f?\u02bc","\u4e2d\u6587\u7528\u6237\u5411\u5bfc"],titleterms:{"3rd":11,"\u02bc":15,"\u067f":15,"\u4e2d\u6587\u7528\u6237\u5411\u5bfc":16,"\u5982\u4f55\u63d0\u4ea4\u6587\u6863":13,"\u5982\u4f55\u63d0\u4ea4\u7ffb\u8bd1":13,"\u5982\u4f55\u8d21\u732e":16,"\u5feb\u901f\u5f00\u59cb":14,"\u66f4\u591a\u94fe\u63a5":16,"\u6b22\u8fce":16,"\u7528\u6237\u5f00\u53d1\u7ec4":16,"\u7f16\u7a0b\u6307\u5357":14,"\u8d21\u732e\u8005\u6307\u5357":14,"\u8d77\u6b65":16,"new":0,"qpython\u6587\u6863\u4f53\u7cfb\u8bf4\u660e":13,"qpython\u9ed1\u5ba2\u6307\u5357":14,For:0,Use:10,activityresultfacad:3,airplanermod:3,alert:3,android:6,androidfacad:3,androidhelp:11,api:[3,6,7,11],applic:7,applicationmanagerfacad:3,audio:3,author:3,barcod:3,batterymanagerfacad:3,becam:4,becom:5,best:10,bluetoothfacad:3,bright:3,brows:6,browser:10,built:[4,11],call:3,camerafacad:3,chines:0,choos:12,clipboard:3,commonintentsfacad:3,commun:[0,4,5,9],comput:10,consol:[6,9],contactsfacad:3,content:7,contribut:[0,4],contributor:2,control:3,core:6,dashboard:9,data:3,develop:[2,4,10],dia:3,dialog:3,document:4,dynload:11,editor:[6,9],enterpris:6,event:4,eventfacad:3,eyesfreefacad:3,facad:3,faq:1,featur:12,feedback:5,file:6,from:[7,10],ftp:6,geo:3,get:[2,3],getinput:3,getpassword:3,gui:0,guid:[0,2],hello:8,help:4,host:3,how:[4,9],inform:3,intent:3,join:5,kivi:6,launch:4,layout:3,let:0,librari:[6,8,9,11],local:4,locat:3,locationfacad:3,main:12,manag:3,media:3,mediaplayerfacad:3,mediarecorderfacad:3,member:4,mode:3,more:8,networkstatu:3,nfc:3,notifi:3,now:0,onlin:7,open:7,organis:4,other:0,own:7,packagevers:3,phonefacad:3,phonestat:3,pip:6,preferencesfacad:3,program:[2,4,6,9],progress:3,project:4,provid:3,python:[6,11],qeditor:10,qpy:[6,7],qpyinterfacefacad:3,qpypi:7,qpython:[0,4,6,7,9,11,12,16],qrcode:6,qsl4a:6,quick:6,read:[0,3],reader:6,report:5,requir:3,ringer:3,run:7,sampl:8,screen:3,script:7,sendbroadcast:3,sendemail:3,sensormanagerfacad:3,serial:3,servic:[6,7],settingsfacad:3,share:[4,7],should:12,signalstrengthfacad:3,silent:3,sl4a:8,smsfacad:3,some:7,speechrecognitionfacad:3,sponsor:4,stardard:11,start:[2,3,9],startact:3,statu:3,stop:3,suggest:5,support:0,system:3,test:4,tester:5,texttospeechfacad:3,thank:0,toast:3,tonegeneratorfacad:3,tool:6,translat:4,uifacad:3,usb:3,user:[0,4],vibrat:3,video:3,view:3,volum:3,wai:10,wakelockfacad:3,webapp:6,webcamfacad:3,webview:3,welcom:[0,4],what:0,who:0,why:12,wififacad:3,world:8,write:8,your:[7,10]}}) \ No newline at end of file diff --git a/docs/static/1.png b/docs/static/1.png deleted file mode 100644 index a539f0e8..00000000 Binary files a/docs/static/1.png and /dev/null differ diff --git a/docs/static/2.png b/docs/static/2.png deleted file mode 100644 index dd65bc6c..00000000 Binary files a/docs/static/2.png and /dev/null differ diff --git a/docs/static/3.png b/docs/static/3.png deleted file mode 100644 index cb9bbea5..00000000 Binary files a/docs/static/3.png and /dev/null differ diff --git a/docs/static/ajax-loader.gif b/docs/static/ajax-loader.gif deleted file mode 100644 index 61faf8ca..00000000 Binary files a/docs/static/ajax-loader.gif and /dev/null differ diff --git a/docs/static/basic.css b/docs/static/basic.css deleted file mode 100644 index 6df76b0a..00000000 --- a/docs/static/basic.css +++ /dev/null @@ -1,639 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- relbar ---------------------------------------------------------------- */ - -div.related { - width: 100%; - font-size: 90%; -} - -div.related h3 { - display: none; -} - -div.related ul { - margin: 0; - padding: 0 0 0 10px; - list-style: none; -} - -div.related li { - display: inline; -} - -div.related li.right { - float: right; - margin-right: 5px; -} - -/* -- sidebar --------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 10px 5px 0 10px; -} - -div.sphinxsidebar { - float: left; - width: 230px; - margin-left: -100%; - font-size: 90%; - word-wrap: break-word; - overflow-wrap : break-word; -} - -div.sphinxsidebar ul { - list-style: none; -} - -div.sphinxsidebar ul ul, -div.sphinxsidebar ul.want-points { - margin-left: 20px; - list-style: square; -} - -div.sphinxsidebar ul ul { - margin-top: 0; - margin-bottom: 0; -} - -div.sphinxsidebar form { - margin-top: 10px; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar #searchbox input[type="text"] { - width: 170px; -} - -img { - border: 0; - max-width: 100%; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -/* -- index page ------------------------------------------------------------ */ - -table.contentstable { - width: 90%; - margin-left: auto; - margin-right: auto; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -/* -- general index --------------------------------------------------------- */ - -table.indextable { - width: 100%; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable ul { - margin-top: 0; - margin-bottom: 0; - list-style-type: none; -} - -table.indextable > tbody > tr > td > ul { - padding-left: 0em; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -div.modindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -div.genindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -/* -- domain module index --------------------------------------------------- */ - -table.modindextable td { - padding: 2px; - border-collapse: collapse; -} - -/* -- general body styles --------------------------------------------------- */ - -div.body p, div.body dd, div.body li, div.body blockquote { - -moz-hyphens: auto; - -ms-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; -} - -a.headerlink { - visibility: hidden; -} - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink, -caption:hover > a.headerlink, -p.caption:hover > a.headerlink, -div.code-block-caption:hover > a.headerlink { - visibility: visible; -} - -div.body p.caption { - text-align: inherit; -} - -div.body td { - text-align: left; -} - -.first { - margin-top: 0 !important; -} - -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -img.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 7px; - margin: 10px 0 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* -- admonitions ----------------------------------------------------------- */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - border: 0; - border-collapse: collapse; -} - -table caption span.caption-number { - font-style: italic; -} - -table caption span.caption-text { -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 5px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -/* -- figures --------------------------------------------------------------- */ - -div.figure { - margin: 0.5em; - padding: 0.5em; -} - -div.figure p.caption { - padding: 0.3em; -} - -div.figure p.caption span.caption-number { - font-style: italic; -} - -div.figure p.caption span.caption-text { -} - -/* -- field list styles ----------------------------------------------------- */ - -table.field-list td, table.field-list th { - border: 0 !important; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -.field-name { - -moz-hyphens: manual; - -ms-hyphens: manual; - -webkit-hyphens: manual; - hyphens: manual; -} - -/* -- other body styles ----------------------------------------------------- */ - -ol.arabic { - list-style: decimal; -} - -ol.loweralpha { - list-style: lower-alpha; -} - -ol.upperalpha { - list-style: upper-alpha; -} - -ol.lowerroman { - list-style: lower-roman; -} - -ol.upperroman { - list-style: upper-roman; -} - -dl { - margin-bottom: 15px; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, .highlighted { - background-color: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.optional { - font-size: 1.3em; -} - -.sig-paren { - font-size: larger; -} - -.versionmodified { - font-style: italic; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -.footnote:target { - background-color: #ffa; -} - -.line-block { - display: block; - margin-top: 1em; - margin-bottom: 1em; -} - -.line-block .line-block { - margin-top: 0; - margin-bottom: 0; - margin-left: 1.5em; -} - -.guilabel, .menuselection { - font-family: sans-serif; -} - -.accelerator { - text-decoration: underline; -} - -.classifier { - font-style: oblique; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -span.pre { - -moz-hyphens: none; - -ms-hyphens: none; - -webkit-hyphens: none; - hyphens: none; -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -div.code-block-caption { - padding: 2px 5px; - font-size: small; -} - -div.code-block-caption code { - background-color: transparent; -} - -div.code-block-caption + div > div.highlight > pre { - margin-top: 0; -} - -div.code-block-caption span.caption-number { - padding: 0.1em 0.3em; - font-style: italic; -} - -div.code-block-caption span.caption-text { -} - -div.literal-block-wrapper { - padding: 1em 1em 0; -} - -div.literal-block-wrapper div.highlight { - margin: 0; -} - -code.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -code.descclassname { - background-color: transparent; -} - -code.xref, a code { - background-color: transparent; - font-weight: bold; -} - -h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { - background-color: transparent; -} - -.viewcode-link { - float: right; -} - -.viewcode-back { - float: right; - font-family: sans-serif; -} - -div.viewcode-block:target { - margin: -1px -10px; - padding: 0 10px; -} - -/* -- math display ---------------------------------------------------------- */ - -img.math { - vertical-align: middle; -} - -div.body div.math p { - text-align: center; -} - -span.eqno { - float: right; -} - -span.eqno a.headerlink { - position: relative; - left: 0px; - z-index: 1; -} - -div.math:hover a.headerlink { - visibility: visible; -} - -/* -- printout stylesheet --------------------------------------------------- */ - -@media print { - div.document, - div.documentwrapper, - div.bodywrapper { - margin: 0 !important; - width: 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - #top-link { - display: none; - } -} \ No newline at end of file diff --git a/docs/static/bestpython.png b/docs/static/bestpython.png deleted file mode 100644 index 59940ff3..00000000 Binary files a/docs/static/bestpython.png and /dev/null differ diff --git a/docs/static/comment-bright.png b/docs/static/comment-bright.png deleted file mode 100644 index 15e27edb..00000000 Binary files a/docs/static/comment-bright.png and /dev/null differ diff --git a/docs/static/comment-close.png b/docs/static/comment-close.png deleted file mode 100644 index 4d91bcf5..00000000 Binary files a/docs/static/comment-close.png and /dev/null differ diff --git a/docs/static/comment.png b/docs/static/comment.png deleted file mode 100644 index dfbc0cbd..00000000 Binary files a/docs/static/comment.png and /dev/null differ diff --git a/docs/static/doctools.js b/docs/static/doctools.js deleted file mode 100644 index 56549772..00000000 --- a/docs/static/doctools.js +++ /dev/null @@ -1,287 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(x) { - return decodeURIComponent(x).replace(/\+/g, ' '); -}; - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s == 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; - -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node) { - if (node.nodeType == 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { - var span = document.createElement("span"); - span.className = className; - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this); - }); - } - } - return this.each(function() { - highlight(this); - }); -}; - -/* - * backward compatibility for jQuery.browser - * This will be supported until firefox bug is fixed. - */ -if (!jQuery.browser) { - jQuery.uaMatch = function(ua) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || - /(webkit)[ \/]([\w.]+)/.exec(ua) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || - /(msie) ([\w.]+)/.exec(ua) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; - }; - jQuery.browser = {}; - jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; -} - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, - LOCALE : 'unknown', - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated == 'undefined') - return string; - return (typeof translated == 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated == 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - * see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075 - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - if (!body.length) { - body = $('body'); - } - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) == 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this == '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - }, - - initOnKeyListeners: function() { - $(document).keyup(function(event) { - var activeElementType = document.activeElement.tagName; - // don't navigate when in search box or textarea - if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') { - switch (event.keyCode) { - case 37: // left - var prevHref = $('link[rel="prev"]').prop('href'); - if (prevHref) { - window.location.href = prevHref; - return false; - } - case 39: // right - var nextHref = $('link[rel="next"]').prop('href'); - if (nextHref) { - window.location.href = nextHref; - return false; - } - } - } - }); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); \ No newline at end of file diff --git a/docs/static/down-pressed.png b/docs/static/down-pressed.png deleted file mode 100644 index 5756c8ca..00000000 Binary files a/docs/static/down-pressed.png and /dev/null differ diff --git a/docs/static/down.png b/docs/static/down.png deleted file mode 100644 index 1b3bdad2..00000000 Binary files a/docs/static/down.png and /dev/null differ diff --git a/docs/static/file.png b/docs/static/file.png deleted file mode 100644 index a858a410..00000000 Binary files a/docs/static/file.png and /dev/null differ diff --git a/docs/static/guide_extend_pic1.png b/docs/static/guide_extend_pic1.png deleted file mode 100644 index fae7de0e..00000000 Binary files a/docs/static/guide_extend_pic1.png and /dev/null differ diff --git a/docs/static/guide_extend_pic2.png b/docs/static/guide_extend_pic2.png deleted file mode 100644 index bcff8648..00000000 Binary files a/docs/static/guide_extend_pic2.png and /dev/null differ diff --git a/docs/static/guide_helloworld_pic1.png b/docs/static/guide_helloworld_pic1.png deleted file mode 100644 index 712e9864..00000000 Binary files a/docs/static/guide_helloworld_pic1.png and /dev/null differ diff --git a/docs/static/guide_howtostart_pic1.png b/docs/static/guide_howtostart_pic1.png deleted file mode 100644 index 54c666a7..00000000 Binary files a/docs/static/guide_howtostart_pic1.png and /dev/null differ diff --git a/docs/static/guide_howtostart_pic2.png b/docs/static/guide_howtostart_pic2.png deleted file mode 100644 index 296a5150..00000000 Binary files a/docs/static/guide_howtostart_pic2.png and /dev/null differ diff --git a/docs/static/guide_howtostart_pic3.png b/docs/static/guide_howtostart_pic3.png deleted file mode 100644 index f7caf8c7..00000000 Binary files a/docs/static/guide_howtostart_pic3.png and /dev/null differ diff --git a/docs/static/guide_howtostart_pic4.png b/docs/static/guide_howtostart_pic4.png deleted file mode 100644 index 6d2b2fc3..00000000 Binary files a/docs/static/guide_howtostart_pic4.png and /dev/null differ diff --git a/docs/static/guide_howtostart_pic5.png b/docs/static/guide_howtostart_pic5.png deleted file mode 100644 index 9e30aed4..00000000 Binary files a/docs/static/guide_howtostart_pic5.png and /dev/null differ diff --git a/docs/static/guide_ide_qedit4web.png b/docs/static/guide_ide_qedit4web.png deleted file mode 100644 index 09f2ccb3..00000000 Binary files a/docs/static/guide_ide_qedit4web.png and /dev/null differ diff --git a/docs/static/guide_ide_qedit4web_choose.png b/docs/static/guide_ide_qedit4web_choose.png deleted file mode 100644 index 6f3edfd3..00000000 Binary files a/docs/static/guide_ide_qedit4web_choose.png and /dev/null differ diff --git a/docs/static/guide_ide_qedit4web_develop.png b/docs/static/guide_ide_qedit4web_develop.png deleted file mode 100644 index 0fde32ce..00000000 Binary files a/docs/static/guide_ide_qedit4web_develop.png and /dev/null differ diff --git a/docs/static/guide_program_pic1.png b/docs/static/guide_program_pic1.png deleted file mode 100644 index 4cdf975c..00000000 Binary files a/docs/static/guide_program_pic1.png and /dev/null differ diff --git a/docs/static/ic_appstore@2x.png b/docs/static/ic_appstore@2x.png deleted file mode 100644 index d70ade36..00000000 Binary files a/docs/static/ic_appstore@2x.png and /dev/null differ diff --git a/docs/static/ic_appstore_2x.png b/docs/static/ic_appstore_2x.png deleted file mode 100644 index 1582c40d..00000000 Binary files a/docs/static/ic_appstore_2x.png and /dev/null differ diff --git a/docs/static/ic_community@2x.png b/docs/static/ic_community@2x.png deleted file mode 100644 index 6984f28f..00000000 Binary files a/docs/static/ic_community@2x.png and /dev/null differ diff --git a/docs/static/ic_facebook.png b/docs/static/ic_facebook.png deleted file mode 100644 index 027c863e..00000000 Binary files a/docs/static/ic_facebook.png and /dev/null differ diff --git a/docs/static/ic_faq@2x.png b/docs/static/ic_faq@2x.png deleted file mode 100644 index 1f89df68..00000000 Binary files a/docs/static/ic_faq@2x.png and /dev/null differ diff --git a/docs/static/ic_googleplay@2x.png b/docs/static/ic_googleplay@2x.png deleted file mode 100644 index 3b46dd00..00000000 Binary files a/docs/static/ic_googleplay@2x.png and /dev/null differ diff --git a/docs/static/ic_googleplay_2x.png b/docs/static/ic_googleplay_2x.png deleted file mode 100644 index 1e62373c..00000000 Binary files a/docs/static/ic_googleplay_2x.png and /dev/null differ diff --git a/docs/static/ic_googleplay_3_2x.png b/docs/static/ic_googleplay_3_2x.png deleted file mode 100644 index c5086adf..00000000 Binary files a/docs/static/ic_googleplay_3_2x.png and /dev/null differ diff --git a/docs/static/ic_new@2x.png b/docs/static/ic_new@2x.png deleted file mode 100644 index 215bb040..00000000 Binary files a/docs/static/ic_new@2x.png and /dev/null differ diff --git a/docs/static/ic_search.png b/docs/static/ic_search.png deleted file mode 100644 index 0b6623ad..00000000 Binary files a/docs/static/ic_search.png and /dev/null differ diff --git a/docs/static/ic_support@2x.png b/docs/static/ic_support@2x.png deleted file mode 100644 index c06804c9..00000000 Binary files a/docs/static/ic_support@2x.png and /dev/null differ diff --git a/docs/static/ic_twitter.png b/docs/static/ic_twitter.png deleted file mode 100644 index 8dcf2eeb..00000000 Binary files a/docs/static/ic_twitter.png and /dev/null differ diff --git a/docs/static/img_background.png b/docs/static/img_background.png deleted file mode 100644 index f2009093..00000000 Binary files a/docs/static/img_background.png and /dev/null differ diff --git a/docs/static/img_banner-1.jpg b/docs/static/img_banner-1.jpg deleted file mode 100644 index 35179f4e..00000000 Binary files a/docs/static/img_banner-1.jpg and /dev/null differ diff --git a/docs/static/img_banner-1.png b/docs/static/img_banner-1.png deleted file mode 100644 index 1be1cf32..00000000 Binary files a/docs/static/img_banner-1.png and /dev/null differ diff --git a/docs/static/img_banner-1@2x.jpg b/docs/static/img_banner-1@2x.jpg deleted file mode 100644 index e17b703a..00000000 Binary files a/docs/static/img_banner-1@2x.jpg and /dev/null differ diff --git a/docs/static/img_banner-1@2x.png b/docs/static/img_banner-1@2x.png deleted file mode 100644 index 0942fe79..00000000 Binary files a/docs/static/img_banner-1@2x.png and /dev/null differ diff --git a/docs/static/img_logo.png b/docs/static/img_logo.png deleted file mode 100644 index 1fdedce6..00000000 Binary files a/docs/static/img_logo.png and /dev/null differ diff --git a/docs/static/jquery-3.1.0.js b/docs/static/jquery-3.1.0.js deleted file mode 100644 index f2fc2747..00000000 --- a/docs/static/jquery-3.1.0.js +++ /dev/null @@ -1,10074 +0,0 @@ -/*eslint-disable no-unused-vars*/ -/*! - * jQuery JavaScript Library v3.1.0 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2016-07-07T21:44Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var document = window.document; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - - - - function DOMEval( code, doc ) { - doc = doc || document; - - var script = doc.createElement( "script" ); - - script.text = code; - doc.head.appendChild( script ).parentNode.removeChild( script ); - } -/* global Symbol */ -// Defining this global in .eslintrc would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.1.0", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android <=4.0 only - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = jQuery.isArray( copy ) ) ) ) { - - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray( src ) ? src : []; - - } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // As of jQuery 3.0, isNumeric is limited to - // strings and numbers (primitives or objects) - // that can be coerced to finite numbers (gh-2662) - var type = jQuery.type( obj ); - return ( type === "number" || type === "string" ) && - - // parseFloat NaNs numeric-cast false positives ("") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - !isNaN( obj - parseFloat( obj ) ); - }, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - - /* eslint-disable no-unused-vars */ - // See https://github.com/eslint/eslint/issues/6125 - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - DOMEval( code ); - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE <=9 - 11, Edge 12 - 13 - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // Support: Android <=4.0 only - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -} ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.0 - * https://sizzlejs.com/ - * - * Copyright jQuery Foundation and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2016-01-04 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - disabledAncestor = addCombinator( - function( elem ) { - return elem.disabled === true; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - - // ID selector - if ( (m = match[1]) ) { - - // Document context - if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 - // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { - - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", (nid = expando) ); - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[i] = "#" + nid + " " + toSelector( groups[i] ); - } - newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement("fieldset"); - - try { - return !!fn( el ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - // Known :disabled false positives: - // IE: *[disabled]:not(button, input, select, textarea, optgroup, option, menuitem, fieldset) - // not IE: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Check form elements and option elements for explicit disabling - return "label" in elem && elem.disabled === disabled || - "form" in elem && elem.disabled === disabled || - - // Check non-disabled form elements for fieldset[disabled] ancestors - "form" in elem && elem.disabled === false && ( - // Support: IE6-11+ - // Ancestry is covered for us - elem.isDisabled === disabled || - - // Otherwise, assume any non-