"""Android."""
"""
Follows the guidance `from here <https://android.stackexchange.com/a/216132>`_. Makes use of the
`appname <platformdirs.api.PlatformDirsABC.appname>`,
`version <platformdirs.api.PlatformDirsABC.version>`,
`ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.
"""
""":return: data directory tied to the user, e.g. ``/data/user/<userid>/<packagename>/files/<AppName>``"""
return
""":return: data directory shared by users, same as `user_data_dir`"""
return
"""
:return: config directory tied to the user, e.g. \
``/data/user/<userid>/<packagename>/shared_prefs/<AppName>``
"""
return
""":return: config directory shared by the users, same as `user_config_dir`"""
return
""":return: cache directory tied to the user, e.g. e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>``"""
return
""":return: cache directory shared by users, same as `user_cache_dir`"""
return
""":return: state directory tied to the user, same as `user_data_dir`"""
return
"""
:return: log directory tied to the user, same as `user_cache_dir` if not opinionated else ``log`` in it,
e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/log``
"""
=
= # noqa: PTH118
return
""":return: documents directory tied to the user e.g. ``/storage/emulated/0/Documents``"""
return
""":return: downloads directory tied to the user e.g. ``/storage/emulated/0/Downloads``"""
return
""":return: pictures directory tied to the user e.g. ``/storage/emulated/0/Pictures``"""
return
""":return: videos directory tied to the user e.g. ``/storage/emulated/0/DCIM/Camera``"""
return
""":return: music directory tied to the user e.g. ``/storage/emulated/0/Music``"""
return
"""
:return: runtime directory tied to the user, same as `user_cache_dir` if not opinionated else ``tmp`` in it,
e.g. ``/data/user/<userid>/<packagename>/cache/<AppName>/tmp``
"""
=
= # noqa: PTH118
return
""":return: base folder for the Android OS or None if it cannot be found"""
# First try to get path to android app via pyjnius
=
: | None =
# noqa: BLE001
# if fails find an android folder looking path on the sys.path
=
=
break
= None
return
""":return: documents folder for the Android OS"""
# Get directories with pyjnius
=
=
: =
# noqa: BLE001
=
return
""":return: downloads folder for the Android OS"""
# Get directories with pyjnius
=
=
: =
# noqa: BLE001
=
return
""":return: pictures folder for the Android OS"""
# Get directories with pyjnius
=
=
: =
# noqa: BLE001
=
return
""":return: videos folder for the Android OS"""
# Get directories with pyjnius
=
=
: =
# noqa: BLE001
=
return
""":return: music folder for the Android OS"""
# Get directories with pyjnius
=
=
: =
# noqa: BLE001
=
return
=