Time to get real data.
We'll move the code from onUpdate
into our separate IntentService.
Call startservice from
our onUpdate method.
Send our broadcasts when the data's
changed from the SyncAdaptor.
Then receive that broadcast
in our AppWidget+Provider.
Finally, we'll update our
IntentService to query for real data.
Don't forget to add your IntentService
to your Android manifest.
.حان وقت الحصول على بيانات حقيقية
سننقل التعليمة البرمجية من onUpdate
.إلى IntentService المنفصلة
ثم نستدعي startservice من
.أسلوب onUpdate
ونرسل عمليات البث عند تغيير
.البيانات من SyncAdaptor
ثم نتلقى هذا البث
.في AppWidget+Provider
وسنحدث في النهاية
.IntentService للاستعلام عن بيانات حقيقية
ولا ننس إضافة IntentService
.إلى بيان Android
Hora de obter dados reais.
Vamos passar o código do onUpdate
para o IntentService separado.
Chamar startservice do
método onUpdate.
Enviar as transmissões quando os dados
mudarem do SyncAdaptor.
E receber essa transmissão
no AppWidget+Provider.
Por fim, vamos atualizar
IntentService para consultar dados reais.
Não se esqueça de adicionar IntentService
ao manifesto do Android.
是时候来获取真实数据了
我们要将代码从 onUpdate 移动到独立的 IntentService 中
从 onUpdate 方法中调用 startservice
当 SyncAdaptor 中的数据发生更改时发送广播
然后在 AppWidget+Provider 接收广播
最后 我们将更新 IntentService 以查询真实数据
不要忘了将 IntentService 添加至 Android 清单中