Merge pull request #73 from jaicis/Chatroom
fixed android image path issue and fixed APK creation issue
This commit is contained in:
commit
225c213f6c
|
@ -1226,7 +1226,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
|
|||
initialHash = hashlib.sha512(encryptedPayload).digest()
|
||||
trialValue, nonce = proofofwork.run(target, initialHash)
|
||||
with threads.printLock:
|
||||
print '(For msg message via API) Found proof of work', trialValue, 'Nonce:', nonce
|
||||
print('(For msg message via API) Found proof of work', trialValue, 'Nonce:', nonce)
|
||||
try:
|
||||
print(
|
||||
'POW took', int(time.time() - powStartTime),
|
||||
|
@ -1245,7 +1245,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
|
|||
int(time.time()) + TTL, ''
|
||||
)
|
||||
with threads.printLock:
|
||||
print 'Broadcasting inv for msg(API disseminatePreEncryptedMsg command):', hexlify(inventoryHash)
|
||||
print('Broadcasting inv for msg(API disseminatePreEncryptedMsg command):', hexlify(inventoryHash))
|
||||
queues.invQueue.put((toStreamNumber, inventoryHash))
|
||||
|
||||
def HandleTrashSentMessageByAckDAta(self, params):
|
||||
|
@ -1299,7 +1299,7 @@ class MySimpleXMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
|
|||
objectType, pubkeyStreamNumber, payload, int(time.time()) + TTL, ''
|
||||
)
|
||||
with threads.printLock:
|
||||
print 'broadcasting inv within API command disseminatePubkey with hash:', hexlify(inventoryHash)
|
||||
print('broadcasting inv within API command disseminatePubkey with hash:', hexlify(inventoryHash))
|
||||
queues.invQueue.put((pubkeyStreamNumber, inventoryHash))
|
||||
|
||||
def HandleGetMessageDataByDestinationHash(self, params):
|
||||
|
|
|
@ -84,43 +84,6 @@
|
|||
on_press:
|
||||
app.root.ids.sc7.reset_address_label(app)
|
||||
|
||||
|
||||
Screen:
|
||||
name: "label_screen"
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
padding: 0, dp(5), 0, dp(5)
|
||||
spacing: dp(5)
|
||||
|
||||
#label area
|
||||
AnchorLayout:
|
||||
size_hint_y: None
|
||||
height: dp(50)
|
||||
MDLabel:
|
||||
text: "Enter a label to generate address for:"
|
||||
bold: True
|
||||
halign: "center"
|
||||
theme_text_color: "Custom"
|
||||
text_color: .4,.4,.4,1
|
||||
|
||||
AnchorLayout:
|
||||
size_hint_y: None
|
||||
height: dp(40)
|
||||
MDTextField:
|
||||
hint_text: "Label"
|
||||
required: True
|
||||
size_hint_x: None
|
||||
width: dp(190)
|
||||
|
||||
AnchorLayout:
|
||||
MDFillRoundFlatIconButton:
|
||||
icon: "chevron-double-right"
|
||||
text: "Proceed Next"
|
||||
|
||||
Widget:
|
||||
|
||||
|
||||
|
||||
#info-area-outer
|
||||
BoxLayout:
|
||||
size_hint_y: .47
|
||||
|
@ -179,6 +142,9 @@
|
|||
id:add_random_bx
|
||||
#buttons-area-outer
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
# padding: 0, dp(5), 0, dp(5)
|
||||
# spacing: dp(5)
|
||||
size_hint_y: .53
|
||||
canvas:
|
||||
Color:
|
||||
|
@ -187,47 +153,36 @@
|
|||
pos: self.pos
|
||||
size: self.size
|
||||
|
||||
ScreenManager:
|
||||
id: check_screenmgr
|
||||
Screen:
|
||||
name: "label_screen"
|
||||
BoxLayout:
|
||||
orientation: "vertical"
|
||||
padding: 0, dp(5), 0, dp(5)
|
||||
spacing: dp(5)
|
||||
#label area
|
||||
AnchorLayout:
|
||||
size_hint_y: None
|
||||
height: dp(50)
|
||||
MDLabel:
|
||||
text: "Enter a label to generate address for:"
|
||||
bold: True
|
||||
halign: "center"
|
||||
theme_text_color: "Custom"
|
||||
text_color: .4,.4,.4,1
|
||||
|
||||
#label area
|
||||
AnchorLayout:
|
||||
size_hint_y: None
|
||||
height: dp(50)
|
||||
MDLabel:
|
||||
text: "Enter a label to generate address for:"
|
||||
bold: True
|
||||
halign: "center"
|
||||
theme_text_color: "Custom"
|
||||
text_color: .4,.4,.4,1
|
||||
|
||||
AnchorLayout:
|
||||
size_hint_y: None
|
||||
height: dp(40)
|
||||
MDTextField:
|
||||
id:lab
|
||||
hint_text: "Label"
|
||||
required: True
|
||||
size_hint_x: None
|
||||
width: dp(190)
|
||||
helper_text_mode: "on_error"
|
||||
helper_text: "Please enter your label name"
|
||||
|
||||
AnchorLayout:
|
||||
MDFillRoundFlatIconButton:
|
||||
icon: "chevron-double-right"
|
||||
text: "Proceed Next"
|
||||
on_release: app.root.ids.sc7.generateaddress(app)
|
||||
|
||||
Widget:
|
||||
AnchorLayout:
|
||||
size_hint_y: None
|
||||
height: dp(40)
|
||||
MDTextField:
|
||||
id:lab
|
||||
hint_text: "Label"
|
||||
required: True
|
||||
size_hint_x: None
|
||||
width: dp(190)
|
||||
helper_text_mode: "on_error"
|
||||
helper_text: "Please enter your label name"
|
||||
|
||||
AnchorLayout:
|
||||
MDFillRoundFlatIconButton:
|
||||
icon: "chevron-double-right"
|
||||
text: "Proceed Next"
|
||||
on_release: app.root.ids.sc7.generateaddress(app)
|
||||
|
||||
Widget:
|
||||
|
||||
#info-area-outer
|
||||
BoxLayout:
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#:import MDScrollViewRefreshLayout kivymd.uix.refreshlayout.MDScrollViewRefreshLayout
|
||||
#:import MDSpinner kivymd.uix.spinner.MDSpinner
|
||||
#:import MDTabsBase kivymd.uix.tab.MDTabsBase
|
||||
#:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol
|
||||
##:import ZBarSymbol pyzbar.pyzbar.ZBarSymbol
|
||||
<Tab@BoxLayout+MDTabsBase>
|
||||
|
||||
#:set color_button (0.784, 0.443, 0.216, 1) # brown
|
||||
|
|
|
@ -5,7 +5,6 @@ Bitmessage android(mobile) interface
|
|||
# pylint: disable=too-many-ancestors,too-many-locals,useless-super-delegation
|
||||
# pylint: disable=protected-access
|
||||
|
||||
|
||||
from sys import platform as _sys_platform
|
||||
from os import environ
|
||||
|
||||
|
@ -139,10 +138,10 @@ from datetime import datetime
|
|||
from kivymd.uix.behaviors.elevation import RectangularElevationBehavior
|
||||
from kivymd.uix.bottomsheet import MDCustomBottomSheet
|
||||
from kivy.effects.dampedscroll import DampedScrollEffect
|
||||
from kivy_garden.zbarcam import ZBarCam
|
||||
from pyzbar.pyzbar import ZBarSymbol
|
||||
|
||||
if platform != 'android':
|
||||
from pyzbar.pyzbar import ZBarSymbol
|
||||
from kivy_garden.zbarcam import ZBarCam
|
||||
from kivy.config import Config
|
||||
Config.set('input', 'mouse', 'mouse,multitouch_on_demand')
|
||||
# pylint: disable=too-few-public-methods,too-many-arguments,attribute-defined-outside-init
|
||||
|
@ -1148,9 +1147,8 @@ class Random(Screen):
|
|||
entered_label = str(self.ids.lab.text).strip()
|
||||
if not entered_label:
|
||||
self.ids.lab.focus = True
|
||||
# self.ids.add_random_bx.children[0].ids.label.focus = True
|
||||
# self.ids.label.error = True
|
||||
# self.ids.label.helper_text = 'This field is required'
|
||||
#self.ids.lab.error = True
|
||||
#self.ids.lab.helper_text = 'This field is required'
|
||||
streamNumberForAddress = 1
|
||||
eighteenByteRipe = False
|
||||
nonceTrialsPerByte = 1000
|
||||
|
@ -1766,7 +1764,7 @@ class NavigateApp(MDApp):
|
|||
BMConfigParser().addresses()[0])):
|
||||
android_path = os.path.join(
|
||||
os.environ['ANDROID_PRIVATE'] + '/app/')
|
||||
img.texture.save('{1}/kivy/default_identicon/{0}.png'.format(
|
||||
img.texture.save('{1}/images/kivy/default_identicon/{0}.png'.format(
|
||||
BMConfigParser().addresses()[0], android_path))
|
||||
else:
|
||||
if not os.path.exists(state.imageDir + '/default_identicon/{}.png'.format(
|
||||
|
@ -2220,7 +2218,7 @@ class NavigateApp(MDApp):
|
|||
if platform == 'android':
|
||||
android_path = os.path.join(
|
||||
os.environ['ANDROID_PRIVATE'] + '/app/')
|
||||
newImg.save('{1}/kivy/default_identicon/{0}.png'.format(
|
||||
newImg.save('{1}/images/kivy/default_identicon/{0}.png'.format(
|
||||
state.association, android_path))
|
||||
else:
|
||||
if not os.path.exists(state.imageDir + '/default_identicon/'):
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
[app]
|
||||
|
||||
# (str) Title of your application
|
||||
title = tor
|
||||
title = py3
|
||||
|
||||
# (str) Package name
|
||||
package.name = tor
|
||||
package.name = py3
|
||||
|
||||
# (str) Package domain (needed for android/ios packaging)
|
||||
package.domain = org.kel
|
||||
package.domain = org.test
|
||||
|
||||
# (str) Source code where the main.py live
|
||||
source.dir = .
|
||||
|
@ -239,7 +239,7 @@ android.sdk = 20
|
|||
#android.copy_libs = 1
|
||||
|
||||
# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86, x86_64
|
||||
android.arch = arm64-v8a
|
||||
android.arch = armeabi-v7a
|
||||
|
||||
#
|
||||
# Python for android (p4a) specific
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
"""This module is for thread start."""
|
||||
import state
|
||||
from bitmessagemain import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
state.kivy = True
|
||||
print("Kivy Loading......")
|
||||
from bitmessagemain import main
|
||||
main()
|
Reference in New Issue
Block a user