How do I make both landscape and portrait orientations possible in my app?

I am complete noobie and so must apologise if this is a stupid question with an obvious answer.

I have just started working with corona and have been wondering how to make both orientations possible for an app. Say for example, candy crush works in both orientations. I would like to be able to do that - to be able to make an app which works in both orientations. Any pointers regarding that will be very helpful.

Look in the sample code that is provided when you download Corona SDK.

Anyway, here is an example:  This is done in the build.settings file.

settings =
{
    orientation =
    {
        default = “landscapeRight”,
        supported = { “landscapeLeft”, “landscapeRight”, “portrait”, “portraitUpsideDown”, },
    },
    iphone =
    {
        plist =
        {
            CFBundleIconFiles =
            {
                “Icon.png”,
                “Icon@2x.png”,
                “Icon-60.png”,
                “Icon-60@2x.png”,
                “Icon-60@3x.png”,
                “Icon-72.png”,
                “Icon-72@2x.png”,
                “Icon-76.png”,
                “Icon-76@2x.png”,
                “Icon-Small.png”,
                “Icon-Small@2x.png”,
                “Icon-Small@3x.png”,
                “Icon-Small-40.png”,
                “Icon-Small-40@2x.png”,
                “Icon-Small-50.png”,
                “Icon-Small-50@2x.png”,
            },
        },
    },
}

Is it possible to allow the landscape mode only at certain times in the app’s execution, or is it all or nothing?

Thanks.

Look in the sample code that is provided when you download Corona SDK.

Anyway, here is an example:  This is done in the build.settings file.

settings =
{
    orientation =
    {
        default = “landscapeRight”,
        supported = { “landscapeLeft”, “landscapeRight”, “portrait”, “portraitUpsideDown”, },
    },
    iphone =
    {
        plist =
        {
            CFBundleIconFiles =
            {
                “Icon.png”,
                “Icon@2x.png”,
                “Icon-60.png”,
                “Icon-60@2x.png”,
                “Icon-60@3x.png”,
                “Icon-72.png”,
                “Icon-72@2x.png”,
                “Icon-76.png”,
                “Icon-76@2x.png”,
                “Icon-Small.png”,
                “Icon-Small@2x.png”,
                “Icon-Small@3x.png”,
                “Icon-Small-40.png”,
                “Icon-Small-40@2x.png”,
                “Icon-Small-50.png”,
                “Icon-Small-50@2x.png”,
            },
        },
    },
}

Is it possible to allow the landscape mode only at certain times in the app’s execution, or is it all or nothing?

Thanks.