-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
why when I fyne package the android app . the app name always is org.golang.app.GoNativeActivity #665
Comments
No matter how I set androidmanifest.xml,the app name never change,always is "org.golang.app.GoNativeActivity" |
There are improvements to this on release/v1.2.3 branch (not released yet) would you be able to test that version as well? |
|
Can you tell me when the new will release |
We don't have a schedule yet - probably in a week or two. |
Actually hold on - this is the name of the main activity, not the name of the app. |
I am very willing to test in advance. Could you send me an email? Thank you very much |
|
Can you confirm the package command you are using and the name of the directory you are building in? |
yes I can |
Apologies, I meant can you please tell us what package command you are using, and what the directory name is that you are building in. |
I tested version 1.2.3 without custom fyne/cmd/fyne/internal/mobile/manifest.go Line 58 in 4c84564
I follow this template and change my manifest file <?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="org.nps.client"
android:versionCode="1"
android:versionName="0.26.5">
<uses-permission android:name="android.permission.INTERNET"/>
<application android:label="Npc" android:debuggable="true">
<activity android:name="org.golang.app.GoNativeActivity"
android:label="Npc"
android:configChanges="orientation|keyboardHidden">
<meta-data android:name="android.app.lib_name" android:value="npc"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest> But when I build it, use a script cd /go
apt-get install libegl1-mesa-dev libgles2-mesa-dev libx11-dev -y
go get -u fyne.io/fyne/cmd/fyne fyne.io/fyne
echo "fyne install success"
mkdir -p /go/src/ehang.io/nps
cp -R /app/* /go/src/ehang.io/nps
cd /go/src/ehang.io/nps
rm cmd/npc/sdk.go
echo "tidy success"
cd /go/src/ehang.io/nps
go mod vendor
cd vendor
cp -R * /go/src
cd ..
rm -rf vendor
echo "vendor success"
cd gui/npc
fyne package -appID org.nps.client -os android -icon ../../docs/logo.png
mv npc.apk /app/android_client.apk
echo "android build success" with this manifest file, it shows the problem. |
Hmm. The package should not be altering a custom manifest - perhaps you can get a copy of the manifest from the packaged application and compare? That would probably be most helpful at this stage |
Yes, I find the question where is.
With custom manifest file on previous reply
It show's <?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="org.nps.client"
android:versionCode="1"
android:versionName="0.26.5">
<application android:label="Npc" android:debuggable="true">
<activity android:name="org.golang.app.GoNativeActivity"
android:label="Npc"
android:configChanges="orientation|keyboardHidden">
<meta-data android:name="android.app.lib_name" android:value="npc"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest> It works
Tested on my phone, just show the correct app name |
Wow, so the attribute order seems to be the problem? |
That's it, the order |
Perhaps this is related to the device or android version? Do you see the issue on emulator or any other devices? |
My phone is android 9, nokia8, and the issue in my repo tell me his phone is huawei, android 9, but not tested on and emulator, you can download this and test it. |
Can confirm the same behavior in my app on android 8.0. |
Thank you for all this. I checked the android spec and cannot find anything that should imply this behaviour - the “label” field should always be used not the “name”. I suspect the package code must be mid-reading it somehow... will look into it further |
It would be great if you could check the upcoming 1.2.4 release (currently on |
I tested the 1.2.4 release, behavior not changed, order still effect. |
I cannot explain why this is happening, but the manifest in 1.4.1 (release date to be set) will include a permissions section, so it should illustrate that others go there too. |
Describe the bug:
To Reproduce:
Steps to reproduce the behaviour:
Screenshots:
Example code:
Device (please complete the following information):
I had sitting androidmainfest.xml android:label,but mybe never use it
The text was updated successfully, but these errors were encountered: