Background service examples

kotlin · · 219 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Does anyone have a good link to an example / tutorial on making a background service using Kotlin on Android? I&#39;m new to Kotlin and trying to figure out how to make my app poll a website, when the app is not in the foreground, every hour to check for post updates, and if an update if found to notify the user.</p> <p>Thanks!</p> <hr/>**评论:**<br/><br/>sebaslogen: <pre><p>Here is a Kotlin example, but you can just follow the JobScheduler guide in this medium blogpost:</p> <p><a href=""></a></p> <p><a href=""></a></p></pre>saldous: <pre><p>Thank you!</p></pre>0rpheu: <pre><p>You can create a <a href="" rel="nofollow">jobService</a> and use a <a href="" rel="nofollow">jobInfo</a> to set your repeating criteria.</p></pre>TotesMessenger: <pre><p>I&#39;m a bot, <em>bleep</em>, <em>bloop</em>. Someone has linked to this thread from another place on reddit:</p> <ul> <li>[<a href="/r/androiddev" rel="nofollow">/r/androiddev</a>] <a href="" rel="nofollow">Background service examples (Kotlin)</a></li> </ul> <p> <em><sup>If you follow any of the above links, please respect the rules of reddit and don&#39;t vote in the other threads.</sup> <sup>(<a href="/r/TotesMessenger" rel="nofollow">Info</a></sup> <sup>/</sup> <sup><a href="/message/compose?to=/r/TotesMessenger" rel="nofollow">Contact</a>)</sup></em></p></pre>
219 次点击  
加入收藏 微博
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet