Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

system.vibrate() still not working because it demands permissions. Seemingly new to Corona 2018. Is there anything I can do?
Started by bluedeskstudios Feb 22 2018 06:50 PM

No replies to this topic
vibration corona 2018.3223 permissions corona 2018 build.settings
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

bluedeskstudios

[GLOBAL: userInfoPane.html]
bluedeskstudios
  • Observer

  • 15 posts
  • Corona SDK

System.vibrate() was working back when I was running Corona.2017.3189, however, now that I am running Corona 2018.3223, the system.vibrate() is not working properly. I did check the sample code for  Corona/SampleCode/Media/Camera to see how to ask for permissions to access the camera and see if I need to do the same thing for vibrate, and this is what it reads.

android =

{
  usesPermissions =
  {
   "android.permission.CAMERA",
   "android.permission.WRITE_EXTERNAL_STORAGE",
  },
  usesFeatures =
  {
   { name = "android.hardware.camera", required = true },
   { name = "android.hardware.camera.front", required = false },
  },
},

I am using an android phone with Android 7 to test my code. This is what my android permissions read for build.settings :

android =
	{
		usesPermissions =
		{
			"android.permission.INTERNET",
			"android.permission.VIBRATE",
		},
	}, 

I get an error message saying that it requires the security permission, even though I already have the permission enabled in my build.settings, as seen above.

The error says java.lang.SecurityException: Requires VIBRATE permission.

 

Is there anything I can do?




[topic_controls]
[/topic_controls]