<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AppStudio App push notification in ArcGIS AppStudio Questions</title>
    <link>https://community.esri.com/t5/arcgis-appstudio-questions/appstudio-app-push-notification/m-p/825044#M2025</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, I want to make sure that we using the correct terminology here. From the code snippets, it seems that you are using the &lt;A href="https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-notifications-local-localnotification/"&gt;Local Notification plugin from AppStudio AppFramework&lt;/A&gt;, correct?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, the function clear() or clearAll() should be the one to use to clear the notification,&amp;nbsp;&lt;A class="link-titled" href="https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-notifications-local-localnotification/#clearAll-method" title="https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-notifications-local-localnotification/#clearAll-method"&gt;LocalNotification QML Type | ArcGIS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you should call that method when the app is opened?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Erwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Jul 2019 20:52:33 GMT</pubDate>
    <dc:creator>ErwinSoekianto</dc:creator>
    <dc:date>2019-07-31T20:52:33Z</dc:date>
    <item>
      <title>AppStudio App push notification</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/appstudio-app-push-notification/m-p/825043#M2024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created an app using the Mapviewer template. I extended the template with some push notification functionality. When the app is used, the user get's a push notification when getting close to a feature.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the app is running in the background, then a push notification also appears, but this leads to this problem:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The notification is shown on the app icon:&lt;IMG class="image-1 jive-image" height="138" src="https://community.esri.com/legacyfs/online/454872_pastedImage_1.png" width="484" /&gt;&lt;/P&gt;&lt;P&gt;The notification (the number) cannot be removed again from the app icon. I have to shut the app down, before the notification disappears.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code for the push notification is:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #c0c0c0;"&gt;            &lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;pushNotificationMessage&lt;/SPAN&gt;(title,&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;message,&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;vibrate)&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #c0c0c0;"&gt;                &lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;(&lt;SPAN style="color: #2985c7;"&gt;message&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&amp;amp;&amp;amp;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;notification&lt;/SPAN&gt;.supported)&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #c0c0c0;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;notification&lt;/SPAN&gt;.clearAll();&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #c0c0c0;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;notification&lt;/SPAN&gt;.schedule(&lt;SPAN style="color: #2985c7;"&gt;title&lt;/SPAN&gt;,&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2985c7;"&gt;message&lt;/SPAN&gt;,&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;1001);&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #c0c0c0;"&gt;                &lt;/SPAN&gt;}&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #c0c0c0;"&gt;                &lt;/SPAN&gt;&lt;SPAN style="color: #808000;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;(&lt;SPAN style="color: #2985c7;"&gt;vibrate&lt;/SPAN&gt;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&amp;amp;&amp;amp;&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;Vibration&lt;/SPAN&gt;.supported)&lt;SPAN style="color: #c0c0c0;"&gt; &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #c0c0c0;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #800080;"&gt;Vibration&lt;/SPAN&gt;.vibrate();&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #c0c0c0;"&gt;                &lt;/SPAN&gt;}&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #c0c0c0;"&gt;            &lt;/SPAN&gt;}

What can i do, to make the notification disappear when the app is opened?

Best Regards&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:57:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/appstudio-app-push-notification/m-p/825043#M2024</guid>
      <dc:creator>KamranYusaf1</dc:creator>
      <dc:date>2021-12-12T16:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: AppStudio App push notification</title>
      <link>https://community.esri.com/t5/arcgis-appstudio-questions/appstudio-app-push-notification/m-p/825044#M2025</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all, I want to make sure that we using the correct terminology here. From the code snippets, it seems that you are using the &lt;A href="https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-notifications-local-localnotification/"&gt;Local Notification plugin from AppStudio AppFramework&lt;/A&gt;, correct?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, the function clear() or clearAll() should be the one to use to clear the notification,&amp;nbsp;&lt;A class="link-titled" href="https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-notifications-local-localnotification/#clearAll-method" title="https://doc.arcgis.com/en/appstudio/api/reference/framework/qml-arcgis-appframework-notifications-local-localnotification/#clearAll-method"&gt;LocalNotification QML Type | ArcGIS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you should call that method when the app is opened?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Erwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2019 20:52:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-appstudio-questions/appstudio-app-push-notification/m-p/825044#M2025</guid>
      <dc:creator>ErwinSoekianto</dc:creator>
      <dc:date>2019-07-31T20:52:33Z</dc:date>
    </item>
  </channel>
</rss>

