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; |
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); |
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 |