Skip to content

Commit

Permalink
fix: android crash
Browse files Browse the repository at this point in the history
  • Loading branch information
sakul-budhathoki committed Mar 30, 2024
1 parent 983e6b3 commit 0f649ff
Show file tree
Hide file tree
Showing 11 changed files with 258 additions and 1,448 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,10 @@ check-android-weshframework:
build-android-weshframework:
mkdir -p ./weshd/android/libs
$(MAKE) init-weshd-go
CGO_CPPFLAGS="-Wno-error -Wno-nullability-completeness -Wno-expansion-to-defined -DHAVE_GETHOSTUUID=0"
cd ./weshd && gomobile bind \
-javapkg=com.weshnet \
-o ./android/libs/WeshFramework.aar \
-tags "fts5 sqlite sqlite_unlock_notify" -tags 'nowatchdog' -target android -androidapi 21 \
-tags 'nowatchdog' -target android -androidapi 23 \
./go/app

.PHONY: init-weshd-go
Expand Down
15 changes: 14 additions & 1 deletion app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,20 @@ const config = {
android: {
package: "com.teritori",
versionCode: "6",
permissions: ["WAKE_LOCK"],
permissions: [
"WAKE_LOCK",
"BLUETOOTH",
"BLUETOOTH_ADMIN",
"BLUETOOTH_ADVERTISE",
"BLUETOOTH_SCAN",
"BLUETOOTH_CONNECT",
"ACCESS_NETWORK_STATE",
"CHANGE_NETWORK_STATE",
"CHANGE_WIFI_STATE",
"ACCESS_WIFI_STATE",
"CHANGE_WIFI_MULTICAST_STATE",
"NFC",
],
},
web: {
bundler: "metro",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
"@types/draft-js": "^0.11.9",
"@types/html-to-draftjs": "^1.4.0",
"@types/node": "^20.9.1",
"@types/react": "~18.2.14",
"@types/react": "~18.2.45",
"@types/react-native-countdown-component": "^2.7.0",
"@types/uuid": "^9.0.0",
"babel-loader": "^8.2.5",
Expand Down
Loading

0 comments on commit 0f649ff

Please sign in to comment.