example 'meshtastic': add app icon, splash screen; revisions
|
|
@ -87,10 +87,10 @@ ios {
|
|||
LIBS += -L../../../platforms/ios/lib
|
||||
|
||||
QMAKE_INFO_PLIST = platforms/ios/Info.plist
|
||||
#QMAKE_ASSET_CATALOGS += platforms/ios/Assets.xcassets
|
||||
QMAKE_ASSET_CATALOGS += platforms/ios/Assets.xcassets
|
||||
|
||||
#launch.files = platforms/ios/designable.storyboard platforms/img/logo.png
|
||||
#QMAKE_BUNDLE_DATA += launch
|
||||
launch.files = platforms/ios/designable.storyboard platforms/img/logo.png
|
||||
QMAKE_BUNDLE_DATA += launch
|
||||
}
|
||||
|
||||
32bit {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# install/update (keeps app data)
|
||||
adb install -r android-build/*.apk
|
||||
adb shell am start -n org.qtproject.example.meshtastic/org.qtproject.qt5.android.bindings.QtActivity # Qt5
|
||||
adb shell am start -n org.cl.meshtastic/org.qtproject.qt5.android.bindings.QtActivity # Qt5
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
(in-package :loc)
|
||||
|
||||
(defvar *positions* nil)
|
||||
(defvar *positions* nil) ; will be shown on an offline map (TODO)
|
||||
(defvar *my-position* nil)
|
||||
|
||||
(defun ini ()
|
||||
|
|
@ -12,14 +12,17 @@
|
|||
(update-my-position))
|
||||
|
||||
#+mobile
|
||||
(defun update-my-position ()
|
||||
"Mobile only: update position from GPS of mobile device."
|
||||
(unless (getf *positions* (lora:my-num))
|
||||
(destructuring-bind (lat lon time)
|
||||
(defun last-gps-position ()
|
||||
#+android
|
||||
(qt:last-position qt:*cpp*)
|
||||
#+ios
|
||||
(qjs |lastPosition| ui:*position-source*)
|
||||
(qjs |lastPosition| ui:*position-source*))
|
||||
|
||||
#+mobile
|
||||
(defun update-my-position ()
|
||||
"Mobile only: update position from GPS of mobile device."
|
||||
(destructuring-bind (lat lon time)
|
||||
(last-gps-position)
|
||||
(if (zerop lat)
|
||||
(qsingle-shot 1000 'update-my-position)
|
||||
(let ((pos (list :lat lat
|
||||
|
|
@ -28,12 +31,13 @@
|
|||
(setf *my-position* pos)
|
||||
(qlog "position-updated: ~A" pos)
|
||||
(set-position (lora:my-num) pos)
|
||||
(send-to-radio)))))) ; just once on startup (for now)
|
||||
(send-to-radio))))) ; just once on startup (for now)
|
||||
|
||||
#+mobile
|
||||
(defun send-to-radio ()
|
||||
(if lora:*config-complete*
|
||||
(lora:send-position *my-position*)
|
||||
(unless (getf *positions* (lora:my-num))
|
||||
(lora:send-position *my-position*))
|
||||
(qsingle-shot 1000 'send-to-radio)))
|
||||
|
||||
(defun set-position (node pos)
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@
|
|||
(defun start-device-discovery (&optional (name ""))
|
||||
(setf *schedule-clear* t)
|
||||
(setf *ble-names* nil)
|
||||
(unless radios:*found*
|
||||
(radios:clear))
|
||||
(qt:start-device-discovery qt:*cpp* name)
|
||||
(q> |playing| ui:*busy* t))
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@
|
|||
|
||||
(defun change-radio (name) ; see QML
|
||||
(app:change-setting :device name)
|
||||
(unless *found*
|
||||
(clear))
|
||||
(qlater (lambda () (lora:start-device-discovery name)))
|
||||
(values))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<manifest package="org.qtproject.example.meshtastic" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
|
||||
<manifest package="org.cl.meshtastic" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
|
||||
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
|
||||
Remove the comment if you do not require these default permissions. -->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
|
||||
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
||||
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="cl-meshtastic" android:extractNativeLibs="true">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="cl-meshtastic" android:screenOrientation="unspecified" android:launchMode="singleTop" android:exported="true">
|
||||
<application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" android:label="meshtastic" android:extractNativeLibs="true" android:icon="@drawable/icon">
|
||||
<activity android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="meshtastic" android:screenOrientation="unspecified" android:launchMode="singleTop" android:exported="true" android:theme="@style/splashScreenTheme">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
|
|
@ -76,6 +76,7 @@
|
|||
-->
|
||||
<meta-data android:name="android.app.extract_android_style" android:value="default"/>
|
||||
<!-- extract android style -->
|
||||
<meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/splashscreen"/>
|
||||
</activity>
|
||||
<!-- For adding service(s) please check: https://wiki.qt.io/AndroidServices -->
|
||||
</application>
|
||||
|
|
|
|||
BIN
examples/meshtastic/platforms/android/res/drawable-hdpi/icon.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
examples/meshtastic/platforms/android/res/drawable-hdpi/logo.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
examples/meshtastic/platforms/android/res/drawable-ldpi/logo.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
examples/meshtastic/platforms/android/res/drawable-mdpi/icon.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
examples/meshtastic/platforms/android/res/drawable-mdpi/logo.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="#d2eecc"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<bitmap android:src="@drawable/logo" android:gravity="center"/>
|
||||
</item>
|
||||
</layer-list>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<style name="splashScreenTheme">
|
||||
<item name="android:windowBackground">@drawable/splashscreen</item>
|
||||
</style>
|
||||
</resources>
|
||||
BIN
examples/meshtastic/platforms/img/logo.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
|
|
@ -0,0 +1,119 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon-20@2x.png",
|
||||
"size" : "20x20",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"platform" : "ios",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x",
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon-20@3x.png"
|
||||
},
|
||||
{
|
||||
"platform" : "ios",
|
||||
"filename" : "icon-29@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x",
|
||||
"size" : "29x29"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x",
|
||||
"platform" : "ios",
|
||||
"filename" : "icon-29@3x.png"
|
||||
},
|
||||
{
|
||||
"scale" : "2x",
|
||||
"idiom" : "universal",
|
||||
"size" : "38x38",
|
||||
"platform" : "ios",
|
||||
"filename" : "icon-38@2x.png"
|
||||
},
|
||||
{
|
||||
"filename" : "icon-38@3x.png",
|
||||
"scale" : "3x",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "38x38"
|
||||
},
|
||||
{
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon-40@2x.png",
|
||||
"size" : "40x40"
|
||||
},
|
||||
{
|
||||
"filename" : "icon-40@3x.png",
|
||||
"size" : "40x40",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"size" : "60x60",
|
||||
"filename" : "icon-60@2x.png"
|
||||
},
|
||||
{
|
||||
"filename" : "icon-60@3x.png",
|
||||
"scale" : "3x",
|
||||
"platform" : "ios",
|
||||
"idiom" : "universal",
|
||||
"size" : "60x60"
|
||||
},
|
||||
{
|
||||
"scale" : "2x",
|
||||
"platform" : "ios",
|
||||
"size" : "64x64",
|
||||
"filename" : "icon-64@2x.png",
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"platform" : "ios",
|
||||
"size" : "64x64",
|
||||
"filename" : "icon-64@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"scale" : "2x",
|
||||
"filename" : "icon-68@2x.png",
|
||||
"size" : "68x68",
|
||||
"platform" : "ios",
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"platform" : "ios",
|
||||
"filename" : "icon-76@2x.png",
|
||||
"idiom" : "universal",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"platform" : "ios",
|
||||
"scale" : "2x",
|
||||
"idiom" : "universal",
|
||||
"size" : "83.5x83.5",
|
||||
"filename" : "icon-83_5@2x.png"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"platform" : "ios",
|
||||
"filename" : "ios-marketing.png",
|
||||
"idiom" : "universal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 2 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 8 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ See also notes in [my-cl-protobufs.asd](my-cl-protobufs.asd).
|
|||
You will also need **uiop** installed under e.g. `~/quicklisp/local-projects/`
|
||||
(see ASDF sources).
|
||||
|
||||
For android please see [qt-location-hack](qt-location-hack/).
|
||||
For android please see [qt-location-hack](hacks/qt-location-hack/).
|
||||
|
||||
|
||||
|
||||
|
|
|
|||