Skip to content

Commit ebac362

Browse files
authored
Merge pull request #32 from SEPIA-Framework/dev
v0.24.0;
2 parents a9732f1 + 61fc230 commit ebac362

File tree

253 files changed

+18605
-7177
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

253 files changed

+18605
-7177
lines changed

Cordova-Plugin-Versions.txt

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
1-
Android (tested April 2019)
1+
Android (tested October 2020)
22
-----------------------------
3-
cordova version 7.1.0
4-
cordova platform version android@6.4.0
3+
cordova version 9.0.0
4+
cordova platform version android@8.1.0
55
cordova-plugin-inappbrowser custom version from plugin_mods folder
66
org.apache.cordova.speech.speechrecognition custom version from plugin_mods folder
77

88
"dependencies": {
9-
"com-darryncampbell-cordova-plugin-intent": "^1.1.6",
10-
"cordova-android": "^6.4.0",
11-
"cordova-android-support-gradle-release": "^3.0.0",
12-
"cordova-custom-config": "^5.1.0",
13-
"cordova-plugin-badge": "^0.8.8",
14-
"cordova-plugin-ble": "^2.0.1",
15-
"cordova-plugin-cache-clear": "^1.3.8",
16-
"cordova-plugin-compat": "^1.2.0",
17-
"cordova-plugin-device": "^2.0.2",
18-
"cordova-plugin-eddystone": "^1.3.0",
19-
"cordova-plugin-file": "^6.0.1",
20-
"cordova-plugin-geolocation": "^4.0.1",
21-
"cordova-plugin-inappbrowser": "^3.0.0",
22-
"cordova-plugin-insomnia": "git+https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git",
23-
"cordova-plugin-local-notification": "^0.9.0-beta.2",
24-
"cordova-plugin-nativestorage": "^2.3.2",
25-
"cordova-plugin-navigationbar-color": "0.0.8",
26-
"cordova-plugin-splashscreen": "^5.0.2",
27-
"cordova-plugin-statusbar": "^2.4.2",
28-
"cordova-plugin-tts": "^0.2.3",
29-
"cordova-plugin-whitelist": "^1.3.3",
30-
"cordova-universal-links-plugin": "^1.2.1",
31-
"es6-promise-plugin": "^4.2.2",
32-
"phonegap-plugin-media-stream": "^1.2.1",
33-
"speechrecognition": "file:plugin_mods\\speechrecognition\\org.apache.cordova.speech.speechrecognition",
34-
"org.apache.cordova.speech.speechrecognition": "plugin_mods/speechrecognition/org.apache.cordova.speech.speechrecognition"
9+
"com-darryncampbell-cordova-plugin-intent": "^2.0.0",
10+
"cordova-android": "^8.1.0",
11+
"cordova-android-support-gradle-release": "^3.0.1",
12+
"cordova-custom-config": "^5.1.0",
13+
"cordova-plugin-badge": "^0.8.8",
14+
"cordova-plugin-ble": "^2.0.1",
15+
"cordova-plugin-cache-clear": "^1.3.8",
16+
"cordova-plugin-compat": "^1.2.0",
17+
"cordova-plugin-device": "^2.0.3",
18+
"cordova-plugin-eddystone": "^1.3.0",
19+
"cordova-plugin-file": "^6.0.2",
20+
"cordova-plugin-geolocation": "^4.0.2",
21+
"cordova-plugin-inappbrowser": "^4.0.0",
22+
"cordova-plugin-insomnia": "git+https://github.com/tombolaltd/cordova-plugin-insomnia.git",
23+
"cordova-plugin-local-notification": "git+https://github.com/timkellypa/cordova-plugin-local-notifications.git",
24+
"cordova-plugin-nativestorage": "^2.3.2",
25+
"cordova-plugin-navigationbar-color": "0.0.9",
26+
"cordova-plugin-splashscreen": "^5.0.4",
27+
"cordova-plugin-statusbar": "^2.4.3",
28+
"cordova-plugin-tts": "^0.2.3",
29+
"cordova-plugin-whitelist": "^1.3.4",
30+
"cordova-universal-links-plugin": "git+https://github.com/sepia-assistant/cordova-universal-links-plugin.git",
31+
"es6-promise-plugin": "^4.2.2",
32+
"phonegap-plugin-media-stream": "^1.2.1",
33+
"speechrecognition": "file:plugin_mods/speechrecognition/org.apache.cordova.speech.speechrecognition"
3534
}

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ Features of the app are:
2727

