Active and smart packaging of foods