title: Attempt to invoke virtual method 'void com.phonegap.CallbackServer.sendJavascript(java.lang.String)' on a null object reference
body: <p>I can't quite figure out what the problem is here. Can anyone please help. I am developing the phonegap app using the phonegap 1.3.0.jar. Logcat shows the error at that point.</p>
  
  <p>Below is the code:</p>
  
  <pre><code>public class Main extends DroidGap {
  
      ConnectivityManager connectivity;
      NetworkInfo activeNetwork;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          super.setIntegerProperty("splashscreen", R.drawable.splash);
  
          connectivity  = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE);
          activeNetwork = connectivity.getActiveNetworkInfo(); 
  
          if(activeNetwork != null) {
              if(activeNetwork.getType() == ConnectivityManager.TYPE_WIFI)
              {Toast.makeText(this,activeNetwork.getTypeName(), Toast.LENGTH_SHORT).show();
              super.loadUrl("url", 1000);}
  
              else if(activeNetwork.getType() == ConnectivityManager.TYPE_MOBILE) 
              {Toast.makeText(this, activeNetwork.getTypeName(), Toast.LENGTH_SHORT).show();
              super.loadUrl("url", 1000);}    
          }//Connected to the Internet
  
          else {
              super.loadUrl("file:///android_asset/www/index.html", 1000);}       
          //No Internet Connection
      }
  
       public void onReceivedError( int errorCode, String description, String failingUrl)
          {
              super.loadUrl("file:///android_asset/www/index.html", 1000);
          //Server down.  
          }
  }
  </code></pre>
  
  <p>And the logcat error:</p>
  
  <pre><code>--------- beginning of crash
  11-25 10:27:13.000  9934  9934 E AndroidRuntime: FATAL EXCEPTION: main
  11-25 10:27:13.000  9934  9934 E AndroidRuntime: Process: com.app.tradelance, PID: 9934
  11-25 10:27:13.000  9934  9934 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.phonegap.CallbackServer.sendJavascript(java.lang.String)' on a null object reference
  11-25 10:27:13.000  9934  9934 E AndroidRuntime:    at com.phonegap.DroidGap$LinearLayoutSoftKeyboardDetect.onMeasure(DroidGap.java:1699)
  11-25 10:27:13.000  9934  9934 E AndroidRuntime:    at android.view.View.measure(View.java:18794)
  </code></pre>