How to add a custom logo to the notifications command?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

How to add a custom logo to the notifications command?

Post by liveCode » Thu Feb 17, 2022 7:05 pm

I am currently working on this guide:
https://lessons.livecode.com/m/4069/l/5 ... ifications
And I wonder how I can add a custom logo to the post
After all, when the message is displayed, then the logo has the LIVECODE logo
If I do not understand enough I can attach a screenshot
Thank you

simon.schvartzman
Posts: 638
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: How to add a custom logo to the notifications command?

Post by simon.schvartzman » Fri Feb 18, 2022 1:07 pm

Hi, in iOS the OS takes care of it, meaning it uses the same Icon as the one used by the APP in the home screen.

In Android you have to setup the Status Bar Icon in the stand alone settings.

Hope it helps.

Best
Simon
________________________________________
To ";" or not to ";" that is the question

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to add a custom logo to the notifications command?

Post by liveCode » Wed Feb 23, 2022 1:47 pm

I have set an icon in the settings of Android and it still does not work
Attachments
7af7749c-09e7-4dff-b1a4-00872ceccce4-image.png
Last edited by liveCode on Wed Feb 23, 2022 7:43 pm, edited 1 time in total.

Klaus
Posts: 13807
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How to add a custom logo to the notifications command?

Post by Klaus » Wed Feb 23, 2022 1:53 pm

Hi livecode,

please don't write in Hebrew, this is an english speaking forum!


Best

Klaus

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9294
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How to add a custom logo to the notifications command?

Post by richmond62 » Wed Feb 23, 2022 2:54 pm

How do you know that is Hebrew?

It could be Yiddish, Ladino or Fars; all of which use that writing system. :D

Sorry, aberrant moment . . . LOL.

Google Trashlate gave me this:

"I have set an icon in the settings of Android and it still does not work"

Is a PNG image OK for an Android icon?
Screen Shot 2022-02-23 at 3.58.37 PM.png
Screen Shot 2022-02-23 at 3.58.37 PM.png (9.64 KiB) Viewed 4980 times

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to add a custom logo to the notifications command?

Post by liveCode » Wed Feb 23, 2022 7:42 pm

So replace the image with a JPG type?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7216
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: How to add a custom logo to the notifications command?

Post by jacque » Wed Feb 23, 2022 8:07 pm

The dialog icons need to be specified in script. See "gRevSmallAppIcon" and "gRevAppIcon" in the dictionary.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9294
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How to add a custom logo to the notifications command?

Post by richmond62 » Wed Feb 23, 2022 9:07 pm

So replace the image with a JPG type?
אני לא יודע

How about doing a spot of reading about Android and what it requires?

Klaus
Posts: 13807
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How to add a custom logo to the notifications command?

Post by Klaus » Wed Feb 23, 2022 10:01 pm

You can and should use a PNG file for an Android icon.
I am currently working on this guide:
https://lessons.livecode.com/m/4069/l/5 ... ifications
And I wonder how I can add a custom logo to the post
Do you mean the ANSWER dialog on Android as shown in the lesson?
If yes, then dialog does not show any icon on Android! 8)
After all, when the message is displayed, then the logo has the LIVECODE logo
This is in the IDE, right? Only here we can see an icon in the ANSWER dialog and only here we can
add a custom idon as Jaques already described.

Is that what you mean?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7216
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: How to add a custom logo to the notifications command?

Post by jacque » Thu Feb 24, 2022 12:07 am

Klaus wrote:
Wed Feb 23, 2022 10:01 pm
If yes, then dialog does not show any icon on Android! 8)
So true, and the one that does show is ugly too. I forgot we were talking about Android when I answered. On Android it's more common to use a toast, since answer dialogs aren't native to Android. There is a built-in "mobileToast" command in LC.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9294
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How to add a custom logo to the notifications command?

Post by richmond62 » Thu Feb 24, 2022 8:47 am

toast
Wow: learning something every day.

Who on earth invented that wonky bit of terminology?
-
SShot 2022-02-24 at 9.47.57.png
-
And, perhaps more to the point, is it possible to see what that looks like on a desktop machine?

simon.schvartzman
Posts: 638
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: How to add a custom logo to the notifications command?

Post by simon.schvartzman » Thu Feb 24, 2022 11:56 am

If I'm getting it right, in my humble opinion what is missing is to point to the desired icon in the Status Bar Icon field which is empty in the screen shoot.

Icons have been defined for the APP and the Splash but not for the Status Bar Icon which I guess is what the original post is asking for.

Maybe I'm completely wrong but...
Simon
________________________________________
To ";" or not to ";" that is the question

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7216
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: How to add a custom logo to the notifications command?

Post by jacque » Thu Feb 24, 2022 6:29 pm

richmond62 wrote:
Thu Feb 24, 2022 8:47 am
Who on earth invented that wonky bit of terminology?
The Android team, so-called because it pops up from the bottom of the screen like bread in an old toaster. It then lingers for a while and sinks back down again.
And, perhaps more to the point, is it possible to see what that looks like on a desktop machine?
No, because it's native to Android and LC uses an OS call to present it. But you could see it in an emulator I assume. If you like installing gigabytes of Android Studio you can have as many emulators as you like.

Edit: newer versions of Android don't pop up from the bottom, they appear higher up on the screen. But the name stuck.

Edit edit: a group of related icons that appear at the bottom and slide down when you're done using them (think photo editing options) is called a "snackbar".
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7216
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: How to add a custom logo to the notifications command?

Post by jacque » Fri Feb 25, 2022 5:33 pm

Well, it certainly helps to look at the lesson the OP referred to, which I should have done earlier. He doesn't want an answer dialog, he's using the notification system. Simon is correct, for those you need to include a status bar image. I've done this before and it works.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

liveCode
Posts: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to add a custom logo to the notifications command?

Post by liveCode » Sat Feb 26, 2022 6:22 pm

How do I use mobiletoast?
This is the code I tried

Code: Select all

mobileToast "hello", "long"

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”