/[projects]/android/EKLLauncher/src/dk/thoerup/ekllauncher/EKLLauncherActivity.java
ViewVC logotype

Diff of /android/EKLLauncher/src/dk/thoerup/ekllauncher/EKLLauncherActivity.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1618 by torben, Thu Oct 20 20:30:48 2011 UTC revision 1619 by torben, Thu Oct 20 20:48:28 2011 UTC
# Line 4  import android.app.Activity; Line 4  import android.app.Activity;
4  import android.content.Context;  import android.content.Context;
5  import android.content.Intent;  import android.content.Intent;
6  import android.net.ConnectivityManager;  import android.net.ConnectivityManager;
7    import android.net.NetworkInfo;
8  import android.os.Bundle;  import android.os.Bundle;
9  import android.os.Handler;  import android.os.Handler;
10  import android.os.Message;  import android.os.Message;
# Line 151  public class EKLLauncherActivity extends Line 152  public class EKLLauncherActivity extends
152                    
153          web.setWebChromeClient(new CustomChromeClient() );          web.setWebChromeClient(new CustomChromeClient() );
154          web.setWebViewClient( new DummyWebViewClient() ); // skal have en webviewclient for at kunne styre ved forlad tur          web.setWebViewClient( new DummyWebViewClient() ); // skal have en webviewclient for at kunne styre ved forlad tur
155            
156          if ( (telMgr.getSimState() == TelephonyManager.SIM_STATE_READY && telMgr.getDataState() == TelephonyManager.DATA_CONNECTED) || connMgr.getActiveNetworkInfo().getType() == ConnectivityManager.TYPE_WIFI) {          NetworkInfo network = connMgr.getActiveNetworkInfo();
157            if ( (telMgr.getSimState() == TelephonyManager.SIM_STATE_READY && telMgr.getDataState() == TelephonyManager.DATA_CONNECTED) || ( network != null && network.getType() == ConnectivityManager.TYPE_WIFI) ) {
158                  web.loadUrl( URL );                  web.loadUrl( URL );
159          } else {          } else {
160                  web.loadData("<html><body><h2>afventer netv&aelig;rksforbindelse</h2></body></html>", "text/html", "iso-8859-1");                  web.loadData("<html><body><h2>afventer netv&aelig;rksforbindelse</h2></body></html>", "text/html", "iso-8859-1");

Legend:
Removed from v.1618  
changed lines
  Added in v.1619

  ViewVC Help
Powered by ViewVC 1.1.20