Example usage for android.app Activity sendOrderedBroadcast

List of usage examples for android.app Activity sendOrderedBroadcast

Introduction

In this page you can find the example usage for android.app Activity sendOrderedBroadcast.

Prototype

@Override
    public void sendOrderedBroadcast(Intent intent, String receiverPermission) 

Source Link

Usage

From source file:com.todoroo.astrid.activity.FilterListFragment.java

@Override
public void onResume() {
    super.onResume();
    StatisticsService.sessionStart(getActivity());
    if (adapter != null)
        adapter.registerRecevier();/*from w w w  .j  a v a  2  s  .  c o m*/

    // also load sync actions
    Activity activity = getActivity();

    Intent broadcastIntent = new Intent(AstridApiConstants.BROADCAST_REQUEST_SYNC_ACTIONS);
    activity.sendOrderedBroadcast(broadcastIntent, AstridApiConstants.PERMISSION_READ);

    if (activity instanceof TaskListActivity) {
        ((TaskListActivity) activity).setupPopoverWithFilterList(this);
    }

    activity.registerReceiver(refreshReceiver, new IntentFilter(AstridApiConstants.BROADCAST_EVENT_REFRESH));

}