Start a new topic

How to upload icons as png or gif?

Hi!


Is it possible to upload application icons as png or gif? Or do I have to draw them manually without any additional option to upload?


Thanks!


- Marc


you can't upload (as far as i can tell) an icon. To create an icon you have to make it by hand, pixel by pixel


but, you can however use a png or gif in some situations.


You can't add one as an application icon but you can use one when sending a payload to the lametric either as a notification or as the payload of a push or poll


when writing the payload, just use 

"data:image/png;base64,<base64 encoded png binary>"

or

"data:image/gif;base64,<base64 encoded gif binary>"

instead of an icon id, as the value for the icon key.


it's described in a few places throughout the api documentation, like here for example (just scroll down a little bit):


https://lametric-documentation.readthedocs.io/en/latest/reference-docs/device-notifications.html#body


It's not as useful as it could be, as you still have to manually draw an icon if you want to use it as an application icon, but it has it's uses :)


hope to have been of some help.


cheers

Thank you very much.


1 person likes this
Login or Signup to post a comment