Skip to content

Commit

Permalink
new version Fri Sep 27 03:47:10 UTC 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis CI committed Sep 27, 2024
1 parent ace1f4c commit 58f159d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
16 changes: 5 additions & 11 deletions feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</description>
<link>https://engineering.grab.com/</link>
<atom:link href="https://engineering.grab.com/feed.xml" rel="self" type="application/rss+xml" />
<pubDate>Thu, 26 Sep 2024 09:41:56 +0000</pubDate>
<lastBuildDate>Thu, 26 Sep 2024 09:41:56 +0000</lastBuildDate>
<pubDate>Fri, 27 Sep 2024 03:47:04 +0000</pubDate>
<lastBuildDate>Fri, 27 Sep 2024 03:47:04 +0000</lastBuildDate>
<generator>Jekyll v4.2.0</generator>

<item>
Expand Down Expand Up @@ -236,9 +236,7 @@

&lt;p&gt;As we set out to design Grab’s Android Live Activity module, we broke down the task into three key components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Registering Live Activity Token&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;registering-live-activity-token&quot;&gt;&lt;strong&gt;Registering Live Activity Token&lt;/strong&gt;&lt;/h3&gt;

&lt;p&gt;In order to enable Hedwig services to send Live Activity notifications to devices, it is necessary to register a Live Activity Token for a specific order to Grab Devices services (refer to figure 1 for the iOS flow). As this use-case is applicable across various verticals in iOS, we have designed a LiveActivityIntegrationManager class specifically to handle this functionality.&lt;/p&gt;

Expand All @@ -260,9 +258,7 @@

&lt;p&gt;Our goal is to provide developers with an easy implementation of Live Activity in the Grab app. Developers can simply utilize the startLiveActivity() function to register the token to Grab Devices by passing the vertical name and unique ID as parameters.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Notification Listener and Payload Mapping&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;notification-listener-and-payload-mapping&quot;&gt;&lt;strong&gt;Notification Listener and Payload Mapping&lt;/strong&gt;&lt;/h3&gt;

&lt;p&gt;To handle Live Activity notifications in Android, it is necessary to listen to the Live Activity notification payload and map it to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LiveActivityAttributes&lt;/code&gt;. Taking into consideration the initial Live Activity design (refer to figure 3), we need to analyse the variables necessary for this process. As a result, we break down the Live Activity UI into different UI elements and layouts, as follows:&lt;/p&gt;

Expand Down Expand Up @@ -308,9 +304,7 @@ class LiveActivityAttributes private constructor(

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Payload Rendering&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;payload-rendering&quot;&gt;&lt;strong&gt;Payload Rendering&lt;/strong&gt;&lt;/h3&gt;

&lt;p&gt;To ensure a clear separation of responsibilities, we have designed a separate class called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LiveActivityManager&lt;/code&gt;. This dedicated class is responsible for the mapping of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;LiveActivityAttributes&lt;/code&gt; to Notifications. The generated notifications are then utilised by Android’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;NotificationManager&lt;/code&gt; class to be posted and displayed accordingly.&lt;/p&gt;

Expand Down
12 changes: 3 additions & 9 deletions live-activity-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ <h2 id="building-grab-androids-live-activity">Building Grab Android’s “Live

<p>As we set out to design Grab’s Android Live Activity module, we broke down the task into three key components:</p>

<ol>
<li><strong>Registering Live Activity Token</strong></li>
</ol>
<h3 id="registering-live-activity-token"><strong>Registering Live Activity Token</strong></h3>

<p>In order to enable Hedwig services to send Live Activity notifications to devices, it is necessary to register a Live Activity Token for a specific order to Grab Devices services (refer to figure 1 for the iOS flow). As this use-case is applicable across various verticals in iOS, we have designed a LiveActivityIntegrationManager class specifically to handle this functionality.</p>

Expand All @@ -262,9 +260,7 @@ <h2 id="building-grab-androids-live-activity">Building Grab Android’s “Live

<p>Our goal is to provide developers with an easy implementation of Live Activity in the Grab app. Developers can simply utilize the startLiveActivity() function to register the token to Grab Devices by passing the vertical name and unique ID as parameters.</p>

<ol>
<li><strong>Notification Listener and Payload Mapping</strong></li>
</ol>
<h3 id="notification-listener-and-payload-mapping"><strong>Notification Listener and Payload Mapping</strong></h3>

<p>To handle Live Activity notifications in Android, it is necessary to listen to the Live Activity notification payload and map it to <code class="language-plaintext highlighter-rouge">LiveActivityAttributes</code>. Taking into consideration the initial Live Activity design (refer to figure 3), we need to analyse the variables necessary for this process. As a result, we break down the Live Activity UI into different UI elements and layouts, as follows:</p>

Expand Down Expand Up @@ -310,9 +306,7 @@ <h2 id="building-grab-androids-live-activity">Building Grab Android’s “Live

</code></pre></div></div>

<ol>
<li><strong>Payload Rendering</strong></li>
</ol>
<h3 id="payload-rendering"><strong>Payload Rendering</strong></h3>

<p>To ensure a clear separation of responsibilities, we have designed a separate class called <code class="language-plaintext highlighter-rouge">LiveActivityManager</code>. This dedicated class is responsible for the mapping of <code class="language-plaintext highlighter-rouge">LiveActivityAttributes</code> to Notifications. The generated notifications are then utilised by Android’s <code class="language-plaintext highlighter-rouge">NotificationManager</code> class to be posted and displayed accordingly.</p>

Expand Down
Loading

0 comments on commit 58f159d

Please sign in to comment.