rick smith
Lurker
Quick question wanted to verify this handler would be running in the main thread and not a background thread.
Trying to keep the send() function in the background
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.fu);
map = false;
// Send Telm and Update HP Dist
Handler handlert = new Handler();
handlert.postDelayed(new Runnable() {
@override
public void run() {
if (gpsrunning == 1 && !isNaN(gpsla) && !isNaN(gpslo)) {
send();
}
handlert.postDelayed(this, 1000);
}
}, 1000);
Trying to keep the send() function in the background
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.fu);
map = false;
// Send Telm and Update HP Dist
Handler handlert = new Handler();
handlert.postDelayed(new Runnable() {
@override
public void run() {
if (gpsrunning == 1 && !isNaN(gpsla) && !isNaN(gpslo)) {
send();
}
handlert.postDelayed(this, 1000);
}
}, 1000);