Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Badge property and Map Control not working on Android #4362

Open
1 task done
Siva-Rajan-R opened this issue Nov 13, 2024 · 12 comments
Open
1 task done

Badge property and Map Control not working on Android #4362

Siva-Rajan-R opened this issue Nov 13, 2024 · 12 comments
Assignees
Labels
bug Something isn't working packaging Related to app packaging status: awaiting response Further information is requested

Comments

@Siva-Rajan-R
Copy link

Siva-Rajan-R commented Nov 13, 2024

Duplicate Check

Describe the bug

badge,
After updation of flet==0.25.dev3717 the badge property is added to every controls and i tried it .it works fine on Windows but,It was not working on Android

Map,
The map Control works fine on both windows and android before updating flet==0.25.0.dev3717.but after update its only work on Windows not on Android

Code sample

Code
[Paste your code here]

To reproduce

1.Fix the badge property to work on Android
2.Fix the Map to work on Android

Expected behavior

Badge and map wants to work on Android properly

Screenshots / Videos

Captures

[Upload media here]
IMG-20241113-WA0005
IMG-20241113-WA0004
Screenshot_2024-11-12-23-18-10-19_b3c61c1ad2a7062e9ad6b926200ddbc2
Screenshot_2024-11-12-23-13-21-11_b3c61c1ad2a7062e9ad6b926200ddbc2

Operating System

Windows

Operating system details

windows 11

Flet version

0.25.0.dev3717

Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)

Suggestions

No response

Logs

Logs
[Paste your logs here]

Additional details

It works on flet==0.24.1

@ndonkoHenri
Copy link
Contributor

Can you share your requirements file?
Make sure you set the right Flet version in it.

@ndonkoHenri ndonkoHenri added the status: awaiting response Further information is requested label Nov 14, 2024
@Siva-Rajan-R
Copy link
Author

Siva-Rajan-R commented Nov 14, 2024

@ndonkoHenri
flet==0.25.0.dev3721
websockets==14.0
requests==2.32.3
pytz==2024.2

this is my requirements.txt

@ndonkoHenri
Copy link
Contributor

ndonkoHenri commented Nov 14, 2024

Was able to reproduce the issue with the latest pre-release:

import flet as ft


def main(page: ft.Page):
    page.appbar = ft.AppBar(
        title=ft.Text("Badge Playground"),
        center_title=True,
        bgcolor=ft.colors.LIGHT_BLUE_300,
    )
    page.add(
        ft.OutlinedButton(text="This is a Button", badge=ft.Badge(text="New")),
    )


ft.app(main)

Actual

image

Expected

(running on dev mode)
Bildschirmfoto 2024-11-14 um 16 00 23

@ndonkoHenri ndonkoHenri added bug Something isn't working packaging Related to app packaging and removed status: awaiting response Further information is requested labels Nov 14, 2024
@Siva-Rajan-R
Copy link
Author

@ndonkoHenri
Not only badge , the map Control also not working as we expected on Android

@JCxOx
Copy link

JCxOx commented Nov 26, 2024

Hello Siva-Rajan-R,

I have the same problem with map on Android.
The app works correctly on Linux and web, but nothing is displayed on Android (map frame always gray).

Have you found a solution ?

I have no requirements.txt , do you think I need to add websockets==14.0 or requests==2.32.3 or other ...
or any permission ?

Thanks,
JC

@Siva-Rajan-R
Copy link
Author

@JCxOx

You don't need to add the websockets==14.0 or requests==2.32.3 or other It was an bug on packaging the flet team will resolve it as soon as possible. We need to wait for it🙂 and also don't forgot to add flet build apk --include-packages flet_map while building an apk , in future.

@JCxOx
Copy link

JCxOx commented Nov 27, 2024

Hello Siva-Rajan-R,

Thanks for the advices, I am not familiar with specific Android setting.
I will wait for the new flet version.

JC

@ndonkoHenri
Copy link
Contributor

Please retry with the new flet v0.25.0.
It should be fixed now.

@ndonkoHenri ndonkoHenri added the status: awaiting response Further information is requested label Nov 28, 2024
@JCxOx
Copy link

JCxOx commented Nov 28, 2024

Hello ndonkoHenri,

I have updated the new version (with $ pip install flet)
Now my flet version is 0.25.0 (no more 0.25.0.dev3750)

But unfortunatly nothing works !
Even the desktop version has an error : AttributeError: module 'flet.map' has no attribute 'MapConfiguration'

Maybe I didn't update flet correctly...

Thanks,
JC

@JCxOx
Copy link

JCxOx commented Nov 28, 2024

Hello,

After removing the map.MapConfiguration( ... ) line, I put the initial_center= and initial_zoom= outside and that works on the desktop computer (linux).
But the Android is still not working.
I build the APK with the following command : flet build apk --include-packages flet_map

The building process is OK : Successfully built your .apk for Android! ....

But on my Android phone, there is many error :

Traceback (most recent call last):
File "", line 47, in
File "", line 222, in run_module
File "", line 142, in _get_module_details
ImportError: No module named main

With the previous flet version (0.25.0.dev3750) that was Ok, no error ... but no map ...

Thanks for your help,

JC

@FeodorFitsner
Copy link
Contributor

Should be fixed now. Please re-build the app.

@JCxOx
Copy link

JCxOx commented Nov 29, 2024

Hello,

I have updated flet with :$ pip install flet --force-reinstall

and re-built the App :$ flet build apk --include-packages flet_map

but the same error appears :

Traceback (most recent call last):
File "", line 47, in
File "", line 222, in run_module
File "", line 142, in _get_module_details
ImportError: No module named main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working packaging Related to app packaging status: awaiting response Further information is requested
Projects
Status: 🆕 New
Development

No branches or pull requests

4 participants