2828
### Quick-start
2929

30-
The latest release version is always **online** at: `https://sepia-framework.github.io/app/index.html` (requires server with SSL)
30+
The latest release version is **online** at: https://sepia-framework.github.io/app/index.html
3131
When you've installed **SEPIA-Home** the default link is: `http://[sepia-home-IP]:20721/app/index.html`
3232
The Android app can be installed via the **Google Play Store**: [Play Store link](https://play.google.com/store/apps/details?id=de.bytemind.sepia.app.web)
3333

34-
Note: If you don't operate your own SEPIA server you can still open the app in "demo-mode" (simply skip the log-in) and look around a bit though most of the features will not be active in this mode.
34+
Note: If you don't operate your own SEPIA server you can still open the public app in **demo-mode** (simply skip the log-in) and look around a bit though many of the features will not be available in this mode.
3535
More languages for Android and an iOS app are in beta-test phase and will be release "when they are done" :-p
3636

3737
For experts only: Use the build-scripts in this repository to build your own version of the app (Android and iOS are available).
@@ -42,6 +42,8 @@ You can modify the client configuration via several URL parameters:
4242
* `host` - SEPIA server host, e.g. IP address or domain + path
4343
* `lang` - Default language code for client (ISO code)
4444
* `isApp` - 'true' will change client to behave as if it was an app (not a website), e.g. login tokens will be valid for much longer etc.
45+
* `pwa` - 'true' will put the app in a PWA (progressive web app) compatible state by enabling the service-worker.
46+
* `noSW` - 'true' will force disable the service-worker of the page. This might be useful to find issues related to blocked cookies etc.
4547
* `isTiny` - 'true' will optimize the UI and controls to support small displays (e.g. Apple Watch or 240x240px screens)
4648
* `isHeadless` or `autoSetup` - Load client settings from file (settings.js) and trigger setup mode if no user is logged in. 'isHeadless' will set some supported client features as well (e.g. don't open browser tabs etc.).
4749
* `env` - 'environment' setting for client

config.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget id="org.example.sepia.app.web" version="0.23.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
2+
<widget id="org.example.sepia.app.web" version="0.24.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
33
<name>S.E.P.I.A.</name>
44
<description>
5-
Prototype of S.E.P.I.A. framework client
5+
S.E.P.I.A. framework client app
66
</description>
77
<author email="[email protected]" href="https://sepia.example.org">
88
Name - Organisation
99
</author>
1010

1111
<content src="start.html" />
1212

13-
<preference name="orientation" value="portrait" />
13+
<preference name="orientation" value="default" />
1414
<!--<preference name="BackgroundColor" value="0xff000000"/>-->
1515

1616
<!--plugins-->

create-android-project.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ cd $APP_NAME
2020
sleep 2
2121
echo "#Adding plugins ..."
2222
cordova plugin add cordova-plugin-device
23+
cordova plugin add cordova-plugin-screen-orientation
2324
cordova plugin add cordova-plugin-geolocation
2425
cordova plugin add cordova-plugin-inappbrowser
2526
cordova plugin add cordova-plugin-tts
@@ -76,4 +77,6 @@ mkdir -p "platforms/android/app/src/main/res/values-v21"
7677
cp -r "resources/themes/android/values-v21/" "platforms/android/app/src/main/res/values-v21/"
7778
cp -r "resources/config/android/xml/" "platforms/android/app/src/main/res/xml/"
7879
echo "#DONE"
79-
echo "If everything worked out fine the next step would be to build the app from the %APP_NAME% folder: cordova build android"
80+
echo "If everything worked out fine the next step would be to build the app from the %APP_NAME% folder: cordova build android."
81+
echo "Alternatively just open the project in Android Studio and let Gradle build it."
82+
echo "If you get Gradle errors try setting 'distributionUrl' version in gradle-wrapper.properties to '4.10.1-all'."

create-ios-project-uiwebview.sh

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,40 @@ cd $APP_NAME
1919
sleep 2
2020
echo "#Adding plugins ..."
2121
cordova plugin add cordova-plugin-device
22+
cordova plugin add cordova-plugin-screen-orientation
2223
cordova plugin add cordova-plugin-geolocation
23-
#cordova plugin add cordova-plugin-inappbrowser
24-
cordova plugin add cordova-plugin-inappbrowser-wkwebview
25-
cordova plugin add cordova-plugin-wkwebview-engine
24+
cordova plugin add cordova-plugin-inappbrowser
25+
#cordova plugin add cordova-plugin-inappbrowser-wkwebview
26+
#cordova plugin add cordova-plugin-wkwebview-engine
2627
cordova plugin add cordova-plugin-tts
2728
cordova plugin add cordova-plugin-whitelist
2829
cordova plugin add cordova-universal-links-plugin
2930
cordova plugin add cordova-plugin-statusbar
30-
cordova plugin add cordova-plugin-splashscreen
31+
#cordova plugin add cordova-plugin-splashscreen #is now part of platform
3132
#cordova plugin add https://github.com/apache/cordova-plugin-splashscreen.git -- NOTE: use this in case releases are too old
3233
cordova plugin add cordova-plugin-cache-clear
33-
cordova plugin add plugin_mods/speechrecognition/org.apache.cordova.speech.speechrecognition
34+
#TODO: needs complete remake
35+
#cordova plugin add plugin_mods/speechrecognition/org.apache.cordova.speech.speechrecognition
3436
#cordova plugin add de.appplant.cordova.plugin.local-notification
3537
#cordova plugin add plugin_mods/localnotifications/de.appplant.cordova.plugin.local-notification
36-
cordova plugin add cordova-plugin-local-notification
38+
#cordova plugin add cordova-plugin-local-notification
39+
cordova plugin add https://github.com/timkellypa/cordova-plugin-local-notifications
3740
cordova plugin add cordova-plugin-file
3841
cordova plugin add cordova-plugin-nativestorage
3942
cordova plugin add cordova-plugin-audioinput
4043
cordova plugin add plugin_mods/iosbackgroundaudio/nl.kingsquare.cordova.background-audio
41-
cordova plugin add https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git
44+
#cordova plugin add https://github.com/EddyVerbruggen/Insomnia-PhoneGap-Plugin.git
45+
cordova plugin add https://github.com/tombolaltd/cordova-plugin-insomnia.git
4246
cordova plugin add phonegap-plugin-battery-status
4347
cordova plugin add cordova-plugin-eddystone
4448
#
4549
# overwrite plugin mods
4650
sleep 2
4751
echo "#Updating plugins ..."
4852
cp "plugin_mods/universallinks/xcodePreferences.js" "plugins/cordova-universal-links-plugin/hooks/lib/ios/xcodePreferences.js"
49-
cp "plugin_mods/inappbrowser/ios/CDVInAppBrowser_wkwv.m" "plugins/cordova-plugin-inappbrowser-wkwebview/src/ios/CDVInAppBrowser.m"
50-
cp "plugin_mods/inappbrowser/ios/CDVInAppBrowser_wkwv.h" "plugins/cordova-plugin-inappbrowser-wkwebview/src/ios/CDVInAppBrowser.h"
53+
#TODO: Update WkWebView version
54+
#cp "plugin_mods/inappbrowser/ios/CDVInAppBrowser_wkwv.m" "plugins/cordova-plugin-inappbrowser-wkwebview/src/ios/CDVInAppBrowser.m"
55+
#cp "plugin_mods/inappbrowser/ios/CDVInAppBrowser_wkwv.h" "plugins/cordova-plugin-inappbrowser-wkwebview/src/ios/CDVInAppBrowser.h"
5156
cp "plugin_mods/cacheclear/ios/CacheClear.m" "plugins/cordova-plugin-cache-clear/src/ios/CacheClear.m"
5257
cp "plugin_mods/tts/ios/CDVTTS.m" "plugins/cordova-plugin-tts/src/ios/CDVTTS.m"
5358
#
@@ -59,7 +64,7 @@ npm install xcode
5964
# add ios platform
6065
sleep 2
6166
echo "#Adding platform ..."
62-
cordova platform add ios@5.0.1
67+
cordova platform add ios@6.1.1
6368
#
6469
# prepare build
6570
echo "#Preparing build ..."
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## ADD NEW ICON
2+
3+
* Open Android Studio
4+
* Right click 'app' -> new -> image asset
5+
* Choose 512x512px icon from 'www/img' folder
6+
* Choose background color
7+
* Confirm

plugin_mods/manual_fix_for_splashscreen.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## ADD THE CODE FROM BELOW TO 'SplashScreen.java'
22

3+
* Open: `src\main\java\org\apache\cordova\splashscreen`
4+
* Go to approx. line 315
5+
* Do code change described below
6+
37
```
48
// Create and show the dialog
59
splashDialog = new Dialog(context, android.R.style.Theme_Translucent_NoTitleBar);

plugin_mods/speechrecognition/org.apache.cordova.speech.speechrecognition/src/android/SpeechRecognition.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void onRequestPermissionResult(int requestCode, String[] permissions,
6767
{
6868
if(r == PackageManager.PERMISSION_DENIED)
6969
{
70-
fireErrorEvent();
70+
fireErrorEvent(SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS);
7171
fireEvent("end");
7272
return;
7373
}
@@ -250,10 +250,22 @@ private void fireEvent(String type) {
250250
this.speechRecognizerCallbackContext.sendPluginResult(pr);
251251
}
252252

253-
private void fireErrorEvent() {
253+
private void fireErrorEvent(int code) {
254254
JSONObject event = new JSONObject();
255255
try {
256256
event.put("type","error");
257+
event.put("code", code);
258+
if (code == SpeechRecognizer.ERROR_NO_MATCH || code == SpeechRecognizer.ERROR_SPEECH_TIMEOUT){
259+
event.put("error", "no-speech");
260+
}else if (code == SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS){
261+
event.put("error", "not-allowed");
262+
}else if (code == SpeechRecognizer.ERROR_SERVER){
263+
event.put("error", "speech server");
264+
}else if (code == SpeechRecognizer.ERROR_NETWORK || code == SpeechRecognizer.ERROR_NETWORK_TIMEOUT){
265+
event.put("error", "network");
266+
}else{
267+
event.put("error", "code: " + code);
268+
}
257269
} catch (JSONException e) {
258270
// this will never happen
259271
}
@@ -295,7 +307,7 @@ public void onEndOfSpeech() {
295307
public void onError(int error) {
296308
Log.d(LOG_TAG, "error speech "+error);
297309
if (listening || error == 9) {
298-
fireErrorEvent();
310+
fireErrorEvent(error);
299311
fireEvent("end");
300312
}
301313
listening = false;

win-create-android-project.bat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ REM add plugins
1919
sleep 2
2020
echo "#Adding plugins ..."
2121
cordova plugin add cordova-plugin-device |more
22+
cordova plugin add cordova-plugin-screen-orientation |more
2223
cordova plugin add cordova-plugin-geolocation |more
2324
cordova plugin add cordova-plugin-inappbrowser |more
2425
cordova plugin add cordova-plugin-tts |more
@@ -72,5 +73,7 @@ xcopy "resources\themes\android\values" "platforms\android\app\src\main\res\valu
7273
xcopy "resources\themes\android\values-v21" "platforms\android\app\src\main\res\values-v21" /i |more
7374
xcopy "resources\config\android\xml" "platforms\android\app\src\main\res\xml" /i |more
7475
echo "#DONE"
75-
echo "If everything worked out fine the next step would be to build the app from the %APP_NAME% folder: cordova build android"
76+
echo "If everything worked out fine the next step would be to build the app from the %APP_NAME% folder: cordova build android."
77+
echo "Alternatively just open the project in Android Studio and let Gradle build it."
78+
echo "If you get Gradle errors try setting 'distributionUrl' version in gradle-wrapper.properties to '4.10.1-all'."
7679
pause

0 commit comments

Comments
 (0)