Você adicionou a permissão?
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
Abraço.
2016-07-26 16:51 GMT-03:00 Arthur Ruppenthal <arthur.ruppenthal@gmail.com>:
Olá pessoal.--Por que o sistema pode não estar entrando no onReceive da minha classe TratadorBroadcast?Classe:public class TratadorBroadcast extends BroadcastReceiver {
@Override
public void onReceive(Context aContext, Intent aIntent) {
if (aIntent.getAction().toString().contains("BOOT_COMPLETED")){
Intent i = new Intent();
i.setAction("com.atc.barcodereaderpa.SincronizarService");
aContext.startService(i);
Log.i(this.getClass().getName(),"onReceive()");
}
}}Manifest:<receiver android:name=".TratadorBroadcast">Agradeço desde já!
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</receiver>
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.
Atenciosamente,
Fernando Cesar da Silva
Eng° da Computação
Skype: eng.fernandocesar
PRESERVE O MEIO AMBIENTE SÓ IMPRIMA ESTE E-MAIL SE FOR INDISPENSÁVEL.
Fernando Cesar da Silva
Eng° da Computação
Skype: eng.fernandocesar
PRESERVE O MEIO AMBIENTE SÓ IMPRIMA ESTE E-MAIL SE FOR INDISPENSÁVEL.
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.
0 comentários:
Postar um comentário