-
QuestionWhat I want, once the android mobile app start: 1- Ask the user to specify ssid and password in 2 textfields. (done and correct) Problems: Programing in windows 11 PC: A- I dont know if the steps are the correct to make that functionality. Once android apk done: C- White screen with error: Permission Handler not recogniced ... Notes: I give the permission of nearby devices in .toml . What of everything is failing? I will provide more code if necessary. Thanks :) Code sampleStep 2:
ph = ft.PermissionHandler()
page.overlay.append(ph)
def check_permission(e):
o = ph.check_permission(e.control.data)
page.add(ft.Text(f"Checked {e.control.data.name}: {o}"))
def request_permission(e):
o = ph.request_permission(e.control.data)
page.add(ft.Text(f"Requested {e.control.data.name}: {o}"))
def open_app_settings(e):
o = ph.open_app_settings()
page.add(ft.Text(f"App Settings: {o}"))
page.add(
ft.OutlinedButton(
"Check Microphone Permission",
data=ft.PermissionType.MICROPHONE,
on_click=check_permission,
),
ft.OutlinedButton(
"Request Microphone Permission",
data=ft.PermissionType.MICROPHONE,
on_click=request_permission,
),
ft.OutlinedButton(
"Open App Settings",
on_click=open_app_settings,
.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
Step 3:
iface = wifi.interfaces()[0]
perfil.ssid = config_base["ssid"]
perfil.auth = const.AUTH_ALG_OPEN
perfil.akm.append(const.AKM_TYPE_WPA2PSK)
perfil.cipher = const.CIPHER_TYPE_CCMP
perfil.key = config_base["password"]
tmp_profile = iface.add_network_profile(perfil)
(Extractions, I adapted it in the context of my code) Error messageAbout permission handler not recogniced ------------------------------------------------------
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
We now have pyjnius integrated in flet so we can access wifi and permissions directly using integrated java autoclasses in python. |
Beta Was this translation helpful? Give feedback.
We now have pyjnius integrated in flet so we can access wifi and permissions directly using integrated java autoclasses in python.