Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Re: SQLite Update Wait

Olá Ernani, obrigado pela resposta. Tudo não passou de vacilo meu: o problema era no método de comparar as datas que não estava retornando a 'newDate' corretamente. :)

O que mais me intrigou é que, modéstia parte, eu já desenvolvo a algum tempo e foi preciso a ajuda de vários colegas meus ajudando no debugger para descobrir o erro. Talvez pelo fato de não conseguir acompanhar o BD em tempo real. Vacilo grande! :)

Obrigado a todos! 


Rodrigo Medeiros

2014-09-17 23:26 GMT-03:00 Ernani Joppert Pontes Martins <joppert@gmail.com>:
Seu update está sendo feito de que forma? Está numa AsyncTask ou usa
ContentProvider?

Aparentemente vc deve esperar o update concluir, e, somente após isto,
proceder com a nova consulta, o que, aparentemente não está
acontecendo, né?

[]'s

Ernani

On Tue, Sep 16, 2014 at 10:21 PM, Rodrigo Medeiros
<rodriigomedeiros@gmail.com> wrote:
> Ok Geovani, follows code of BroadcastReceiver (onReceiver):
>
> ...
> Routine routine = routineModel.getNextRoutine(USER_ID);
> ...
> notification.addNotification(...);
>
> routine.setTime(newDate.getTimeInMillis());
>
> routineModel.updateRoutine(routine);
>
> Log.i(TAG_LOG, '...');
>
> routine = routineModel.getNextRoutine(USER_ID); // At that point the
> instance of the DB not yet finished the update which takes the routine to
> the end of the queue.
>
> Calendar calendar = Calendar.getInstance();
>
> calendar.setTimeInMillis(routine.getTime());
>
> Alarm.setAlarm(context, calendar);
>
>
>
>
> Rodrigo Medeiros
>
> 2014-09-16 21:49 GMT-03:00 Geovani **Leia a documentação oficial** de Souza
> <geovanisouza92@gmail.com>:
>
>> Let's see the code.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Android Brasil - Dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to androidbrasil-dev+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Brasil - Dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to androidbrasil-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário