Failed to fire broadcast receiver in Android Oreo

余生长醉 提交于 2019-12-24 05:52:44

问题


Using SyncAdapter and AbstractThreadedSyncAdapter https://riptutorial.com/android/example/32303/sync-adapter-with-every-min-requesting-value-from-server- I have registered receiver in manifest and from SyncAdapter broadcast register its working fine before Oreo but in Oreo, broadcast receiver failed to fire.

 Intent intent = new Intent();   
             intent.setAction("package.qa.ACTION_SYNC");
            intent.putExtra("OUTBOX_ID", outboxId);
            intent.putExtra("JSON_RESPONSE", jsonResponse);
            intent.putExtra("TRANS_TYPE", transaction);
            getContext().sendBroadcast();

来源:https://stackoverflow.com/questions/53664614/failed-to-fire-broadcast-receiver-in-android-oreo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!