Code example for FragmentActivity

Methods: onStop, unregisterReceiver

0
	} 
 
	@Override 
	protected void onStop() 
	{ 
		unregisterReceiver( receiver );
		super.onStop(); 
	} 
 
	private class MyServiceReceiver extends BroadcastReceiver
	{ 
 
		@Override 
		public void onReceive( Context context, Intent intent )
		{ 
			if ( intent.getAction().equals( MyService.ACTION_PROGRESS ) )
			{ 
				int progress = intent.getIntExtra( MyService.EXTRA_PROGRESS, 0 );
				int max = intent.getIntExtra( MyService.EXTRA_MAX, 0 );
				serviceProgress.setMax( max );
				serviceProgress.setProgress( progress );