/[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 1622 by torben, Fri Oct 21 04:59:27 2011 UTC revision 1623 by torben, Wed Oct 26 08:49:04 2011 UTC
# Line 3  package dk.thoerup.ekllauncher; Line 3  package dk.thoerup.ekllauncher;
3  import android.app.Activity;  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.location.LocationManager;
7  import android.net.ConnectivityManager;  import android.net.ConnectivityManager;
8  import android.net.NetworkInfo;  import android.net.NetworkInfo;
9  import android.os.Bundle;  import android.os.Bundle;
# Line 34  public class EKLLauncherActivity extends Line 35  public class EKLLauncherActivity extends
35                  }                  }
36    
37    
                 @Override  
                 public boolean onCreateWindow(WebView view, boolean dialog, boolean userGesture, Message resultMsg) {  
                         msg("create window");  
                         return super.onCreateWindow(view, dialog, userGesture, resultMsg);  
                 }  
   
38    
39                  public void onProgressChanged(WebView view, int progress) {                  public void onProgressChanged(WebView view, int progress) {
40                          // Activities and WebViews measure progress with different scales.                          // Activities and WebViews measure progress with different scales.
# Line 90  public class EKLLauncherActivity extends Line 85  public class EKLLauncherActivity extends
85                    
86          static final String URL = "http://omdeling.info/mobil/ekl/login.php";          static final String URL = "http://omdeling.info/mobil/ekl/login.php";
87                    
88            LocationManager locMgr;
89          ConnectivityManager connMgr;          ConnectivityManager connMgr;
90          TelephonyManager telMgr;          TelephonyManager telMgr;
91          WebView web;          WebView web;
92          String device = "";          String device = "";
93                    
94                    
         public void msg(String m) {  
                 Toast.makeText(EKLLauncherActivity.this, m, Toast.LENGTH_SHORT).show();  
         }  
95                    
96      /** Called when the activity is first created. */      /** Called when the activity is first created. */
97      @Override      @Override
# Line 122  public class EKLLauncherActivity extends Line 115  public class EKLLauncherActivity extends
115                    
116                    
117                    
118                    locMgr = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
119          telMgr = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);          telMgr = (TelephonyManager) this.getSystemService(Context.TELEPHONY_SERVICE);
120          connMgr = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);          connMgr = (ConnectivityManager) this.getSystemService(Context.CONNECTIVITY_SERVICE);
121                    
# Line 134  public class EKLLauncherActivity extends Line 127  public class EKLLauncherActivity extends
127                          device = "";                          device = "";
128          }          }
129                    
130            if (!locMgr.isProviderEnabled(LocationManager.GPS_PROVIDER )) {
131                    //Settings.Secure.putString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED, "network,gps");
132                    Toast.makeText(this, "GPS er slået fra på telefonen!", Toast.LENGTH_LONG);            
133            }
134                    
135          setContentView(R.layout.main);          setContentView(R.layout.main);
136          web = (WebView) findViewById(R.id.web);          web = (WebView) findViewById(R.id.web);

Legend:
Removed from v.1622  
changed lines
  Added in v.1623

  ViewVC Help
Powered by ViewVC 1.1.20