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

Define user friendly names for Android Apps #2653

Closed
alexballas opened this issue Nov 21, 2021 · 6 comments
Closed

Define user friendly names for Android Apps #2653

alexballas opened this issue Nov 21, 2021 · 6 comments
Assignees

Comments

@alexballas
Copy link
Contributor

Is your feature request related to a problem? Please describe:

When building an android app with fyne, you need to specify an -appID. This appID is then used as the display name in the Application Info in Android and also the recent apps menus.

Is it possible to construct a solution with the existing API?

No

Describe the solution you'd like to see:

Ability to provide more user friendly names for the Android apps and not use names in the form of "org.something.something"

@andydotxyz
Copy link
Member

Hmm, this did not occur to me at the time for some reason - but did you try passing the -name parameter to go package?

@alexballas
Copy link
Contributor Author

Hello, yes, same issue

@andydotxyz
Copy link
Member

Can you please check the content of the AndroidManifest.xml that is embedded in your .apk file generated when using -name parameter? (you'll need to decode it from binary form - https://lynxbee.com/how-to-decode-binary-android-manifest-xml-to-human-readable-text-androidmanifest-xml/)

Specifically looking for lines that contain android:label.
Make sure you are checking the correct output file as well, because using the name specifier will change the file name.

@alexballas
Copy link
Contributor Author

alexballas commented Nov 21, 2021

$ fyne package -os android -name Go2TV -appID com.alexballas.go2tv -icon ../../assets/go2tv-icon.png
github.com/alexballas/go2tv/cmd/go2tv does not import "github.com/fyne-io/mobile/app"

$ unzip Go2TV.apk -d output
Archive:  Go2TV.apk
 extracting: output/classes.dex      
 extracting: output/lib/armeabi-v7a/libGo2TV.so  
 extracting: output/lib/arm64-v8a/libGo2TV.so  
 extracting: output/lib/x86/libGo2TV.so  
 extracting: output/lib/x86_64/libGo2TV.so  
 extracting: output/res/mipmap-xxxhdpi-v4/icon.png  
 extracting: output/resources.arsc   
 extracting: output/AndroidManifest.xml  
 extracting: output/META-INF/MANIFEST.MF  
 extracting: output/META-INF/CERT.SF  
 extracting: output/META-INF/CERT.RSA  

 
$ java -jar AXMLPrinter2.jar output/AndroidManifest.xml | grep android:label
		android:label="Go2TV"
			android:label="Go2TV"

The name in the app list appears correctly as "Go2TV". It's the "recent apps" and "app info" that shows org.alexballas.go2tv (same wihout the -name flag)

@andydotxyz
Copy link
Member

OK, thank you for all the confirmations, good to check.

@andydotxyz andydotxyz added this to the Fixes (v2.1.x) milestone Nov 21, 2021
@andydotxyz andydotxyz self-assigned this Nov 21, 2021
@andydotxyz
Copy link
Member

Fixed on `release/v2.1.x'.
If you install the 'fyne' tool from there you will get pretty names appearing as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants