private void registerPushReceiver ( final Handler mainThreadHandler , final Context context , PushTokenProvider provider , final PushTokenListener tokenListener , final PushMessageListener messageListener ) { IntentFilter filter = new IntentFilter ( ) ; filter . addAction ( IDService . ACTION_REFRESH_PUSH ) ; filter . addAction ( PushService . ACTION_PUSH_MESSAGE ) ; receiver = new PushBroadcastReceiver ( mainThreadHandler , provider , tokenListener , messageListener ) ; LocalBroadcastManager . getInstance ( context . getApplicationContext ( ) ) . registerReceiver ( receiver , filter ) ; }
Register local broadcast listener for refreshed push tokens and push messages .