Demo project for the mmir framework in combination with Apache Cordova
with platform android
.
This project uses mmir-lib version 5.x.x, and jQuery Mobile as a GUI library:
although jQuery Mobile
is somewhat dated, this projects demonstrates, how to use
mmir-lib
in a project that does not utilize any additional build-tools
like webpack
, browserify
or similar.
Try the demo page:
- speech input will only work in Chrome
(mmir
provides speech plugins for other browser, see the mmir wiki for more details) - for speech input, permission to use the browser's microphone needs to be granted
See the mmir project page for more details, guides, API documentation etc.
Extended build configuration settings for mmir-lib
can be specified via file
mmir.build.config.js
which is automatically read by mmir-tooling/utils/cordova-build-tool.js
if it exists (see step 3 in section Create Manually).
The example file mmir.build.config.js
contains an empty configuration (i.e.
default build configuration will be used), and in addition an alternative
configuration that specifies a different state model for the DialogManager
which will use animated transitions when changing views.
To enable the "animated transitions" state model, export the variable
stateModelWithViewTransitions
instead of defaultConfig
in mmir.build.config.js
.
For more options and setting see mmir-tooling.
-
create a new
cordova
project, for details see cordova documentation:cordova create ...
-
setup
cordova
andmmir
# setup cordova and cordova-plugins cordova platform add android cordova plugin add cordova-plugin-vibration cordova plugin add cordova-plugin-network-information # custom version of cordova-plugin-media that provides media-ready event (for asnyc audio loading) cordova plugin add git+https://github.com/mmig/cordova-plugin-media.git#CB-6880-mediaready-state-impl # setup mmir npm install --save git+https://github.com/mmig/mmir-lib.git npm install --save-dev git+https://github.com/mmig/mmir-tooling.git # install mmir-lib files into www/mmirf # as npm script -> see "scripts" in package.json npm run install-mmir-lib # or as bin-script (Windows) node_modules\.bin\mmirinstall www/mmirf --force # install mmir-plugins cordova plugin add git+https://github.com/mmig/mmir-plugin-speech-android.git#mmir-v5
-
integration
mmir-tooling
intocordova
build process:
add entry toconfig.xml
<hook type="before_prepare" src="node_modules/mmir-tooling/utils/cordova-build-tool.js" />
-
copy assets from this project's
www/
directory into thewww/
directory of the newly createdcordova
project -
run
mmir-tooling
viacordova
# run mmir-tooling via cordova cordova prepare # ... or run mmir-tooling and build cordova cordova build android # ... or run mmir-tooling and build cordova and run platform cordova run android
for previous versions of the mmir-starter-kit
see repository mmir-v4-starter-kit
which contains examples that use mmir-lib
v4.x and before.
Note that these examples are deprecated and will not be updated anymore.
If not stated otherwise, the code, resource files etc. are provided under the MIT license (see license file).