<?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 What was the solution? Please in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119880#M75611</link>
    <description>&lt;P&gt;What was the solution? Please share so it can help others with the same symptoms.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Oct 2016 19:37:28 GMT</pubDate>
    <dc:creator>PaulF_IntelCorp</dc:creator>
    <dc:date>2016-10-20T19:37:28Z</dc:date>
    <item>
      <title>App reload when minimized and stop sound ( Only on Android 6.0 Marshmallow )</title>
      <link>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119873#M75604</link>
      <description>&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(36, 39, 41); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;"&gt;Im making a one app to play audio streaming with html5.&lt;/P&gt;

&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(36, 39, 41); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;"&gt;All works fine, play in background, etc.&lt;/P&gt;

&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(36, 39, 41); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;"&gt;But on Android 6.0 Marshmallow he reload if minimized, see:&amp;nbsp;&lt;A href="https://drive.google.com/open?id=0B7_KN57XiL-xLU5kaEF1c1dTT0k" rel="nofollow" style="border: 0px; color: rgb(0, 89, 153); cursor: pointer;"&gt;https://drive.google.com/open?id=0B7_KN57XiL-xLU5kaEF1c1dTT0k&lt;/A&gt;&lt;/P&gt;

&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(36, 39, 41); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;"&gt;On others versions of android works like a charm, i think is some permission. Anyone have idea to solve this?&lt;/P&gt;

