 Let's start with a thought experiment. Let's assume that you are blindfolded now and you can't open your blindfolds and can you Can you just walk out of this center? This lifelong institute outside and can you walk on the road? Can you go to your hotel? Can you go to your restaurant without even opening your eyes? I think we already know the obvious answer, right? That's not possible and the obvious answer is no until you have some superpowers and in that case Please don't be please don't waste your time here. Just go and save humanity with poverty hunger So hey everyone, I'm Prabhanshu at 3 and I'll be talking about contextual app experiences and the thought experiment just I which I just proposed is Might seem naïve and might you might think you know the obvious answers But someone something very close to you right now Feels like that some That's that's your phone right now. It knows your exact location exact coordinates But really doesn't understand the physical awareness of what you're doing what you are really want to do and what you think So this this is one way of thinking in contextual apps and let's let's understand it in a different way as well So contextual app experiences are also about user experiences so recently many there are many top video streaming apps are coming up around the world and these are few from India because India is India in a market for this has grown a lot in the last few last 1.5 years and Netflix the like the biggest the The biggest company in this market is getting a lot of competition from the local apps as you can see these markets and this is because they have Got the local content and they understand the local market and they are they are catering to the needs in different various languages But Netflix has really cracked one thing which these new new companies are trying to understand that is creating a contextual App experience. Let me let me explain it a bit bit better. So let's let's see. This is my watch list right now I'll I mostly watch critically acclaimed content and I don't watch every every series or movie and But the notifications I get are just like this and they are not really relevant not even remotely relevant to what I watch So so this this kind of makes me disconnected to my to To things like to the app. I don't feel the connection with the app So I'm I'm just asking that can I get some context here? Because if you are sending me notification, which are not related to me I won't even see it. I was just swiped swiped out and Netflix has this thing that they really mostly they push a notification to you until It matches they they won't send it until it matches with their with your previous previously what shows or your watch list And this is I felt and even if you look at their social media Their customer is customer satisfaction is great like they it's all over the social media So this is this one way the another example is this is One sms notification I got while I was flying from India to Singapore I did before that and my airline sent me a notification saying that I should download this app jet screen So I can save myself from boredom while I'm during the flight This is a good experience telling your user customer that you can do this so that you can enjoy some media subcontinent on board But let's think about it Can we do this better because sms is a way old thing now and won't it will it not be better if I send a notification? do you think and Will it not be better if I send it while I'm at the gates while the user at the gate is at the gates and An hour before boarding while he's thinking about his journey then he can decide whether he wants to download the app or not Right. So how do you send a notification without the without the user having? The app if the user doesn't have the app you cannot push a notification to those users, right? There has to be a way. Let's it's a it's an interesting problem. And let's think about it and the easiest answer to this is beacons so Beacons are small below devices you can deploy it somewhere like physically and someone is nearby With if you are using Eddystone URL, you can the beacon can transmit some data in case of Eddystone URL It transmits a URL so that the in notification the user sees and URL and can visit the URL and get get Start the interaction. This is a jump jump start way to get the user on board So for example if there was a screening of Star Wars and that has some beacon and it's transmitting transmitting the URL of The trailer the user can interact with it and understand that the trailer Can decide whether the watching by watching the trailer that he is going to watch the movie or not and The user can get such notifications so this is one way but Deploying beacons at a large scale at every location like at every theater or shopping mall It's quite a cumbersome task because the data you will be transmit transmitting the URL Transmitting will change with time right because Star Wars movie for example won't be there forever the movie will change So the URL will change so the Bet Google came up with this better method. This is nearby connections. It's an peer-to-peer Networking API that allows devices to interact with each other or the or with the objects like beacons so In a nutshell it's it lets you push a notification to users in an vicinity Who are connected who feel? Whom with with you feel that this notification is relevant and they can It's a way to jump start the user to get you get on board So if you if you want to check whether you are opt whether you have already on enrolled into the service or not because every Android device has and nearby notification now and if you go to settings now and into Google and Then you select nearby you can see that whether you whether you want to opt in or opt out of this service This really gives the control to the user So this was this was about nearby and notification and if you have been around Since morning or if you are here by tomorrow you can you will be still getting these notifications if you have opt in for the service These are two there will be two links coming up one is a direction to an app A restaurant discovery app and the other one is a website URL. So the the people in the vicinity of that beacon will receive the this these two URLs and I'm actually using a beacon Google's beacon dashboard to create this nearby notifications So first will redirect you to a restaurant page on Zomato app restaurant discovery app and the second will take you to a website page which we have a Sample page where of a project which I'm working on so you can like really check it out if you haven't Seen this during today. You can check it out back tomorrow For the first thing I'm sending the URL on a specific time so that you don't get lunch notifications during day Not like let's say breakfast. So it's it will be around in the afternoon So this is this is a basic pretty This is a basic dashboard where you can add your beacons if you have beacons the adding beacon process is actually Actually varies from manufacturer to manufacturer But once you have added it once it's there you can add metadata whether it's portable portable or not beacon and Then once the you've added the metadata you can create notification just like this It's that easy like even a non-developer can do it. So this is about beacons, but Nearby connection is not just about beacons It's more of a publish and subscribe service where one device can publish some messages and the other device can subscribe to those messages for example Some I don't know whether you have heard about it or not pocket cast is a app Which is about podcasts and it lets users its users to share their favorite podcast offline by using nearby connections so what they what they do is one device publishes the a Set of URLs a set of list of Podcasts to other to in the in the vicinity and the other device can read them and can show it to the user So this is just just a basic code So another example you can try today right now if you want is by going to this this link and I pre-compiled a sample app by Google what it does is it converts your phone into a walkie-talkie Just using your Bluetooth and holding your volume button You can talk to a random person or the device which which it has get connected to so this is one way of creating nearby notification and without without being app installed you can send notification you can create contextual things let's say Sending notification about falsely event or some talk you can you can use those things So it's just not about the beacons or just the Delocation because there are many things you you might consider like weather Let's say a user is going from office to home and you are sending the notification about a shopping About about a shopping discount, but that that won't be good if you are sending it during a rainy rainy day, right? The user won't won't stop and just go for a shopping just because they they are providing some discount You must send it notification send these notification when it's a sunny day And you feel like that the user will will get to shopping, right? So Google came up with this awareness APIs and they introduced it two years back But it's so it got public everyone it's in public access now in it came last year So what did what they are doing is they are including six to seven other context signals and location such as weather conditions you can know about the user's weather conditions that you can Decide whether you are going to create a reaction to the Reaction on your app or not you can use time you can use location You can use even use headphone whether the user is listening to some music or not for example, there's this super player South American app what it does is it lets it If the user has already turned the service on it automatically plays the workout playlist The songs from the workout playlist so that while the user is exercising or doing some workouts So it's kind of like related to the user So there are few things they are there they have included into this It's a it's a unified API of seven six to seven contextual signals So first one first one is time. So I was recently doing a similar app for North American startup what they were trying to do is Integrate these signals into one API, but while doing this we face few issues and the issues were first of all battery consumption So if you are trying to do it on your own a lot of like Services needs to be run in a background and the it consumes a lot of battery and it also consumes RAM And if it consumes RAM and battery always might kill your app and if your app is killed you won't get that context data, right? And this is where Google came in and made their evidence API and made easier for developers to create a Create a very dynamic very very easy experience without without letting user Getting worried about things like system system battery or system RAM So these are the few things you can even check whether the user is walking or not and now now like You can also understand that user is driving or not if he's driving you don't want to Anoy the user with a lot of notification in the nearby area, right? So they they don't they don't give a call back to your app if it really doesn't if it is not required So they have divided this into two ways to get how to use it So first one is FH API where you set up a Geofence it's similar to Geofence API where you set up a Geofence and Where you set a pre-defined condition say whenever this happens? Let me let my app know so whenever that happens You will your app will get a call back and you can decide how to react to that thing and The second one is snapshot API where you can access the snapshot or the Condition these conditions on your own in the app Rather than getting a call back from the from awareness apis. So let's let's see a sample sample code How is it easy is it so? There's this problem which I faced and I was trying this awareness apis So whenever I'm going from my metro station to my home, and I'm listening to music I always forget things which I have to buy on the way and so I created a test app where if I'm walking and if I have headphones on and If I'm in the vicinity of that store it will just say hey Do you want to buy something? Do you are you forgetting something? So how we are doing it how I did this was simple first I'm creating a walk fence in the first line walking fence It's just detects it just tries to predict whether the user is walking or not In the second line. I'm trying to detect. I'm sorry I'm trying to detect a headphone fan. I'm creating a headphone fence where I'm trying to detect whether the user has Headphones on on or not in the third line I'm trying to integrate these two into one fence so that it gets it gets easier for other for further in the third line, I'm trying to Create an area around the store so it has the user must be in the vicinity right without that You cannot send it to every user so in the in the fourth line is just the opening hours So this is also one condition you like you must think before while developing that Store might be closed so you you need to decide the store ours as well So that the geo fence the recall back is at the right moment not not every not every time So once once I have created these fences In the in the third last line What I'm doing is integrating the first fence and let the last two fences into one So that I have a complete fence where the user is walking with headphones on Near the store during its open ass and the in the last two lines I'm just updating it and registering it with the Google awareness APIs So in this condition if the user is walking around the store during While while listening to songs and the store is open you your app will get a call back It doesn't matter whether your app is is running or it's killed it really doesn't matter You your app will get a call back and you can decide what you what to do with it So this is one way but what if you want to access the data while the app is running So this is a snapshot API code as simple. This is much simpler than that Rather than creating fences you can just use one line code the first line code What it does is you can get the places data of the user Let's say with the places type right? Let's say the user is at a restaurant. So you can get the data Where he is and what type of establishment is that and the in the second second line It's just a simple code to get the weather conditions. So let's say it's raining and in that case If I'm walking and I'm it's raining. I won't be buying it I won't the user won't be considering even buying anything He the user wants to go from a to place to be placed or to whom right? So you don't have to push notification or to create some interaction with that so this is this is This these are the few things you must be how many have you have how many of you have Chromecast like You must have experienced it, right? So when you buy a Chromecast and you turn on the Bluetooth if you get a notification saying let's set up your Chromecast That's that's nearby notification. That's that's how awareness API is are actually working So these are few companies which are also doing it and I was involved with the North American startup Who was doing a loyalty program? what they were doing is whenever the whenever the user is around a restaurant or a shopping mall and It's a it's a good do good time to shop or to have lunch or dinner They will give you offer note often offer notification These are silent notification so that you can decide whether you want to have lunch at a Discounted price or at an offer. Let's say buy one get one on drinks So this is how they were trying to do it and this actually makes the restaurant discovery or the establishment discovery a better experience and like a trailer also did this while While using the awareness behind the in the initial stage what they did was and they enabled the user to share trailer boards Offline they were just transmitting the link to the trailer board so that the user and the vicinity can share it together very easily without even having like without having going online or whatever doing and Android TV remote if you have Android TV you must be knowing it because Android TV remote works on this only like It gives you a pop-up while you are at home saying a do you want me to turn on the TV or like? Do you want me to this show is there and other things so in the in the world of increasing? Increasing apps in the world where apps are as are acting as a services where Notification are just delivery platforms and it's less about user User opening your app. It's more. It's more of a like experience where you push your user to ask them to come to Your app and have an interaction with the system have Have the user interactive have the environment interactive so this hence we we need Contextual app experiences, so that it's so that it's better for the user to a better experience Thank you, so I'm open to questions if you have any You said Yeah, so with with nearby notification or This is a thing within nearby notification nearby notification comes when you don't have the app They are used when you don't have actually have the app So you can actually mute those kind of those notifications if you mute them and a lot of people are muting them They'll be marked as spam and only STTP s urls are allowed at the nearby notification and You can actually mute them and it makes a better user experience gives a control to the user as well