0
\$\begingroup\$

Im developing an app that when you click a button the phone has to vibrate, the issue is that the phone just chashes. Saing that I need permitions to vibrate. I've already set this permition in the build.setting (android manifiest).

Here is the code

build.settings:

settings =
{
orientation = {
    default = "portrait",
    supported = { "portrait", }
},

iphone =
{
    plist=
    {
        CoronaUseIOS7LandscapeOnlyWorkaround = true,
        CoronaUseIOS7IPadPhotoPickerLandscapeOnlyWorkaround = true,
        CoronaUseIOS6LandscapeOnlyWorkaround = true,
        CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround = true,
        UIApplicationExitsOnSuspend = false,
        UIPrerenderedIcon = true,
        UIStatusBarHidden = false,
        CFBundleIconFile = "Icon.png",
        CFBundleIconFiles = 
        {
            "Icon.png", 
            "[email protected]", 
            "Icon-60.png",
            "[email protected]",
            "Icon-72.png", 
            "[email protected]",
            "Icon-76.png",
            "[email protected]", 
            "Icon-Small.png", 
            "[email protected]",
            "Icon-Small-40.png",
            "[email protected]",
            "Icon-Small-50.png", 
            "I[email protected]", 
        },
    },
},
android =
{
    permissions =
    {
        { name = ".permission.C2D_MESSAGE", protectionLevel = "signature" },
    },
    usesPermissions =
    {
        "android.permission.INTERNET",
        "android.permission.VIBRATE",
    },
},
}

the file that uses the vibration is:

local onButtonEvent = function (event )

        system.vibrate()
end

I read all post in Corona page without success. Can I see the android manifest to see if the permissions are there. I've read that is a Corona issue not sure.

\$\endgroup\$
1
  • \$\begingroup\$ Some phones just have bugs. I have an old Samsung that runs Android 1.5. It just doesn't play MP3s. You have to deal with it :) \$\endgroup\$
    – ashes999
    Jun 5, 2014 at 21:26

1 Answer 1

1
\$\begingroup\$

It worked with the following build.settings:

settings =
{
orientation = {
    default = "portrait",
    supported = { "portrait", }
},

iphone =
{
    plist=
    {
        CoronaUseIOS7LandscapeOnlyWorkaround = true,
        CoronaUseIOS7IPadPhotoPickerLandscapeOnlyWorkaround = true,
        CoronaUseIOS6LandscapeOnlyWorkaround = true,
        CoronaUseIOS6IPadPhotoPickerLandscapeOnlyWorkaround = true,
        UIApplicationExitsOnSuspend = false,
        UIPrerenderedIcon = true,
        UIStatusBarHidden = false,
        CFBundleIconFile = "Icon.png",
        CFBundleIconFiles = 
        {
            "Icon.png", 
            "[email protected]", 
            "Icon-60.png",
            "[email protected]",
            "Icon-72.png", 
            "[email protected]",
            "Icon-76.png",
            "[email protected]", 
            "Icon-Small.png", 
            "[email protected]",
            "Icon-Small-40.png",
            "[email protected]",
            "Icon-Small-50.png", 
            "I[email protected]", 
        },
    },
},
android =
{
    permissions =
    {
        { name = ".permission.C2D_MESSAGE", protectionLevel = "signature" },
    },
    usesPermissions =
    {
        "android.permission.INTERNET",
        "android.permission.VIBRATE",
    },
},
}
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .