JEN PERSON: It's harder than it looks.
JASON HERON: OK, we got this.
I know!
I know.
Why is this so hard?
It's like if I'm just creating random garbage
from my own brain, that's fine.
But as soon as I have to read it, then it's really hard.
All right, let's just go for it and see how we do.
JEN PERSON: Yeah.
JASON HERON: [LAUGHS]
[MUSIC PLAYING]
SPEAKER 1: So scene 1, take one more.
JEN PERSON: How's it going, Firebase developers?
Welcome to another episode of AskFirebase, the show
where we answer your burning Firebase questions.
I'm Jen Person, your host, and today, my co-host
is Jason Heron.
JASON HERON: Hey, folks.
JEN PERSON: Welcome to the show.
JASON HERON: Well, thanks for having me here.
JEN PERSON: So why don't you tell people a little bit
about what you do at Firebase?
JASON HERON: So I am a software engineer,
and I work on Firebase in-app messaging.
I do some stuff with the Firebase console,
as well as some stuff for the Android SD case.
So lots of typing, really.
JEN PERSON: Great.
Good to have you here, especially
because I don't know much of the Android side of things.
So it's always nice to have someone on there that
can answer those questions.
I'm like the one person in all of Google that doesn't--
JASON HERON: No, many people don't know.
JEN PERSON: Oh.
JASON HERON: Yeah.
JEN PERSON: Yeah, we should have a club.
JASON HERON: Yeah, sometimes I feel
like I don't know actually.
JEN PERSON: Oh.
JASON HERON: [LAUGHS]
JEN PERSON: Well, they change it all the time, right?
JASON HERON: Yeah.
JEN PERSON: All right, Jason.
Are you ready for your first question?
JASON HERON: I am so ready.
JEN PERSON: OK, so our first question
comes to us from SunSun on Stack Overflow, who asks,
so I need this image dialog to be filled to the whole screen.
Is there any configuration or customization
that can be done to achieve it.
Or what are the possible customizations
of that dialogue?
Also, are we able to set the font for the top banner
or modal message layout text?
JASON HERON: Right now, if you're just
going to integrate the headless SDK,
and you don't really want to do any other work yourself
and just kind of use the Firebase console,
we don't provide a lot of customization
for things like the width of how the dialogue is
going to show up or the fall into other things.
Those are definitely on our radar,
and we're planning on adding features
like that in the future.
But, right now, if you want to customize those dialogues,
one thing you can do is you can--
our SDK is completely open source.
And since the actual server doesn't really
prescribe things like the font or the size,
that's all done in the SDK.
So it's not particularly hard to kind of go in there
and modify something like the font
and then have the messages display differently
for your users.
JEN PERSON: I know that, on the iOS side,
we have the open source Firebase UI.
And the Firebase UI auth is really
great for getting started with authentication, for example.
But it's a really basic layout.
So, very similarly, you can see the code.
And you can, basically, on the iOS side, override the class,
make the changes that you want to make.
So it looks the way you want to, and it
sounds like you can do something similarly
with in-app messaging.
JASON HERON: Exactly.
JEN PERSON: Actually, our next question
also comes from SunSun.
JASON HERON: Love SunSun.
JEN PERSON: Yes, thank you for your questions.
SunSun has a problem where it looks like everything is set up
properly, but the display message callback
is not being called.
So what do you think that the developer
should do in this case?
JASON HERON: Yes, so I looked at the code on Stack Overflow.
And it seems like everything is kind
of being handled correctly.
The class that handles the callback
seems to be being correctly instantiated,
and the callback is being hooked into the headless SDK
correctly.
So there is probably something else
going on somewhere in the stack or somewhere in the code.
I would say that one thing you could do
is you could enable debugging for the SDK itself.
If you just look up enable debugging for Android SDK,
but--
JEN PERSON: Which we'll link below.
JASON HERON: Yeah, it's a standard flag
that you can just kind of put in there to view
more verbose debug logs.
That might provide a little bit more information
for what's going on here.
But, if you're still having problems,
our headless SDK's on GitHub.
And so you could file an issue against that.
Or you could just go through a Firebase support route
and try to file an issue there.
JEN PERSON: Yeah, so we'll link so you can file a bug report.
Any time you have something occurring
where it worked yesterday, and now it's not working today.
Or if you've followed the directions--
and I appreciate you putting this on Stack Overflow first--
and you're finding that you're not
getting the answer you're looking for,
do feel free to reach out to our supports.
And, if you do believe that something
is a bug, file that is a bug, we really appreciate that.
Because as much as I'd love to be testing out
all of the products on Firebase on all
of the different languages that we cover,
there simply isn't a way for us to do all of that.
So we really depend on you, the developers,
to give us that feedback as well.
Our next question also comes from Stack Overflow.
It says I have successfully implemented
Firebase in-app messaging, and it's working fine.
Is there any option to send in-app messages
whenever we want?
JASON HERON: So, I guess, really,
what we should explain is like how the in-app messaging
triggering model works.
So it's not like with FCM, where you push messages
to the device.
What actually happens is, when the application loads and it
sees that our SDK's there, periodically,
our SDK will check our servers to see
if there are any new messages, download those messages,
and then display them based on contextual triggers.
So the reason why this is so beneficial
is that it really saves data for your users.
There's no sort of pull connection with our servers
all the time.
And, also, it kind of allows you to engage with your users
based on the context of the app.
So if you imagine if just pushing
a message to your users, it might not make sense.
Right?
If they're in the middle of a level playing a game,
they don't want to message to just come up right there.
You want it to be based on the context of the app.
JEN PERSON: Right.
JASON HERON: So what we do is we hook into Firebase Analytics
Events.
So any Firebase Analytics event that you
can trigger in your app, you can also trigger a message
based on that.
So you can imagine someone just won a level,
and there's a level up event that
was triggered in Analytics.
Then you can trigger a message based on that.
JEN PERSON: Right.
So this functionality is much more similar in my mind
to the way Remote Config works versus the way notifications
work.
So it's like rather than constantly,
like you said, receiving those messages,
it's just intermittently updated.
So, if you're looking for more of a push model, where
you can send multiple messages, and you want
to be able to use sort of maybe a blast of notifications
or frequent updates, something like users messaging
one another or anything that's going to involve that push
model, you're really going to want to use Firebase Cloud
Messaging instead.
And if you want it to pop up on the screen,
kind of like in-app messaging does, you do sort of
have some capability.
It's going to involve some implementation on your side.
But, for instance, if you send a data message,
and you can receive that data message while your app is open,
you can take that information and use
it to display your own modal.
So, if it's that kind of thing that you're looking for,
the in-app part of it, but you want
it to happen more push functionality,
then I would recommend you use Firebase Cloud Messaging
with data messaging and configure yourself
how you display those messages.
JASON HERON: And, also, in theory, you
could use those data messages in our headful SDK, which
is our UI component, and then use our UI if you didn't
want to make your own UI.
So that's kind of a slightly complex use case.
But, in theory, if you wanted to have those messages to play
whenever you want, you could use FCM, push data messages,
and then just write them into our model.
JEN PERSON: Galaxy grain.
JASON HERON: [LAUGHS]
JEN PERSON: Yes, I like that idea.
Thank you so much for coming on the show, Jason.
I really appreciate you coming on
and answering these questions.
JASON HERON: For sure.
Yeah, happy to help.
JEN PERSON: And thank all of you for your questions.
We really couldn't make the show without you.
So if you have a question about Firebase,
be sure to tag it with hashtag #AskFirebase.
And who knows?
You may see it on a future episode.
And if you enjoyed the content that you see here,
we have so much more on the Firebase YouTube channel.
So be sure to subscribe.
Thanks so much for watching, and I'll
see you on a future episode.
[MUSIC PLAYING]
Bye.
JASON HERON: [LAUGHS]
JEN PERSON: You're not ready to say goodbye.
JASON HERON: That's right.
Well, it wasn't clear that I should be waving.
JEN PERSON: No, no, no, I like to spring it on people.
It's fine.