Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
graphefruit committed Sep 14, 2023
2 parents 2b722bf + 917b0cb commit 573dc73
Show file tree
Hide file tree
Showing 45 changed files with 1,070 additions and 785 deletions.
53 changes: 13 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Different features are supported by this app, a brief overview you'll find here.
- [Mike](https://github.com/mike1808) - For supporting Acaia Scales & DIY Pressure Sensor
- [Myles](https://github.com/mylesagray) - For supporting Thermo Bluetooth Devices
- [Herman](https://github.com/hermanmak) - For supporting Felicita Arc
- [Yannick](https://github.com/randomcoffeesnob) - For supporting DiFluid Microbalance & Smart Chef Scale
- [Yannick](https://github.com/randomcoffeesnob) - For supporting DiFluid Microbalance & Smart Chef Scale, BlackCoffee.IO. Also for adding Lokalise

## Getting the App

Expand Down Expand Up @@ -177,6 +177,10 @@ Thats why just Android is support by now.

You can backup Beanconqueror via iCloud, with this you can transfer all data to another device without any loss.

### Android - Backup & Restore

Have a look here: [FAQ](https://beanconqueror.com/faq)

### Analytics

All tracked data/analytics are visible here: ![Website](https://beanconqueror.com/data-tracking.html)
Expand All @@ -185,7 +189,7 @@ All tracked data/analytics are visible here: ![Website](https://beanconqueror.co

The app needs access to your filesystem aswell as the camera

- _Filesytem_: Needed to save images which you took on beans/brews etc or exporting your settings.
- _Filesytem_: Needed to save images which you took on beans/brews etc or exporting your settings. - Outdated after Android 13 changes.
- _Camera_: Needed to take picures or access the photo library to set images for your beans/brews
- _Internet_: NOT NEEDED! But needed if you want to send me some analytics information to make the app better :)
- _GPS_: NOT NEEDED! Activated through settings, saves the brew location
Expand All @@ -206,12 +210,14 @@ https://sonarcloud.io/dashboard?id=graphefruit_Beanconqueror

## Get Started

npm install -g cordova@11.0.0
npm install -g cordova@12.0.0
npm install -g @ionic/cli
npm run prepare

## Build iOS

Always use the .workspace-File to open in Xcode

```
ionic cordova build ios
```
Expand All @@ -236,19 +242,19 @@ cordova-check-plugins

### NPM-Version

npm-v -> 9.4.0 - works
npm -v -> 9.6.4 - works

### NodeJS-Version

node -v -> v16.15.0 -> works
node -v -> v18.15.0 -> works

### iOS-Version:

`ionic cordova platform add ios@6.2.0`
`ionic cordova platform add ios@7.0.1`

### Android-Version:

`ionic cordova platform add android@10.1.2`
`ionic cordova platform add android@12.0.0`

### Github Page Hosting

Expand All @@ -266,39 +272,6 @@ brew install bundletool
bundletool build-apks --bundle=./app.aab --output=./app.apks
bundletool install-apks --apks=app.apks

#Overwrite plugin.xmls
After SDK Target 31 needs to be supported, and older plugins doesn't have the android-export flag, we need to add them ourself...

Cordova-plugin-x-socialsharing
`<receiver android:name="nl.xservices.plugins.ShareChooserPendingIntent" android:exported="false" android:enabled="true">`

Fixing SocialSharing.java
` int flag = PendingIntent.FLAG_MUTABLE;
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.S) {
flag = PendingIntent.FLAG_UPDATE_CURRENT;
}
final PendingIntent pendingIntent = PendingIntent.getBroadcast(cordova.getActivity().getApplicationContext(), 0, receiverIntent, flag);`
-> https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/pull/1202/commits

cordova-plugin-telerik-imagepicker

1. `<activity android:exported="false" android:label="@string/multi_app_name" android:name="com.synconset.MultiImageChooserActivity" android:theme="@style/Theme.AppCompat.Light">`
2. ` <config-file file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:requestLegacyExternalStorage="true" />
</config-file>` -> change edit-config to config-file
fttx-phonegap-plugin-barcodescanner
`<activity android:name="com.google.zxing.client.android.encode.EncodeActivity" android:exported="false" android:label="Share"/>`

cordova-plugin-file/src/android
ContentFileSystem.java
-> Temp fix for import
` String encodedPath = inputURL.uri.getEncodedPath();
String authorityAndPath = encodedPath.substring(encodedPath.indexOf(this.name) + 1 + this.name.length() + 2);`

Compile deson't work on android?
Try:
`cordova build android -- --jvmargs='-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED'`

iOS:
Always check
That ` wkWebView.inspectable = YES;` is never be in the code, else it wont work on older iOS devices
50 changes: 28 additions & 22 deletions config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.beanconqueror.app" version="6.6.1" xmlns="http://www.w3.org/ns/widgets">
<widget id="com.beanconqueror.app" version="6.6.2" xmlns="http://www.w3.org/ns/widgets">
<name>Beanconqueror</name>
<description />
<author email="[email protected]" href="https://github.com/graphefruit/beanconqueror">Lars Saalbach</author>
Expand All @@ -15,8 +15,9 @@
<allow-intent href="ionic:" />
<allow-navigation href="*" />
<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="22" />
<preference name="android-minSdkVersion" value="24" />
<preference name="android-targetSdkVersion" value="33" />
<preference name="android-compileSdkVersion" value="33" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="SplashShowOnlyFirstTime" value="false" />
Expand All @@ -26,8 +27,20 @@
<preference name="StatusBarBackgroundColor" value="#F0F0F0" />
<preference name="StatusBarStyle" value="light" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<preference name="AndroidExtraFilesystems" value="files,files-external,documents,cache,cache-external" />
<preference name="iosExtraFilesystems" value="library,library-nosync,documents,documents-nosync,cache,bundle,root" />
<platform name="android">
<edit-file mode="merge" parent="/resources" target="app/src/main/res/values/themes.xml">
<style name="Theme.App.SplashScreen" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">#FFFFFF</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/notification_icon.png</item>
<item name="windowSplashScreenBrandingImage">@drawable/notification_icon.png</item>
<item name="windowSplashScreenIconBackgroundColor">#FFFFFF</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
<item name="postSplashScreenTheme">@style/MyTheme</item>
</style>
</edit-file>
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/android/adaptiveicon/mipmap-xxxhdpi/ic_launcher.png" />
<preference name="AndroidBlacklistSecureSocketProtocols" value="SSLv3,TLSv1" />
<preference name="scheme" value="https" />
<preference name="hostname" value="beanconqueror.com" />
Expand All @@ -37,6 +50,7 @@
<application android:networkSecurityConfig="@xml/network_security_config" />
</edit-config>
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
<activity android:theme="@style/Theme.App.SplashScreen" />
<activity android:exported="true" android:label="webIntentFilter" android:name="com.beanconqueror.app">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
Expand Down Expand Up @@ -71,18 +85,6 @@
<resource-file src="resources/android/adaptiveicon/mipmap-xxhdpi/ic_launcher_round.png" target="app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png" />
<resource-file src="resources/android/adaptiveicon/mipmap-xxxhdpi/ic_launcher.png" target="app/src/main/res/mipmap-xxxhdpi/ic_launcher.png" />
<resource-file src="resources/android/adaptiveicon/mipmap-xxxhdpi/ic_launcher_round.png" target="app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
<splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
<splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
Expand All @@ -92,7 +94,6 @@
<hook src="plugins/cordova-plugin-ble-central/stripDuplicatePermissions.js" type="after_prepare" />
</platform>
<platform name="ios">
<preference name="InspectableWebview" value="true" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
Expand Down Expand Up @@ -199,6 +200,18 @@
</dict>
</array>
</edit-config>
<edit-file file="*-Info.plist" mode="merge" target="NSHealthShareUsageDescription">
<string>App needs access to Health to read, write and update the amount of caffeine by each coffee brew, which was recorded with this app.</string>
</edit-file>
<edit-file file="*-Info.plist" mode="merge" target="NSHealthUpdateUsageDescription">
<string>App needs access to Health to read, write and update the amount of caffeine by each coffee brew, which was recorded with this app.</string>
</edit-file>
<edit-file file="*-Info.plist" mode="merge" target="NSBluetoothPeripheralUsageDescription">
<string>Blutooth access needed to connect smartscales, pressure devices, thermo devices or refractometer. With this these data to each coffee brew can be logged.</string>
</edit-file>
<edit-file file="*-Info.plist" mode="merge" target="NSBluetoothAlwaysUsageDescription">
<string>Blutooth access needed to connect smartscales, pressure devices, thermo devices or refractometer. With this these data to each coffee brew can be logged.</string>
</edit-file>
<edit-file file="*-Info.plist" mode="merge" target="NSHealthShareUsageDescription">
<string>App needs read access to see the caffeinate amount which was tracked with this coffee app</string>
</edit-file>
Expand Down Expand Up @@ -305,14 +318,7 @@
<plugin name="cordova-plugin-filechooser" spec="~1.2.0" />
<plugin name="cordova-plugin-filepicker" spec="~1.1.6" />
<plugin name="cordova-plugin-appminimize" spec="~1.0.1" />
<plugin name="cordova-android-support-gradle-release" spec="^3.0.1" />
<plugin name="cordova-plugin-3dtouch" spec="^1.3.7" />
<plugin name="cordova-plugin-health" source="npm">
<variable name="HEALTH_READ_PERMISSION" value="App needs read access to see the caffeinate amount which was tracked with this coffee app" />
<variable name="HEALTH_WRITE_PERMISSION" value="App needs write access to add the drunken caffeinate amount with the tracked brews" />
<variable name="PLAY_AUTH_VERSION" value="18.1.0" />
<variable name="FIT_API_VERSION" value="19.0.0" />
</plugin>
<universal-links>
<ios-team-id value="W8B7XY7WGY" />
<host name="beanconqueror.com">
Expand Down
32 changes: 20 additions & 12 deletions install.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ ionic cordova plugin add cordova-plugin-inappbrowser
npm install @ionic-native/in-app-browser

#Image picker
ionic cordova plugin add cordova-plugin-telerik-imagepicker
//ionic cordova plugin add cordova-plugin-telerik-imagepicker
ionic cordova plugin add spoonconsulting/cordova-plugin-telerik-imagepicker
npm install @ionic-native/image-picker

#Camera
Expand Down Expand Up @@ -66,9 +67,6 @@ npm install @ionic-native/three-dee-touch
#ChartJS
npm install chart.js --save

##Support grade release
ionic cordova plugin add cordova-android-support-gradle-release

##Globalization
ionic cordova plugin add cordova-plugin-globalization
npm install @ionic-native/globalization
Expand All @@ -77,9 +75,6 @@ npm install @ionic-native/globalization
ionic cordova plugin add cordova-plugin-app-version
npm install @ionic-native/app-version

##MultiDex support on Android
ionic cordova plugin add cordova-plugin-enable-multidex

###https://github.com/hughjdavey/ngx-stars
npm install --save ngx-stars

Expand All @@ -104,7 +99,7 @@ npm install -g cordova-check-plugins

##Healthkit
https://github.com/dariosalvi78/cordova-plugin-health
cordova plugin add cordova-plugin-health --variable HEALTH_READ_PERMISSION='App needs read access to see the caffeinate amount which was tracked with this coffee app' --variable HEALTH_WRITE_PERMISSION='App needs write access to add the drunken caffeinate amount with the tracked brews'
ionic cordova plugin add cordova-plugin-health --variable HEALTH_READ_PERMISSION='App needs read access to see the caffeinate amount which was tracked with this coffee app' --variable HEALTH_WRITE_PERMISSION='App needs write access to add the drunken caffeinate amount with the tracked brews'

##https://ionicframework.com/docs/native/insomnia
ionic cordova plugin add cordova-plugin-insomnia
Expand All @@ -117,6 +112,9 @@ npm install @ionic-native/insomnia
npm install [email protected]

##QRCode Scanner
New plugin 09/23:ionic cordova plugin add @red-mobile/cordova-plugin-barcodescanner

This plugin crashed on android, so we removed it.
Prio 1: https://github.com/fttx/phonegap-plugin-barcodescanner
ionic cordova plugin add https://github.com/fttx/phonegap-plugin-barcodescanner.git --save-dev
(Next possible fallback: https://openbase.com/js/@red-mobile/cordova-plugin-barcodescanner)
Expand All @@ -129,10 +127,6 @@ npm install @ionic-native/deeplinks

https://search.google.com/search-console/not-verified?original_url=/search-console/ownership&original_resource_id

##Ionic Cordova Plugin Adapter X
ionic cordova plugin add cordova-plugin-androidx-adapter
ionic cordova plugin add cordova-plugin-androidx

##Bluetooth
We combine both plugins, because the other plugins asks all of the permissions.

Expand All @@ -156,3 +150,17 @@ npm install @ionic-native/screen-orientation
## Gauge

https://ashish-chopra.github.io/ngx-gauge/#demos

## Diagnostics

ionic cordova plugin add cordova.plugins.diagnostic

##MultiDex support on Android
ionic cordova plugin add cordova-plugin-enable-multidex)

##Ionic Cordova Plugin Adapter X
ionic cordova plugin add cordova-plugin-androidx-adapter
ionic cordova plugin add cordova-plugin-androidx

##Support grade release
ionic cordova plugin add cordova-android-support-gradle-release
Loading

0 comments on commit 573dc73

Please sign in to comment.