Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / SetNotificationImage? need help with undocumented command

Author
Message
Roy Lazarovich
7
Years of Service
User Offline
Joined: 25th Jan 2017
Location:
Posted: 14th Mar 2017 12:06
Hi Everyone

I'm trying to change the icon of the local notification my game is creating using the undocumented SetNotificationImage(Integer iImageIndex) command (undocumented in that it does not appear in the API help you get when you hit F1 while the cursor is on a command)
So without being able to find any help online, I thought I'd turn here in the hopes that somebody has used it and knows

Here's what I do:



So the notification is shown correctly, but without the icon (using the default AppGameKit notification icon)

My icon is a 22x22 PNG image with just a white circle in the middle

Thanks!
Layer0730
7
Years of Service
User Offline
Joined: 25th Feb 2017
Location:
Posted: 14th Mar 2017 20:12
Wish I could help you. I just include my notification image during APK export. Good luck on your quest.
Roy Lazarovich
7
Years of Service
User Offline
Joined: 25th Jan 2017
Location:
Posted: 14th Mar 2017 21:10
Layer0730 wrote: "Wish I could help you. I just include my notification image during APK export. Good luck on your quest."


Well sir, you just did, haven't even noticed that option in the export dialog

Thanks!
easter bunny
11
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 14th Mar 2017 21:50
I tried running your code through the AppGameKit Player and yeah it didn't work. However when exporting to your APK, there exists an option to set the notification icons. I presume this icon will be hardcoded in so you cant dynamically change it within your code, but you can use a different icon than the standard AppGameKit icon

My Games - Latest WIP - My Website: Immortal.Digital - FB - Twitter
130,000 installs with AppGameKit and counting
Roy Lazarovich
7
Years of Service
User Offline
Joined: 25th Jan 2017
Location:
Posted: 14th Mar 2017 22:03
Thank you both, for some reason my posts aren't getting through so I hope this one does
0x7f
8
Years of Service
User Offline
Joined: 1st Apr 2016
Location:
Posted: 15th Mar 2017 04:12
yes the lack of proper documentation is a bit annoying. the main documentation is based on AGK1 mostly it seems. the forum posts here are offten not of much help as they are closed already since they are years old and never got answered..
if you have lots of time and do this as hobby its no problem to search the forum for bits of information, but a more organized platform would be great. that being said, i haven't played with the icon stuff, but just an idea, have you tried using an actual .ico file ?
also maybe its the size since default icon sizes are 16x16, 32x32, 48x48 maybe try resizing it to 32x32 for example.
Roy Lazarovich
7
Years of Service
User Offline
Joined: 25th Jan 2017
Location:
Posted: 15th Mar 2017 08:01
Thanks for the reply 0x7f

I've actually used this website for a reference when creating the notification icon:
http://iconhandbook.co.uk/reference/chart/android/

0x7f
8
Years of Service
User Offline
Joined: 1st Apr 2016
Location:
Posted: 15th Mar 2017 23:33
oh sorry then forget what i said, i was refering to standard icons. the notification icon is different and has other sizes as i saw on that page, thanks for the link

Login to post a reply

Server time is: 2024-04-26 21:40:08
Your offset time is: 2024-04-26 21:40:08