timer = 0
displayText = true

function update( target, delta_time )
	timer = timer + delta_time;
	if timer > 1000 then
		timer = math.mod( timer, 1000 );
        if displayText then
				displayText = false
		else 
			displayText = true
		end
        
        if displayText then
		    Page.setItemLabel( target, NWACTIVITY_TEXT,  Manager.getOnlineStatusString() )
        else
		    Page.setItemLabel( target, NWACTIVITY_TEXT, 0 )
        end
		
	end
                
    
    return true
end


function onPageEvent( evt, target, data)
	if (evt == PAGE_COMMAND) then
	    if (Command.getId( data ) == AG_KEY_CANCEL) then
   			PageLogicManager.popPage( Manager.getLogicManager() );
   			FeaturesManager.cancelBlockingFeature( Manager.getFeaturesManager(), false );
			return true;
		end
	end
	return false;
end