-
Notifications
You must be signed in to change notification settings - Fork 14
Author: Masala <[email protected]> #2
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
base: main
Are you sure you want to change the base?
Conversation
8acf798
to
81e14a3
Compare
6f881e1
to
02068d6
Compare
81e14a3
to
8545def
Compare
This PR seems to mix two features: adding a new permission and adding .java support to |
I believe the java compiler dependency already exists for buildandroid.go and the changes above are necessary to implement this feature (generating AndroidManifest.xml with the right class names). When do you think you will manage to eliminate the java compiler dependecy? |
It's true that buildandroid.go depends on a Java compiler today. My point is that your change will make it much harder to avoid that dependency in future. Without your change, we can check in .class files (or a .jar) for the Java files from package
I don't have the work planned.
Can you point to the changes that require a java compiler to implement this change? I couldn't find any. |
8545def
to
a9fefc1
Compare
Thanks. Looking closer, I see those changes were no longer necessary because the notification icon is now using the package icon. |
gogio/androidbuild.go
Outdated
@@ -446,6 +448,7 @@ func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo, extraJars, pe | |||
Features: features, | |||
IconSnip: iconSnip, | |||
AppName: appName, | |||
HasService: stringsContains(permissions, foregroundPermission), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's more canonical to search for "foreground"
in perms
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed.
@@ -468,6 +471,19 @@ func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo, extraJars, pe | |||
<category android:name="android.intent.category.LAUNCHER" /> | |||
</intent-filter> | |||
</activity> | |||
{{if .HasService}} | |||
<service android:name="org.gioui.GioForegroundService" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't submit this change before your change that adds GioForegroundService
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
gogio/androidbuild.go
Outdated
<meta-data android:name="org.gioui.ForegroundChannelDesc" | ||
android:value="" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this empty value be omitted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if the corresponding getString() method in gio returns a default empty string.
I do not want toplay to clever, but if you want got permision you can use https://github.com/MatejMagat305/golang-prototype-permision |
a9fefc1
to
697be40
Compare
e92b820
to
c2c687e
Compare
This adds the permission android.permission.FOREGROUND_SERVICE to the android application Metadata Signed-off-by: Masala <[email protected]>
c2c687e
to
f7c2488
Compare
207e6f8
to
01ffdf7
Compare
This PR is to extend the gogio tool to support adding the android permission for FOREGROUND_SERVICE to the generated android manifest.xml metadata. Originally part of gioui/gio#67