#1418 improve mobile app install & pairing (#1543)

This commit is contained in:
Christian Rotzoll 2020-09-14 23:39:06 +02:00 committed by rootzoll
parent 1f350dbeb4
commit cd8bd78e5d
7 changed files with 84 additions and 38 deletions

View File

@ -9,12 +9,14 @@ aks4IP2TOR=0
# if TOR is activated then outside reach is possible (no notice)
if [ "${runBehindTor}" = "on" ]; then
echo "# runBehindTor ON"
justLocal=0
aks4IP2TOR=1
fi
# if dynDomain is set connect from outside is possible (no notice)
if [ ${#dynDomain} -gt 0 ]; then
echo "# dynDomain ON"
justLocal=0
aks4IP2TOR=0
fi
@ -22,15 +24,21 @@ fi
# if sshtunnel to 10009/8080 then outside reach is possible (no notice)
isForwarded=$(echo ${sshtunnel} | grep -c "10009<")
if [ ${isForwarded} -gt 0 ]; then
echo "# forward 10009 ON"
justLocal=0
aks4IP2TOR=0
fi
isForwarded=$(echo ${sshtunnel} | grep -c "8080<")
if [ ${isForwarded} -gt 0 ]; then
echo "# forward 8080 ON"
justLocal=0
aks4IP2TOR=0
fi
# echo "# justLocal(${justLocal})"
# echo "# aks4IP2TOR(${aks4IP2TOR})"
# read key
# check if dynamic domain is set
if [ ${justLocal} -eq 1 ]; then
whiptail --title " Just Local Network? " --yesno "If you want to connect with your RaspiBlitz
@ -80,11 +88,16 @@ checkIP2TOR()
# check if IP2TOR service is already available
error=""
ip2tor=""
source <(/home/admin/config.scripts/blitz.subscriptions.ip2tor.py subscription-by-service $1)
if [ ${#error} -eq 0 ]; then
ip2tor="$1"
fi
#echo "# ip2tor(${ip2tor})"
#echo "# aks4IP2TOR(${aks4IP2TOR})"
#read key
# if IP2TOR is not already available:
# and the checks from avove showed there is SSH forwarding / dynDNS
# then ask user if IP2TOR subscription is wanted
@ -175,13 +188,27 @@ case $CHOICE in
;;
ZAP_IOS)
appstoreLink="https://apps.apple.com/us/app/zap-bitcoin-lightning-wallet/id1406311960"
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
whiptail --title "Install Testflight and Zap on your iOS device" \
--yes-button "continue" \
--no-button "link as QR code" \
--yesno "Search for 'Zap Bitcoin' in Apple Appstore for basic version\nOr join public beta test for latest features:\n${appstoreLink}\n\nJoin testing and follow ALL instructions.\n\nWhen installed and started -> continue" 11 65
#/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
#whiptail --title "Install Testflight and Zap on your iOS device" \
# --yes-button "continue" \
# --no-button "link as QR code" \
# --yesno "Search for 'Zap Bitcoin' in Apple Appstore for basic version\nOr join public beta test for latest features:\n${appstoreLink}\n\nJoin testing and follow ALL instructions.\n\nWhen installed and started -> continue" 11 65
# if [ $? -eq 1 ]; then
# /home/admin/config.scripts/blitz.lcd.sh qr-console ${appstoreLink}
#fi
/home/admin/config.scripts/blitz.lcd.sh image /home/admin/raspiblitz/pictures/app_zap.png
whiptail --title "Install Fully Noded on your iOS device" \
--yes-button "Continue" \
--no-button "StoreLink" \
--yesno "Open the Apple App Store on your mobile phone.\n\nSearch for --> 'Zap Bitcoin'\n\nCheck that logo is like on LCD & author: Zap Technologies LLC\nWhen app is installed and started --> Continue." 12 65
if [ $? -eq 1 ]; then
/home/admin/config.scripts/blitz.lcd.sh qr-console ${appstoreLink}
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
whiptail --title " App Store Link " --msgbox "\
To install app open the following link:\n
${appstoreLink}\n
Or scan the qr code on the LCD with your mobile phone.
" 11 70
fi
/home/admin/config.scripts/blitz.lcd.sh hide
checkIP2TOR LND-GRPC-API
@ -194,13 +221,18 @@ case $CHOICE in
;;
ZAP_ANDROID)
appstoreLink="https://play.google.com/store/apps/details?id=zapsolutions.zap"
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
whiptail --title "Install Zap from PlayStore on your Android device" \
--yes-button "continue" \
--no-button "link as QR code" \
--yesno "Find & install the Zap Wallet on the Android Play Store:\n\n${appstoreLink}\n\nEasiest way to install scan QR code on LCD with phone.\n\nWhen installed and started -> continue." 10 67
/home/admin/config.scripts/blitz.lcd.sh image /home/admin/raspiblitz/pictures/app_zeus.png
whiptail --title "Install Zap on your Android Phone" \
--yes-button "Continue" \
--no-button "StoreLink" \
--yesno "Open the Android Play Store on your mobile phone.\n\nSearch for --> 'zap bitcoin app'\n\nCheck that logo is like on LCD and author is: Zap\nWhen app is installed and started --> Continue." 12 65
if [ $? -eq 1 ]; then
/home/admin/config.scripts/blitz.lcd.sh qr-console ${appstoreLink}
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
whiptail --title " App Store Link " --msgbox "\
To install app open the following link:\n
${appstoreLink}\n
Or scan the qr code on the LCD with your mobile phone.
" 11 70
fi
/home/admin/config.scripts/blitz.lcd.sh hide
checkIP2TOR LND-GRPC-API
@ -224,12 +256,12 @@ Please go to MAINMENU > SERVICES and activate KEYSEND first.
fi
appstoreLink="https://github.com/fusion44/sendmany/releases"
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
whiptail --title "Install SendMany APK from GithubReleases (open assets) on your device" \
--yes-button "continue" \
--no-button "link as QR code" \
whiptail --title "Install SendMany APK from GithubReleases" \
--yes-button "Continue" \
--no-button "Link as QR code" \
--yesno "Download & install the SendMany APK (armeabi-v7) from GitHub:\n\n${appstoreLink}\n\nEasiest way to scan QR code on LCD and download/install.\n\nWhen installed and started -> continue." 13 65
if [ $? -eq 1 ]; then
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
/home/admin/config.scripts/blitz.lcd.sh qr-console ${appstoreLink}
fi
/home/admin/config.scripts/blitz.lcd.sh hide
@ -239,12 +271,13 @@ Please go to MAINMENU > SERVICES and activate KEYSEND first.
;;
ZEUS_IOS)
appstoreLink="https://testflight.apple.com/join/gpVFzEHN"
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
/home/admin/config.scripts/blitz.lcd.sh image /home/admin/raspiblitz/pictures/app_zeus.png
whiptail --title "Install Testflight and Zeus on your iOS device" \
--yes-button "continue" \
--no-button "link as QR code" \
--yesno "At the moment this app is in public beta testing:\n\n${appstoreLink}\n\nJoin testing and follow ALL instructions.\n\nWhen installed and started -> continue" 10 60
--yes-button "Continue" \
--no-button "Link as QR Code" \
--yesno "At the moment this app is in public beta testing.\nFirst open Apple Apstore, search & install 'TestFlight' app.\n\nThen open the following link on your mobile:\n${appstoreLink}\n\nUse 'Open In TestFlight' option of your mobile browser.\nWhen Zeus is installed and started --> Continue." 14 65
if [ $? -eq 1 ]; then
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
/home/admin/config.scripts/blitz.lcd.sh qr-console ${appstoreLink}
fi
/home/admin/config.scripts/blitz.lcd.sh hide
@ -254,13 +287,18 @@ Please go to MAINMENU > SERVICES and activate KEYSEND first.
;;
ZEUS_ANDROID)
appstoreLink="https://play.google.com/store/apps/details?id=app.zeusln.zeus"
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
/home/admin/config.scripts/blitz.lcd.sh image /home/admin/raspiblitz/pictures/app_zeus.png
whiptail --title "Install Zeus on your Android Phone" \
--yes-button "continue" \
--no-button "link as QR code" \
--yesno "Find and install the Zeus Wallet on the Android Play Store:\n\n${appstoreLink}\n\nEasiest way to install scan QR code on LCD with phone.\n\nWhen installed and started -> continue." 10 65
--yes-button "Continue" \
--no-button "StoreLink" \
--yesno "Open the Android Play Store on your mobile phone.\n\nSearch for --> 'zeus bitcoin app'\n\nCheck that logo is like on LCD and author is: Evan Kaloudis\nWhen app is installed and started --> Continue." 12 65
if [ $? -eq 1 ]; then
/home/admin/config.scripts/blitz.lcd.sh qr-console ${appstoreLink}
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
whiptail --title " App Store Link " --msgbox "\
To install app open the following link:\n
${appstoreLink}\n
Or scan the qr code on the LCD with your mobile phone.
" 11 70
fi
/home/admin/config.scripts/blitz.lcd.sh hide
checkIP2TOR LND-REST-API
@ -272,13 +310,18 @@ Please go to MAINMENU > SERVICES and activate KEYSEND first.
;;
FULLY_NODED)
appstoreLink="https://apps.apple.com/us/app/fully-noded/id1436425586"
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
/home/admin/config.scripts/blitz.lcd.sh image /home/admin/raspiblitz/pictures/app_fullynoded.png
whiptail --title "Install Fully Noded on your iOS device" \
--yes-button "continue" \
--no-button "link as QR code" \
--yesno "Download the app from the AppStore:\n\n${appstoreLink}\n\nWhen installed and started -> continue" 8 60
--yes-button "Continue" \
--no-button "StoreLink" \
--yesno "Open the Apple App Store on your mobile phone.\n\nSearch for --> 'fully noded'\n\nCheck that logo is like on LCD and author is: Denton LLC\nWhen app is installed and started --> Continue." 12 65
if [ $? -eq 1 ]; then
/home/admin/config.scripts/blitz.lcd.sh qr-console ${appstoreLink}
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
whiptail --title " App Store Link " --msgbox "\
To install app open the following link:\n
${appstoreLink}\n
Or scan the qr code on the LCD with your mobile phone.
" 11 70
fi
/home/admin/config.scripts/blitz.lcd.sh hide
/home/admin/config.scripts/bonus.fullynoded.sh

View File

@ -207,8 +207,7 @@ if [ "${command}" == "qr-console" ]; then
exit 1
fi
whiptail --title "Get ready" --backtitle "QR-Code in Terminal Window" \
--msgbox "Make this terminal window as large as possible - fullscreen would be best. \n\nThe QR-Code might be too large for your display. In that case, shrink the letters by pressing the keys Ctrl and Minus (or Cmd and Minus if you are on a Mac) \n\nPRESS ENTER when you are ready to see the QR-code." 20 60
whiptail --title "Get ready" --backtitle "QR-Code in Terminal Window" --msgbox "Make this terminal window as large as possible - fullscreen would be best. \n\nThe QR-Code might be too large for your display. In that case, shrink the letters by pressing the keys Ctrl and Minus (or Cmd and Minus if you are on a Mac) \n\nPRESS ENTER when you are ready to see the QR-code." 15 60
clear
qrencode -t ANSI256 ${datastring}

View File

@ -596,14 +596,18 @@ def menuMakeSubscription(blitzServiceName, torAddress, torPort):
except Exception as e:
print("# using default shop url")
# remove https:// from shop url (to keep it short)
if shopurl.find("://") > 0:
shopurl = shopurl[shopurl.find("://") + 3:]
while True:
# input shop url
d = Dialog(dialog="dialog", autowidgetsize=True)
d.set_background_title("Select IP2TOR Bridge Shop (communication secured thru TOR)")
code, text = d.inputbox(
"Enter Address of a IP2TOR Shop (OR USE DEFAULT):",
height=10, width=60, init=shopurl,
"Enter Address of a IP2TOR Shop (OR JUST USE DEFAULT):",
height=10, width=72, init=shopurl,
title="Shop Address")
# if user canceled

View File

@ -303,17 +303,17 @@ fi
if [ ${#usingIP2TOR} -gt 0 ]; then
msg="Your IP2TOR bridge '${usingIP2TOR}' is used for this connection.\n\n"
fi
msg="You should now see the pairing QR code on the RaspiBlitz LCD.\n\n${msg}When you start the App choose to connect to your own node.\n(DIY / Remote-Node / lndconnect)\n\nClick on the 'Scan QR' button. Scan the QR on the LCD and <continue> or <console QRcode> to see it in this window."
msg="You should now see the pairing QR code on the RaspiBlitz LCD.\n\n${msg}When you start the App choose to connect to your own node.\n(DIY / Remote-Node / lndconnect)\n\nClick on the 'Scan QR' button. Scan the QR on the LCD and <Continue> or <Console QRcode> to see it in this window."
whiptail --backtitle "Connecting Mobile Wallet" \
--title "Pairing by QR code" \
--yes-button "continue" \
--no-button "console QRcode" \
--yes-button "Continue" \
--no-button "Console QRcode" \
--yesno "${msg}" 18 65
if [ $? -eq 1 ]; then
# backup - show QR code on screen (not LCD)
if [ "${connector}" == "lndconnect" ]; then
lndconnect --host=${hostscreen} --port=${port} ${extraparameter}
echo "(To shrink QR code: OSX->CMD- / LINUX-> CTRL-) Press ENTER when finished."
echo "Press ENTER when finished."
read key
elif [ "${connector}" == "shango" ]; then
/home/admin/config.scripts/blitz.lcd.sh qr-console ${datastring}

BIN
pictures/app_fullynoded.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
pictures/app_zap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
pictures/app_zeus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB