Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app_src/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from utils.helper import write_logs_to_file
write_logs_to_file()

import logging
import traceback

Expand Down Expand Up @@ -167,7 +170,7 @@ def set_intent_for_file_operation_class(activity_id, some_int, intent):
# Fix for permission Error when choosing from Internal Storage section Android FileExplorer
self.file_operation.intent = intent
except Exception as error_getting_path:
app_logger.exception("error_getting_path", error_getting_path)
app_logger.exception(f"error_getting_path: {error_getting_path}")

activity.bind(
on_activity_result=set_intent_for_file_operation_class)
Expand Down
12 changes: 10 additions & 2 deletions app_src/utils/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,20 @@ def fix_log_to_terminal_on_android(message):
Log.d("python", message)




def app_external_storage_path():
context = get_python_activity_context()

ext_dir = context.getExternalFilesDir(None)
return ext_dir.getAbsolutePath() if ext_dir else appFolder()

def write_logs_to_file(log_folder_name="logs", file_name="all_output1.txt"):
if DEV or not on_android_platform():
return
try:

log_folder = os.path.join(appFolder(), log_folder_name)
log_folder = os.path.join(app_external_storage_path(), log_folder_name)
makeFolder(log_folder)

# Log file path
Expand Down Expand Up @@ -396,4 +404,4 @@ def is_running_debug_build():
) != 0
except Exception as e:
print(f"Error checking debuggable status: {e}")
return False
return False
4 changes: 2 additions & 2 deletions buildozer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source.include_exts = py,png,jpg,kv,atlas,ttf,json,xml,wav
source.exclude_dirs = bin, venv,lab, worked, __pycache__, .idea, dist, for-download,laner-linux, .filereader, wallpapers


requirements = python3,kivy,https://github.com/kivymd/KivyMD/archive/master.zip,python-osc,https://github.com/kivy/plyer/archive/master.zip,materialyoucolor,asynckivy,asyncgui,pyjnius, docutils,netifaces,filetype,requests_toolbelt,websockets,android-widgets, https://github.com/Fector101/android_notify/archive/main.zip
requirements = python3,kivy,https://github.com/kivymd/KivyMD/archive/master.zip,python-osc,https://github.com/kivy/plyer/archive/master.zip,materialyoucolor>=3.0.3,asynckivy,asyncgui,pyjnius, docutils,netifaces,filetype,requests_toolbelt,websockets,android-widgets, https://github.com/Fector101/android_notify/archive/main.zip
services = Wallpapercarousel:./android/services/wallpaper.py:foreground:foregroundServiceType=specialUse
# Shorttask:./android/services/shorttask.py

Expand Down Expand Up @@ -65,4 +65,4 @@ android.release_artifact = apk
log_level = 2
warn_on_root = 1

# Don't write inline comments
# Don't write inline comments
Loading