/[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 1623 by torben, Wed Oct 26 08:49:04 2011 UTC revision 1624 by torben, Wed Oct 26 09:01:56 2011 UTC
# Line 1  Line 1 
1  package dk.thoerup.ekllauncher;  package dk.thoerup.ekllauncher;
2    
3  import android.app.Activity;  import android.app.Activity;
4    import android.app.AlertDialog;
5  import android.content.Context;  import android.content.Context;
6    import android.content.DialogInterface;
7  import android.content.Intent;  import android.content.Intent;
8  import android.location.LocationManager;  import android.location.LocationManager;
9  import android.net.ConnectivityManager;  import android.net.ConnectivityManager;
# Line 127  public class EKLLauncherActivity extends Line 129  public class EKLLauncherActivity extends
129                          device = "";                          device = "";
130          }          }
131                    
132          if (!locMgr.isProviderEnabled(LocationManager.GPS_PROVIDER )) {  
                 //Settings.Secure.putString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED, "network,gps");  
                 Toast.makeText(this, "GPS er slået fra på telefonen!", Toast.LENGTH_LONG);              
         }  
133                    
134          setContentView(R.layout.main);          setContentView(R.layout.main);
135          web = (WebView) findViewById(R.id.web);          web = (WebView) findViewById(R.id.web);
# Line 160  public class EKLLauncherActivity extends Line 159  public class EKLLauncherActivity extends
159                    
160          simHandler.sendEmptyMessage(0);          simHandler.sendEmptyMessage(0);
161                    
162            
163            
164            
165            if (!locMgr.isProviderEnabled(LocationManager.GPS_PROVIDER )) {
166                    //Settings.Secure.putString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED, "network,gps");
167                    
168                    AlertDialog.Builder builder = new AlertDialog.Builder(this);
169                    builder.setMessage("GPS er slået fra på telefonen!\nSæt et flueben ved GPS i næste vindue og tryk derefter på tilbage knappen (nederst på telefonen)")
170                .setPositiveButton("OK", new DialogInterface.OnClickListener() {
171                    public void onClick(DialogInterface dialog, int id) {
172                            Intent myIntent = new Intent( Settings.ACTION_SECURITY_SETTINGS );
173                        startActivity(myIntent);      
174                    }
175                })
176                .create()
177                .show();      
178            }
179      }      }
180    
181          @Override          @Override

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

  ViewVC Help
Powered by ViewVC 1.1.20