<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Android, Flic2 and background...]]></title><description><![CDATA[<p dir="auto">Hi,<br />
I m a currently trying to develop an application on Android that responds to Flic2 click.<br />
It works well when application is in foreground and responds during certain time when application is in background.<br />
But after one hour or so in background, the application stop responding to click (Flick Button led blink orange instead of green).<br />
I do know about Phone killing background app so :</p>
<ul>
<li>I have a foreground service that uses : PARTIAL_WAKE_LOCK</li>
<li>I have set my app to NO RESTRICTION in battery settings</li>
<li>I have set my app to START when device start</li>
</ul>
<p dir="auto">Still... it s not working..<br />
Can someone help me with that ? Is it a flic config problem ? Is it android's OS fault ? Is it a coding issue <img src="https://community.flic.io/assets/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=qo8gs0ne6uk" class="not-responsive emoji emoji-emoji-one emoji--disappointed_face" title=":(" alt="😞" /><br />
Thanks for your help</p>
]]></description><link>https://community.flic.io/topic/17996/android-flic2-and-background</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 13:30:06 GMT</lastBuildDate><atom:link href="https://community.flic.io/topic/17996.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 03 Feb 2021 08:13:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Android, Flic2 and background... on Wed, 03 Feb 2021 15:11:40 GMT]]></title><description><![CDATA[<p dir="auto">A foreground service should be enough (at least according to Android's official documentation). A wake lock should not be used/needed. This works perfectly fine on "original" Android devices such as Google Pixel devices. Some chinese phone manufacturers might neglect the intended behaviour for a foreground service and kills the process anyway though after some undocumented rules, unless the app is white listed or similar.</p>
<p dir="auto">The sample application at <a href="https://github.com/50ButtonsEach/flic2lib-android-sample" rel="nofollow ugc">https://github.com/50ButtonsEach/flic2lib-android-sample</a> uses a foreground service. You can check that out.</p>
]]></description><link>https://community.flic.io/post/19817</link><guid isPermaLink="true">https://community.flic.io/post/19817</guid><dc:creator><![CDATA[Emil]]></dc:creator><pubDate>Wed, 03 Feb 2021 15:11:40 GMT</pubDate></item></channel></rss>