-
Notifications
You must be signed in to change notification settings - Fork 344
Notification must set user model id on win32 #146
Comments
@txthinking ok for But regarding your second question, can you point to the Electron corresponding doc? |
Sorry for the unclear description. |
thanks! |
I spent some time and found the solution and shared it with the people who needed it. I using the astilectron 0.27| astilectron: 0.51.0 | Electron 11.4.3 I can wait for provision to finish downloading and processing all the related files and then modifying index.js
// App is ready
function onReady () {
app.setAppUserModelId("com.mydomain.app"); // 👈 Add this line. default: electron.app.Electron.
// Init
const screen = electron.screen
Menu.setApplicationMenu(null)
... But I think this method is still very bad, I hope that the code can be changed directly in the go🤔 see also |
Yeah, I think that an I won't have time to work on this anytime soon, but if someone is looking to contribute, feel free to let me know and I'll guide you to make a PR. |
I'm trying to use the event to change the ID, I with it can add on notificationCreate but it doesn't work. It seems that the event has to be determined after the end of onReady. Even if the hard coding can't change the ID later, for example rl.on('line', function(line){
app.setAppUserModelId("hello world") // 👈 still not work.
// Parse the JSON
let json = JSON.parse(line)
// Switch on event name
let window; I don't know if my inference is wrong or not, but the result of my experiment is indeed like this. I noticed that atilectron is not a big repository, I want to use embedgo1.16 embed in go-astilectron to embed it directly so that there is no need to maintain two repositories, and even in the js directly using text/template, we can set some initialization place to supply the user to write the code directly into the js, will become very flexible. Would you accept the pull request like it? |
|
I did not find the setappusermodelid api on godoc.
https://electronjs.org/docs/api/app#appsetappusermodelidid-windows
BTW, can we set app id custom like com.mydomain.app
Thanks
The text was updated successfully, but these errors were encountered: