I am trying to create a plugin for Burstly for Unity Android. I first created a sample android native app for it and it worked fine. Then I made the necessary changes in the project [like changing Activity to UnityPlayerActivity] and made a jar out of it. Put this and the BurstlySdk.jar in the Assets/Plugins/Android folder along with the AndroidManifest.xml which had the required permissions. But when trying to run the genereated .apk on the android device I am getting the following error-
04-19 17:13:37.857: E/AndroidRuntime(17587): Caused by: java.lang.SecurityException: Requires READ_PHONE_STATE: Neither user 10111 nor current process has android.permission.READ_PHONE_STATE.
04-19 17:13:37.857: E/AndroidRuntime(17587): at android.os.Parcel.readException(Parcel.java:1327)
04-19 17:13:37.857: E/AndroidRuntime(17587): at android.os.Parcel.readException(Parcel.java:1281)
04-19 17:13:37.857: E/AndroidRuntime(17587): at com.android.internal.telephony.IPhoneSubInfo$Stub$Proxy.getDeviceId(IPhoneSubInfo.java:190)
04-19 17:13:37.857: E/AndroidRuntime(17587): at android.telephony.TelephonyManager.getDeviceId(TelephonyManager.java:219)
04-19 17:13:37.857: E/AndroidRuntime(17587): at com.burstly.lib.util.Utils.getRawDeviceId(Utils.java:1128)
04-19 17:13:37.857: E/AndroidRuntime(17587): at com.burstly.lib.util.Utils.getDeviceSHA1Id(Utils.java:1035)
04-19 17:13:37.857: E/AndroidRuntime(17587): at com.burstly.lib.util.Utils.getDeviceId(Utils.java:994)
04-19 17:13:37.857: E/AndroidRuntime(17587): at com.burstly.lib.ui.BurstlyView.configureRequestData(BurstlyView.java:341)
This permission [android.permission.READ_PHONE_STATE] is already present in the AndroidManifest.xml but it is still not able to pick it up. The version of Unity which I am using is 4.1.0f4. Can I get some pointers what the issue might be?
Thanks
Rahul Saxena