如何在Android中设置IntentService优先 [英] How to set Priority of IntentService in Android

查看:207
本文介绍了如何在Android中设置IntentService优先的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以设置一个 IntentService 的优先级一样,你可以用。到目前为止,我没有发现任何东西。

I was wondering if it is possible to set the priority of an IntentService like you can with a Thread. So far I have not found anything.

推荐答案

HandlerThread IntentService 使用不暴露于SDK。它被设置为 Process.THREAD_PRIORITY_DEFAULT 作为工作重点。

The HandlerThread that IntentService uses is not exposed to the SDK. It is set to Process.THREAD_PRIORITY_DEFAULT as a priority.

注意 IntentService 143线code,包括空格和注释,所以你可能考虑只克隆它有一个与你所寻求的优先级。

Note that IntentService is 143 lines of code, including whitespace and comments, so you might consider just cloning it to have one with the priority you seek.

这篇关于如何在Android中设置IntentService优先的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