- Home /
AndroidJavaException: java.lang.SecurityException: Requires VIBRATE permission
I've written a small plugin that requires me to use the Vibrate permission inside my program. I have placed my jar file inside Assets/Plugins/Android
along with an AndroidManifest.xml
file which can be seen below:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
android:installLocation="preferExternal"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"/>
<application
android:theme="@android:style/Theme.NoTitleBar"
android:icon="@drawable/app_icon"
android:label="@string/app_name"
android:debuggable="true">
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
</application>
<uses-permission android:name="android.permission.VIBRATE" />
</manifest>
The issue that I am having is whenever I build and push the app to the device I check the logcat and I am getting permission issues for VIBRATE. Why are these permissions not propagating to the application if my Manifest file in the the correct location, have I done something wrong?
Try running 'aapt dump badging ' (from the command line) and see if the vibrate permission shows up there. That'll tell you if it's something going wrong in the manifest or in the code.
Your answer
![](https://koobas.hobune.stream/wayback/20220612002050im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Android Permissions API Version 1 Answer
[IKVM] Unity goes crazy after the first compilation 1 Answer
How can I set/get/confirm the API used for an embedded Android script? 0 Answers
Problem reading sensor plugin, event won't trigger 2 Answers
How to check if user has given camera or location permissions (android) 0 Answers