nicolas2k / google-glass-api

Automatically exported from code.google.com/p/google-glass-api
1 stars 0 forks source link

Using android.permission.CHANGE_WIFI_MULTICAST_STATE does not work on Glass #312

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use permission android.permission.CHANGE_WIFI_MULTICAST_STATE in 
AndroidManifest.xml
2. createMulticastLock and acquire

What is the expected output? What do you see instead?

No exception. Instead, I get:

    ava.lang.SecurityException: WifiService: Neither user 10030 nor current process has android.permission.CHANGE_WIFI_MULTICAST_STATE.

What version of the product are you using? On what operating system?

I updated the Glass Development Kit Sneak Peek to revision 2. I have updated a 
XE-B Glass updated to XE12. I started working on this code after this update so 
it is not clear to me if this would have worked prior to updating Glass and the 
GDK.

Please provide any additional information below.

I have limited experience with Android development so I might be doing 
something wrong here. However, my AndroidManifest.xml does request the 
permission. I have no problems until I actually try to acquire a multicast lock.

I am using the following permissions:

        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
        <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>

Original issue reported on code.google.com by simen...@gmail.com on 18 Dec 2013 at 7:47

GoogleCodeExporter commented 8 years ago
I discovered the source of this issue. No part of the toolchain was warning me 
or failing that I had uses-permission in the wrong spot inside of 
AndroidManifest.xml. I don't know who should have caught this (Android Studio 
seems to be schema aware so I don't know why it didn't yell louder) but I guess 
in the end it comes down to me being a n00b and this being my first real 
Android application.

Please feel free to close this.

Original comment by simen...@gmail.com on 19 Dec 2013 at 12:09

GoogleCodeExporter commented 8 years ago
Glad you managed to fix this on your own :)

Original comment by ala...@google.com on 19 Dec 2013 at 12:14