&lt;P style="margin-bottom: 1em; border: 0px; font-size: 15px; clear: both; color: rgb(36, 39, 41); font-family: Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif;"&gt;Already tried some plugins ( Native audio, Media, cordova plugin background audio, Ktzer background mode ) :(&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2016 11:26:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119873#M75604</guid>
      <dc:creator>Eberton_M_</dc:creator>
      <dc:date>2016-10-19T11:26:33Z</dc:date>
    </item>
    <item>
      <title>What are you setting the</title>
      <link>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119874#M75605</link>
      <description>&lt;P&gt;What are you setting the "Target Android API" level to? Set it to 21 and build with Crosswalk (any version) to see if you get the same results.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2016 23:42:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119874#M75605</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-10-19T23:42:35Z</dc:date>
    </item>
    <item>
      <title>Hello Paul, thank you for</title>
      <link>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119875#M75606</link>
      <description>&lt;P&gt;Hello Paul, thank you for reply.&lt;BR /&gt;
	Same problem, still have problem on&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp;Android 6.0 Marshmallow =(&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;Any idea?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 12:52:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119875#M75606</guid>
      <dc:creator>Eberton_M_</dc:creator>
      <dc:date>2016-10-20T12:52:40Z</dc:date>
    </item>
    <item>
      <title>Eberton -- since you get the</title>
      <link>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119876#M75607</link>
      <description>&lt;P&gt;Eberton -- since you get the same results whether you use Crosswalk or the native webview, it must be something to do with Android 6. As you indicated earlier, it might be a permissions issue, but setting the target API level to 21 generally takes care of that problem, because it effectively tells the Android runtime that you are not yet compatible with the new permissions APIs that level 23 introduced.&lt;/P&gt;

&lt;P&gt;Probably what's happening is Android 6 is being more aggressive about power saving and is forcing your app to "quit." Which then results in a "resume" from a cold state. I would add some code to capture entry into the pause and resume states and write some data out to see if that's what's happening (for example to console.log). You'll have to do this debugging with a built app for an accurate representation of what's going on (see &lt;A href="https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview#RemoteChromeDevTools)" target="_blank"&gt;https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview#RemoteChromeDevTools)&lt;/A&gt;. It's quite possible remote CDT could interfere with these events, in which case you may need to write some info to an on-device file (using the cordova file plugin API, write to a file in the "external SDCard" folders) and then retrieve that information after the fact.&lt;/P&gt;

&lt;P&gt;Here are some links that will help with the pause/resume events:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&lt;A href="http://www.telerik.com/blogs/phonegap-apache-cordova-lifecycle-events" target="_blank"&gt;http://www.telerik.com/blogs/phonegap-apache-cordova-lifecycle-events&lt;/A&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;A href="http://cordova.apache.org/docs/en/6.x/cordova/events/events.html" target="_blank"&gt;http://cordova.apache.org/docs/en/6.x/cordova/events/events.html&lt;/A&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;A href="http://cordova.apache.org/docs/en/5.1.1/cordova/events/events.html" target="_blank"&gt;http://cordova.apache.org/docs/en/5.1.1/cordova/events/events.html&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Note that there are several other Android lifecycle events, as briefly described by this SO post:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&lt;A href="http://stackoverflow.com/questions/28742186/cordova-phonegap-activity-lifecycle" target="_blank"&gt;http://stackoverflow.com/questions/28742186/cordova-phonegap-activity-lifecycle&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Additional FYI:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;&lt;A href="https://github.com/agamemnus/cordova-plugin-ondestroy" target="_blank"&gt;https://github.com/agamemnus/cordova-plugin-ondestroy&lt;/A&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;A href="https://cordova.apache.org/docs/en/latest/guide/platforms/android/plugin.html#plugin-initialization-and-lifetime" target="_blank"&gt;https://cordova.apache.org/docs/en/latest/guide/platforms/android/plugin.html#plugin-initialization-and-lifetime&lt;/A&gt;&lt;/LI&gt;
	&lt;LI&gt;&lt;A href="https://github.com/apache/cordova-js/blob/81d8b9924b78804017fbce2ee7bd3f92560d341a/src/common/channel.js#L25" target="_blank"&gt;https://github.com/apache/cordova-js/blob/81d8b9924b78804017fbce2ee7bd3f92560d341a/src/common/channel.js#L25&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Especially, the "onPause" and the "window.onunload" events may be useful to track for help in debugging this issue.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 15:51:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119876#M75607</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-10-20T15:51:23Z</dc:date>
    </item>
    <item>
      <title>Thanks Paul, I think I could</title>
      <link>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119877#M75608</link>
      <description>&lt;P&gt;Thanks Paul,&amp;nbsp;I think I could understand what is going on.&lt;/P&gt;

&lt;P&gt;Is this some method to prevent the pause event?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 16:59:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119877#M75608</guid>
      <dc:creator>Eberton_M_</dc:creator>
      <dc:date>2016-10-20T16:59:45Z</dc:date>
    </item>
    <item>
      <title>You cannot stop a pause event</title>
      <link>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119878#M75609</link>
      <description>&lt;P&gt;You cannot stop a pause event from within a webview, the Android OS uses that to manage device battery consumption. It can be done using special plugins, so you might have to investigate finding some plugins that allow your app to continue running in the background. A better solution would be a plugin that explictly allows a specific function to run in the background, an then the rest of your app needs to monitor the "resume" event so you can restore the rest of your app to the appropriate state, avoiding the "reset" that appears to be taking place.&lt;/P&gt;

&lt;P&gt;It could also be that there's a "task manager" running on your Android 6, test device that's causing this to happen.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 17:21:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119878#M75609</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-10-20T17:21:41Z</dc:date>
    </item>
    <item>
      <title>Solved! Thank you so much</title>
      <link>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119879#M75610</link>
      <description>&lt;P&gt;Solved! Thank you so much Paul, you saved my life. :D&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 18:22:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119879#M75610</guid>
      <dc:creator>Eberton_M_</dc:creator>
      <dc:date>2016-10-20T18:22:16Z</dc:date>
    </item>
    <item>
      <title>What was the solution? Please</title>
      <link>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119880#M75611</link>
      <description>&lt;P&gt;What was the solution? Please share so it can help others with the same symptoms.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 19:37:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119880#M75611</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-10-20T19:37:28Z</dc:date>
    </item>
    <item>
      <title>Quote:Eberton M. wrote:</title>
      <link>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119881#M75612</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Eberton M. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Solved! Thank you so much Paul, you saved my life. :D&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi! Can you please share with us your solution ?&lt;/P&gt;

&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2016 01:21:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/App-reload-when-minimized-and-stop-sound-Only-on-Android-6-0/m-p/1119881#M75612</guid>
      <dc:creator>Malek_D_</dc:creator>
      <dc:date>2016-11-08T01:21:02Z</dc:date>
    </item>
  </channel>
</rss>

