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