title: android 3G permission
body: <p>i wrote in the manifest file this permissions:</p>
  
  <pre><code>&lt;/application&gt;
      &lt;uses-permission android:name="android.permission.CALL_PHONE"&gt;&lt;/uses-permission&gt;
      &lt;uses-permission android:name="android.permission.READ_CONTACTS" /&gt; 
      &lt;uses-feature android:name="android.hardware.wifi" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
      &lt;uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/&gt;
      &lt;uses-permission android:name="android.permission.MODIFY_PHONE_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" /&gt;
      &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
      &lt;uses-permission android:name="android.permission.READ_PHONE_STATE" /&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>and when i start the app it wrote: "unfortanely the app stopped" and exit from it
  in Logcat i saw the line that the program fail is:</p>
  
  <pre><code>Class conmanClass;
  Field iConnectivityManagerField;
  iConnectivityManagerField = conmanClass.getDeclaredField("mService");
  </code></pre>
  
  <p>what is the problem?can anyone help me to fix it?</p>
  
  <p>this is the logcat:</p>
  
  <pre><code>09-14 09:11:49.493: E/AndroidRuntime(1669): FATAL EXCEPTION: main
  09-14 09:11:49.493: E/AndroidRuntime(1669): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.voicerecognitiondemo/com.example.voicerecognitiondemo.VoiceRecognitionDemo}: java.lang.NullPointerException
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at android.os.Handler.dispatchMessage(Handler.java:99)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at android.os.Looper.loop(Looper.java:137)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at android.app.ActivityThread.main(ActivityThread.java:4424)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at java.lang.reflect.Method.invokeNative(Native Method)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at java.lang.reflect.Method.invoke(Method.java:511)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at dalvik.system.NativeStart.main(Native Method)
  09-14 09:11:49.493: E/AndroidRuntime(1669): Caused by: java.lang.NullPointerException
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at com.example.voicerecognitiondemo.VoiceRecognitionDemo.onCreate(VoiceRecognitionDemo.java:55)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at android.app.Activity.performCreate(Activity.java:4465)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
  09-14 09:11:49.493: E/AndroidRuntime(1669):     ... 11 more
  </code></pre>