i have project checks network connectivity state this:
public void getstatus () { connectivitymanager omanager; connectivitystate estate; // omanager = (connectivitymanager)m_ocontext.getsystemservice (activity.connectivityservice); // if (omanager.activenetworkinfo == null) connected = false; else connected = omanager.activenetworkinfo.isconnected; // // current connection state if (!connected) estate = connectivitystate.notconnected; else if (omanager.getnetworkinfo (connectivitytype.mobile).getstate () == networkinfo.state.connected) estate = connectivitystate.roaming; else if (omanager.getnetworkinfo (connectivitytype.wifi).getstate () == networkinfo.state.connected) estate = connectivitystate.wifi; else estate = connectivitystate.other; // state = estate; // if (statusupdated != null) statusupdated (); }
this worked fine when running xamarin studio, i've moved project on visual studio 2012 doesn't pick permission set in manifest. here's have in manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installlocation="auto" package="myapp.android"> <uses-sdk android:targetsdkversion="10" android:minsdkversion="10" /> <uses-permission android:name="android.permission.access_network_state" /> <application android:label="my app"></application> </manifest>
i created manifest file going properties of solution , choosing create there, checked checkbox access_network_state
yet still when run vs2012 exception saying device doesn't have permission. on this? thanks.
Comments
Post a Comment